Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Neverwinter Nights: Enhanced Edition has been released! Visit nwn.beamdog.com to make an order. NWN:EE FAQ is available.
Soundtracks for BG:EE, SoD, BG2:EE, IWD:EE, PST:EE are now available in the Beamdog store.
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Fun with SetObjectVisualTransform function

2»

Comments

  • ZwerkulesZwerkules Member Posts: 62
    Proleric said:

    @niv For placeables, how hard would it be to scale the walkmesh in exact proportion, in a future release?

    For useable objects it would also have to move the use nodes or the PC wouldn't be able to open giant chests.

    ShadowMProleric
  • ShadowMShadowM Member Posts: 399
    ShadowM said:

    The only issues I have spotted are related to vfx / visual applied to pc before/after scaling that are not syncing. I have a visual familar on shoulder system that while the pc apply the visual(familar on shoulder) the visual matches the size even after scaling, but if the visual is removed and reapplied then it reverts to standard size. Hmm might be able to work around it with scripting.

    Seem the latest build has fixed these issues, but more testing is need. Thanks BD great new development branch release.

    nivDrakon
  • JFKJFK Member Posts: 164
    So . . . if we had a way to determine an angle perpendicular to walkmesh, we could script a system that made for much more natural traveling over steep/sloped terrain: especially 'long' animals or 'objects' such as a stagecoach, could be tilted to match the terrain going uphill or downhill. Horses would look better going over steeply sloping grasslands if their hindquarters weren't floating above the ground, right?

    Is there any way to get such information currently, and if not, could this be something added at some point?

    -JFK

    ProlericDerpCity
  • ShadowMShadowM Member Posts: 399
    Zwerkules said:

    Proleric said:

    @niv For placeables, how hard would it be to scale the walkmesh in exact proportion, in a future release?

    For useable objects it would also have to move the use nodes or the PC wouldn't be able to open giant chests.
    You have to have the click radius to also scale for this to work.

  • ShadowMShadowM Member Posts: 399
    edited May 2018
    JFK said:

    So . . . if we had a way to determine an angle perpendicular to walkmesh, we could script a system that made for much more natural traveling over steep/sloped terrain: especially 'long' animals or 'objects' such as a stagecoach, could be tilted to match the terrain going uphill or downhill. Horses would look better going over steeply sloping grasslands if their hindquarters weren't floating above the ground, right?

    Is there any way to get such information currently, and if not, could this be something added at some point?

    -JFK

    Best way I can think of is to have mirrored hit box/ rootdummy system adding another column in the appearance.2da. You would have two rootdummy/impact node on a mesh, attack radius mirrored in the 2da and treat each separately for walking so the front hitbox/rootdummy mesh of the horse would start up the hill and the back part would follow but be treat at a different height in relation producing the angled effect you want. I asked for mirrored hitbox in the suggestion section, but has not been added to the trello yet. I mainly wanted it for elongated creatures like dragons on four legs looking and working right in fights. (with some attacking the back and some attacking the front). This would be backward compatible because the if the mirrored .2da column is left **** then it just defaults to normal behavior.

  • raz651raz651 Member Posts: 175
    You could use the user defined event to open the chest.

  • TarotRedhandTarotRedhand Member Posts: 587
    edited May 2018
    The sliding bookcase was done before in 2012 by Borden Haelven for January of that year's ccc. This was purely modelling though. That particular month there was also a demo module which shows off all the content made for it including the bookcase. So you can check it out if you want.

    Re. your maths headache. If you want to save in-game time it might be an idea to do the calculations out of game and store the results in a custom 2da. Then access using Get2DAString.

    Also you may find the manual I wrote for a small utility that I made a while ago, to be of use. As the utility is for the manipulation of the coordinates of models, it is probably of no use to you. However in the manual I explain about the maths of rotation in 3D space and include the formulas necessary to do so. RotateEm is here.

    TR

    Post edited by TarotRedhand on
    NeverwinterWightsDerpCity
  • DerpCityDerpCity Member, Moderator Posts: 268
    I just thought of an addition: it would be so cool if the transformations could be done over a specific amount of time, like by adding a float to the end of the command. This would hopefully allow the bridge to be done with far less steps and math, and make it look generally smoother. (Pretty rad job though, @NeverwinterWights!) But also, think about it - you could fake having bridges you could walk over and under by playing a characters walk animation, have them translate across the bridge over a specific amount of time, and then reset their translation and just teleport them at the end of the bridge. This could also make the transition between two different scale values more smooth and less like its in burst.

    I might be ahead of myself, though, and I don't know the technical ramifications of such a feature, but to me that would be an incredible addition to an already great addition to the game.

  • WarChiefZekeWarChiefZeke Member Posts: 1,328
    raz651 said:

    Here is 10.5 times as big.


    This is the kind of creative toolset use I hope to see (and make) as they continue to roll out features.

    DrakonDerpCity
  • FreshLemonBunFreshLemonBun Member Posts: 644
    Scripted walkmesh transforms sounds interesting.

    NeverwinterWightsDerpCity
  • NeverwinterWightsNeverwinterWights Member Posts: 192
    edited May 2018
    DerpCity said:

    I just thought of an addition: it would be so cool if the transformations could be done over a specific amount of time, like by adding a float to the end of the command. This would hopefully allow the bridge to be done with far less steps and math, and make it look generally smoother.

    Yeah something like that might be nice. Right now the only way to make it look smooth is to translate a very small amount at a time. But you have to be really careful with the delay between each translation and how many iterations. So if you move something like by 0.01, 1000 times, with a delay of 0.1, it looks really smooth but moves really slow. You can speed it up a little with a delay of like 0.05 but then you start to loose some of the translations visually, and if you try to speed it up more you can end up with a stack overflow (depending on iterations). I've been tweaking the heck out of these trying to make them look as smooth as possible without too many iterations and using workable delays.

    Post edited by NeverwinterWights on
  • nivniv Member, Moderator, Developer Posts: 343
    The system really wasn't designed to do manual lerping like that.

    Please keep in mind that every update to the transforms sends a full update containing all the transform vectors, incurring the bandwidth cost (negligible at 10ms intervals, but still - 10 floats a 4 bytes per update per client, if you want to do the math yourself), the cpu cost on the script system, and the general messiness of it.

    I'm not saying you shouldn't do it, just pointing out the hidden costs of it.

    Maybe lerping should be a followup soonish.

    NeverwinterWightsProlericDerpCityDrakon
  • ProlericProleric Member Posts: 416
    That would be great. Using it for animation right now is possible, if you don't mind that it's not very smooth (as the great examples posted here demonstrate).

    However, achieving smoother motion is tricky. I wasn't surprised to find that very small delays (in the region of, say, 0.001 seconds) crash the engine. A delay of about 0.05 seconds (equivalent to 20 fps) works quite well, but still looks jerky unless each movement is tiny (and therefore motion is slow).

    Of course, since the scripter is sensitized to look for choppy motion, we are probably aware of tiny defects that players might not notice.

    NeverwinterWightsDerpCity
2»
Sign In or Register to comment.