Jump to content

vex variables


MENOZ

Recommended Posts

hello, i'm trying to understand vex shaders.

in turbulent node vex node i have a P input parameter. what is it exactly?

should i put the P from global variables to P of turbnoise? if i do that my texture will not follow the surface of my object.

if u use S and T, with a float to vector node, i will have discontinuities on the seams.

can you help me please?

thanks!

Link to comment
Share on other sites

You are so close...

P is just a point position that drives the noise.

Global P is the point position of the shaded point, BUT it comes in in camera space (or think of it as world space)

Use a transform vop to convert it to object space first then feed it to your noise vop. That should make it stick.

Link to comment
Share on other sites

You are so close...

P is just a point position that drives the noise.

Global P is the point position of the shaded point, BUT it comes in in camera space (or think of it as world space)

Use a transform vop to convert it to object space first then feed it to your noise vop. That should make it stick.

so global P is looped along all the points of the surface, and at each point it return a different value.. and the noise function takes this vaule at each point to make his operations..

and this is also true for the S and T coords, i think.

because if i use a texture vop, and i feed it with a constant vop it generate stripes, because at each point being sampled, the texture vop alwais takes the same "position", so it return alwais the same value.

it's correct?

with a transform vop it works whe i render! thenks. but there is a way to stick the texture in the shader view too? it continue to be in camera space.

thank you!

Link to comment
Share on other sites

so global P is looped along all the points of the surface, and at each point it return a different value.. and the noise function takes this vaule at each point to make his operations..

and this is also true for the S and T coords, i think.

because if i use a texture vop, and i feed it with a constant vop it generate stripes, because at each point being sampled, the texture vop alwais takes the same "position", so it return alwais the same value.

it's correct?

with a transform vop it works whe i render! thenks. but there is a way to stick the texture in the shader view too? it continue to be in camera space.

thank you!

correct

as for the shader view, I assume you mean the shader ball? yes from memory I think that never sticks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...