Jump to content

[help] Animating the emission intensity of a shader


Recommended Posts

Hello,

I am creating this circuit board type of effect (see attached render) using a black and white image (attached with this post) in the emission node of my shader. Everything seems to work fine but I was wondering if there was a way to animate the intensity of the emission. I want to give it like a pulsating or a traveling light effect.

Is there a way to achieve this?

Thanks!

 

render.jpg

circut14.jpg

Link to comment
Share on other sites

In TOP view draw a curve that matches the circuit path you want to highlight. Then have a point or small sphere travel along the curve. Assign an emit shader to that geo object. You may try adding a Trail SOP to it as well and enable motion blur.

 

You can also animate the Emission intensity of the Mantra Shader as well.

Edited by Atom
Link to comment
Share on other sites

26 minutes ago, Atom said:

In TOP view draw a curve that matches the circuit path you want to highlight. Then have a point or small sphere travel along the curve. Assign an emit shader to that geo object. You may try adding a Trail SOP to it as well and enable motion blur.

 

You can also animate the Emission intensity of the Mantra Shader as well.

I was wondering how to animate the intensity of the mantra shader. Couldn't figure it out. :(

Adell269.hipnc

Link to comment
Share on other sites

Would just be like adding a keyframe to anything else in houdini. If you don't know how to do that, alt-left click intensity and it should set a keyframe to where you are in the timeline. If you want to mess with the keyframes after you set them, shift-left click on intensity and it will bring up the animation editor. If you are familiar with any other 3d package, this should look similar to you.

Now if that is all stuff you already know, I apologize. From the way your post was worded, it sounded like you were unsure. For doing a trail of glow, I would definitely go the point with a trail sop look and control the fade with a ramp.

-Ryan

 

Link to comment
Share on other sites

With a low-roughness noise you can pass that through the amplitude as the intensity of the shader and mult that into the texture. If you need something smarter (like lines having animated emission running down the wires), I'm not sure how you could set that up in shader alone. You might even be able to get away with a circular offset of noise in shader and that would be close enough to trick the viewer into thinking they see the emission running along the wires rotationally... You'd most likely have to add an extra procedure in sops using that image though, then pull that into shops, to get a real nice 'running along the wires' effect, but someone more knowledgeable might have an idea for shops only method

Link to comment
Share on other sites

4 minutes ago, rbowden said:

Would just be like adding a keyframe to anything else in houdini. If you don't know how to do that, alt-left click intensity and it should set a keyframe to where you are in the timeline. If you want to mess with the keyframes after you set them, shift-left click on intensity and it will bring up the animation editor. If you are familiar with any other 3d package, this should look similar to you.

Now if that is all stuff you already know, I apologize. From the way your post was worded, it sounded like you were unsure. For doing a trail of glow, I would definitely go the point with a trail sop look and control the fade with a ramp.

-Ryan

 

Oh thanks for that! :) I didn't realize I could simply key-frame it. I was looking for like a node or a map slot to attach to the intensity.

Link to comment
Share on other sites

13 minutes ago, TheDude said:

With a low-roughness noise you can pass that through the amplitude as the intensity of the shader and mult that into the texture. If you need something smarter (like lines having animated emission running down the wires), I'm not sure how you could set that up in shader alone. You might even be able to get away with a circular offset of noise in shader and that would be close enough to trick the viewer into thinking they see the emission running along the wires rotationally... You'd most likely have to add an extra procedure in sops using that image though, then pull that into shops, to get a real nice 'running along the wires' effect, but someone more knowledgeable might have an idea for shops only method

Thanks for the idea !:)

And yea I agree. The shader alone won't be able to pull it off. I am in the process of drawing curves on those circuit lines and hopefully I can figure out how to align a primitive on the curve and make it move.

 

Link to comment
Share on other sites

Nice! With curves, if you slap a uv on it, you can get a 0 to 1 value of the location on the curve, just bring that into shops and you can do a lil artistic ramp of where you'd like it to be the brightest. Also to build a curve procedurally out of that map, it could be faster to scatter on the Cd, connect points within a certain distance and smoothing it out a bit and converting to curve -- theres a lot of wires there, could take a while manually, but would no doubt be cleaner

Link to comment
Share on other sites

28 minutes ago, TheDude said:

Nice! With curves, if you slap a uv on it, you can get a 0 to 1 value of the location on the curve, just bring that into shops and you can do a lil artistic ramp of where you'd like it to be the brightest. Also to build a curve procedurally out of that map, it could be faster to scatter on the Cd, connect points within a certain distance and smoothing it out a bit and converting to curve -- theres a lot of wires there, could take a while manually, but would no doubt be cleaner

why not trace it instead ?  There's a TRACE SOP node for that.

  • Like 1
