#Spherical Reprojection (Vertex Animation) - From Unreal to Unity

1 messages · Page 1 of 1 (latest)

shut crow
#

Hi guys,

I am banging my head against the desk for several days now I it seems I can't solve it on my own - so I would like to ask you for help.
Coming from Unreal, I've followed this tutorial here (time stamp included): https://youtu.be/pVKDfZMffpc?si=4R78kfNPKXhHNdmf&t=2878

The video is about making grass and for me the most important part, to animate it. So far so good. I've got it to work in Unreal and understand most of it, so I could rebuild the whole thing in Unity.
But I have massive problems with the 'Spherical Reprojection' that was mentioned in the video.

Please take a look on how it looks like in Unreal.
The main problem is, that Unreal handles this stuff with an offset and in Unity you build everything from scratch.
So I guess, somewhere in there, I am doing something wrong, not respecting this fact.

I know it is a lot to ask for, but do you spot the error?
I do get some kind of wind animation using this graph, but the grass does not react to the sliders/parameters at all.
So I am asking, just in theory, is the conversion correct? 😄

robust coral
shut crow
#

How would you implement the length node? As far as I understand, and also commented in the unreal engine graph, the distance is there to get the distance between two points. The undeformed and displaced one.
How could the length node provide this with one input?

Talking about the 0,0,0 input in the unreal version and mine.

As far as I understand, in Unreal, the 0,0,0 is the position of each vertex, undeformed (or is it the position in world space?). Then, the distance get measured of what the displaced version caused.

robust coral
# shut crow How would you implement the length node? As far as I understand, and also commen...

In both graphs, the (0,0,0) used here is the origin of the model / object space, not the undeformed vertex position (that would probably be the "Pre-Skinned Local Position" node in unreal)

(and Distance between some vector and (0,0,0) is equivalent to the Length of a vector, so either node would work)

The unity graph should be the same setup as the unreal one, but before connecting to the master stack :

  • Add the offset you calculate to the Position node (World space)
  • then Transform from World to Object space (as that's what space shadergraph expects)
shut crow
#

Okay, understand ... well, trying to understand it. Need to tackle this a bit further this evening.

Beside this ... is this what you've meant? Sorry if not ... for some reason I have huge problem with this one 😄

shut crow
#

It also doesn't look that wrong 😄
For now I guess all values all wrong, but this can be fixed. Will test it later after work - so far, thank for your help!

shut crow
#

Hmm. Okay, I tried to adjust the values for about half an hour now, also importing the grass from the unreal scene into unity to have something to compare of.

There is a difference :/
It's like in Unity the upper part is stiff, always pointing upwards, and these tips do not follow the wind direction They move towards the side, but it does not sway. In Unreal, the original graph, is fully "straightened" towards the given direction.