Vertex Offset Animation & World/Object Position

Node-based Shader Editor

Vertex Offset Animation & World/Object Position

Postby samdpt » Wed Oct 03, 2018 9:17 pm

Hi. I'm trying to make a simple up and down motion by offsetting the vertex up the Y axis.

I'm essentially multiplying a Sin Time node by World Position, and then multiplying this by a float which is my Offset Amount. For some reason, using World Position Y doesn't move anything up Y. Either axis just offsets everything at like a 45 degree angle. Any kind of axis offset does this. By using a component mask after World Position and using just YZ, I can get a near perfect up and down movement but not quite. What's the deal? Why isn't the Y offset correlating with the Y axis of Global or even Local object space??

Thanks
samdpt
 
Posts: 5
Joined: Wed Oct 03, 2018 9:13 pm

Re: Vertex Offset Animation & World/Object Position

Postby Ricardo Teixeira » Wed Oct 03, 2018 9:29 pm

samdpt wrote:Hi. I'm trying to make a simple up and down motion by offsetting the vertex up the Y axis.

I'm essentially multiplying a Sin Time node by World Position, and then multiplying this by a float which is my Offset Amount. For some reason, using World Position Y doesn't move anything up Y. Either axis just offsets everything at like a 45 degree angle. Any kind of axis offset does this. By using a component mask after World Position and using just YZ, I can get a near perfect up and down movement but not quite. What's the deal? Why isn't the Y offset correlating with the Y axis of Global or even Local object space??

Thanks


Hey there, we would be happy to help!

Can we see the shader created and an example of what you currently have?

Thanks!
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Vertex Offset Animation & World/Object Position

Postby samdpt » Thu Oct 04, 2018 3:14 pm

Yes thanks for your swift reply.

Here is a screenshot of my shader graph:
https://drive.google.com/file/d/1w3oqUdFrCuhhJMdoFX-_1OnzFxOAqzIx/view?usp=sharing

Here is a video of result:
https://drive.google.com/open?id=1wy1uthR5762DDSypRpf8_R08uTMsD6Vk

The effect i'm looking for from this part of the graph is for the Mesh to move up and down the Y axis (bobbing). In my graph, you can see i'm using World Position, then Masking to only use YZ, that gives me CLOSE to up and down but there's still a weird angle. If I use just the Y, or just the X, or just the Z, I get a 45 degree angle. I've also tried Object to World, and other similar nodes. The Mesh itself does not have any rotation applied. In-editor, Y is up locally. So how can I control the offset direction??

Thanks
samdpt
 
Posts: 5
Joined: Wed Oct 03, 2018 9:13 pm

Re: Vertex Offset Animation & World/Object Position

Postby Ricardo Teixeira » Thu Oct 04, 2018 3:19 pm

samdpt wrote:Yes thanks for your swift reply.

Here is a screenshot of my shader graph:
https://drive.google.com/file/d/1w3oqUdFrCuhhJMdoFX-_1OnzFxOAqzIx/view?usp=sharing

Here is a video of result:
https://drive.google.com/open?id=1wy1uthR5762DDSypRpf8_R08uTMsD6Vk

The effect i'm looking for from this part of the graph is for the Mesh to move up and down the Y axis (bobbing). In my graph, you can see i'm using World Position, then Masking to only use YZ, that gives me CLOSE to up and down but there's still a weird angle. If I use just the Y, or just the X, or just the Z, I get a 45 degree angle. I've also tried Object to World, and other similar nodes. The Mesh itself does not have any rotation applied. In-editor, Y is up locally. So how can I control the offset direction??

Thanks


Can we see the full shader?

Have you had the chance to check our extrusion sample?

Thanks!
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Ricardo Teixeira
 
Posts: 954
Joined: Fri Aug 09, 2013 2:26 pm

Re: Vertex Offset Animation & World/Object Position

Postby samdpt » Tue Oct 09, 2018 2:04 pm

Ya I have checked out the Extrusion example. Even the extrusion seems to extend on a strange 45 degree angle from the normal.

Here is current state of my shader: https://drive.google.com/file/d/1pStIkmagg2RMNQ3SusOznTJcXhacuCFk/view?usp=sharing

Here is the effect i'm trying to make: https://drive.google.com/open?id=1Z0p9RBhqS2xWhTO9R_FAGe_w1DM3ypcS

The problem is no matter what I try in terms of Local Vertex Offset, the mesh will always move at a 45 degree angle. What i'd like to for the 5 cells/balls/particles to move erratically in circles (on a defined path of course). For this i'm masking out the UV islands for each ball and what I'd like to be able to do is offset the vertex position of each ball with a time node, so that it moves around something like a circle path. Plugging in the Y axis of Vertex Position or World Position doesn't actually move my vertices up the Y or anything. So i'm struggling to understand how this functions.

Thanks!
samdpt
 
Posts: 5
Joined: Wed Oct 03, 2018 9:13 pm

Re: Vertex Offset Animation & World/Object Position

Postby Amplify_Borba » Tue Oct 09, 2018 2:29 pm

Hello! Could you please share a simple sample of what you've built so far privately through [email protected], so that we can run some tests on our side using the same data that you're using? Please include shader, material and any custom meshes that you're using, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Vertex Offset Animation & World/Object Position

Postby samdpt » Tue Oct 09, 2018 2:41 pm

I can do this but first let me just post this screenshot: https://drive.google.com/open?id=10pOYTkwMwxSTYebEZrGc01LUg1qTUHgB

I'm just using the stock Unity sphere and this is the shader. It's stretching at an odd angle, not up it's Y. I just need to understand what this behavior is.
samdpt
 
Posts: 5
Joined: Wed Oct 03, 2018 9:13 pm


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 46 guests