Link to comment
Share on other sites

34 minutes ago, 6ril said:

why not trace it instead ?  There's a TRACE SOP node for that.

actually the Trace SOP worked out well, now I have the whole thing in polygons and Im testing another thing. But I am unable to figure out how to attach a ramp/noise/similar node into the color or intensity of the shader. For the color, i only have the option of a solid color and for the intensity, i only have a float value.

Link to comment
Share on other sites

Hey captain,

if I were you, I'd go the SOP way, more work, but far better results. By SOP way I mean not using a shader map for the emission, I know for a fact that if you use a concentric ramp to drive your emission, the effect will be very poor visually.

There's other way to achieve this with shader tricks, but I'm convinced that you will have better control if you manage to separate each "line" and have it like a path. Maybe a foreach job.

anyway, here is a hip file, with what I recommend NOT to do, but it might help you understand how to use COP image animation to drive your emission.

*WARNING* ugly results ! ;)

Adell269+6ril.hipnc

Edited by 6ril
  • Like 1
Link to comment
Share on other sites

I'm going to cook dinner now, but if you need more help, I'll do my best (beginner level here), later.

the carve node comes to mind for animating the pulse along a path (never used it yet), as it might avoid animating a point along a path + trail...   just an idea...

Link to comment
Share on other sites

well, I'll do my best to help (and learn at the same time)

now I would need info in order to help you. What logic are you looking for, for the travelling light effect? Something precise, or anything that looks "cool" ?

Do you just want it as an animated Fx, or will you need it to be sync to the music (like the boxes) ?

 

Edited by 6ril
  • Like 1
Link to comment
Share on other sites

12 minutes ago, 6ril said:

well, I'll do my best to help (and learn at the same time)

now I would need info in order to help you. What logic are you looking for, for the travelling light effect? Something precise, or anything that looks "cool" ?

 

I'm also looking forward to learn as I just started using Houdini 3 months ago. :)

Initially I was thinking I'll have a traveling light effect but I did some manual tests in Nuke + maya and realized there would be too much happening on the screen as the main focus should be on the boxes in the middle. 

Now, I am thinking that I'll keep the carve effect and maybe start the video by having the circuit board "reveal" itself and then the boxes start moving with the music and then the intensity of the circuit board emission can spike a bit when the music hits some high note. I was thinking of manually animating the emission intensity but wondering if there is a more efficient(maybe procedural) way to do this.

 

PS: I really appreciate you spending time on my file :)

Edited by CaptainAhoy
Link to comment
Share on other sites

I was messin around with your file, and ended up with the carved lines + a polywire (very small : 0.05 wire radius) merged with the same trace.... blahblah -> better look at the hip file attached ;)

Ok I see what you want. And since you've already played with CHOP (music), you shouldn't have trouble linking the music to the emission intensity, right ?

One important function you will need is----> op:

Use data from a node instead of a file (op:)

here is the help about it : http://archive.sidefx.com/docs/houdini15.0/io/op_syntax

in your case, it would look like this :  op:`opfullpath('../../obj/music/limit1')`      I choose limit1, but you should choose the appropriate node of your CHOPnetwork

so this is to be entered in the map slot of the emission in the floorcircuit shader.

Adell269+6ril+.hipnc

circuittest.jpg

Edited by 6ril
  • Like 1
Link to comment
Share on other sites

Glad I could help :)

I've learned a bit in the process (first time I use trace and carve)

 

If I were you, I would draw the circuit by hand (using the trace as a guide) to have perfect path. Or at least use a better and modified image (with circuit path connecting nicely to the box)... Depend on your deadline tho...

 

Link to comment
Share on other sites

Tried my usual cheap trick of scattering, animate the uv, attrib interpolate.

I've attached 2 versions, one which converts the points to geolights, the other version just transfers the colour of the points back onto the lines (limited render power at home... :)  )

circuitboard_v01.hipnc

 

circuitboard.gif

 

Ah, also don't forget about houdini's neat trick of shader attribute overrides. You almost take for granted that colours on your geo ( @Cd ) will show up in the render. That's because most of the default shaders have an option, 'use point color' enabled, so if your geo has Cd, it will override the material color.

This applies for _any_ property on a shader. If you hover on the title of a material parameter, it will tell you the internal parm name. If you have a point attrib with the same name, it will override the material property, just like how Cd overrides the material colour.

That said emission from materials can be noisy. Converting to a geo light can be less noisy, but still noisy. Another alternative is to instance a light onto your moving points, with a small active radius and no shadows, that should be noise free and fast to render. All methods are in the following hip file.

circuitboard_v02.hipnc

circuitboard_alt_methods.gif

  • Like 4
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...