Jump to content

How to get the current time in vex shaders?


magneto

Recommended Posts

I was trying a small idea with a vex shader network to accomplish rotating UVs using Time. But I couldn't find any VOP(?) for this?

Basically I want the UVs to rotate through time. So they will be animated but inside the shader, not via keyframes. Just a simple idea I wanted to try to learn about the vex shaders, etc.

Thanks guys.

Link to comment
Share on other sites

I was trying a small idea with a vex shader network to accomplish rotating UVs using Time. But I couldn't find any VOP(?) for this?

Basically I want the UVs to rotate through time. So they will be animated but inside the shader, not via keyframes. Just a simple idea I wanted to try to learn about the vex shaders, etc.

Thanks guys.

you have shading time in your global variables, doesn't it work?

Link to comment
Share on other sites

you have shading time in your global variables, doesn't it work?

Thanks Ehsan, found it. I was looking at their existing globals which were separated. So one node had "surface position", the other had "parametric s coordinate".

I expected all the globals to be in the same node. So I now saw it when I added the Global variables node.

Link to comment
Share on other sites

Thanks Ehsan, found it. I was looking at their existing globals which were separated. So one node had "surface position", the other had "parametric s coordinate".

I expected all the globals to be in the same node. So I now saw it when I added the Global variables node.

VEX is generally timeless. The time from globals Vop is a normalized sample time in shutter opened period. To animate anything in VEX you need to provide time parameter externally, like any other user's parameter. So you make a float, animate it with channel, but VEX sees a single value of evaluated channel at a current *Houdini* time.

Edited by SYmek
Link to comment
Share on other sites

VEX is generally timeless. The time from globals Vop is a normalized sample time in shutter opened period. To animate anything in VEX you need to provide time parameter externally, like any other user's parameter. So you make a float, animate it with channel, but VEX sees a single value of evaluated channel at a current *Houdini* time.

Thanks Symek. Can't wait to try this out.

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...