Jump to content

Offset Pulse timing


mstarktv

Recommended Posts

I ran into a roadblock here inside of VEX. I'm trying to take the scale of these sphere and have them pulse. This is more for a visual aid for now as I want to take the spheres and plug them into a Shader's Emission so that the light pulses. Baby steps...

However, in the meantime before I normalize them, I'm trying to get it so that each sphere kind of pulses at a random point in time. If you look, the scale of each is randomized, but I can't figure out how to randomly offset the pulsing so that it happens uniquely. I attached the file and an animated gif to help out! Excuse my messy VEX - I was going for as random as possible.

pulsing.gif

scale_pulse.hiplc

Link to comment
Share on other sites

34 minutes ago, Dave Stewart said:

Take a look at this Michael, just added the @ptnum value to your @Time expression to offset time for each point. Seems to achieve the effect you're looking for. Also multiplied @ptnum by a random number to spread the time offset values out further.

--Dave

scale_pulse_DStewart.hiplc

Dave,

This is exactly what I was trying to do. Thank you so much! I was trying every way around to get this result. Hence the 3 lines of "@pscale." I appreciate it!

Link to comment
Share on other sites

1 hour ago, mstarktv said:

Dave,

This is exactly what I was trying to do. Thank you so much! I was trying every way around to get this result. Hence the 3 lines of "@pscale." I appreciate it!

Glad to help Michael, Vex is still kicking my butt as well! Can only handle it in small doses... ;)

--Dave

Link to comment
Share on other sites

I'm in the same boat as you. I can't remember how I did things in the past already - weeks ago. I somehow used @P to connect a point's position to the shader. However, I can't remember How I did that, now. I'm trying to connect the scale to the @Cd. :) I think half my time is re-figuring out how I did something.

edit***
And I found my problem. I packed the spheres before coloring the points. Oops. I wonder if I can transfer the packed geo's point color to it's detail/surface/shader...etc.

Edited by mstarktv
solution
Link to comment
Share on other sites

This is pretty easy, see attached. The Mantra Surface and Principled shaders both have a "use packed color" option in the Diffuse section, which grabs the color values from the points that represent each packed primitive. This example applies random colors to the points after packing, which seems to work just fine. Wonder if there's a way to see this represented in the viewport vs. at render time?

--Dave

DStewart_PackedGeo_RandomColors.hip

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