FORUMS: list search recent posts

Simple Expression for Beginner Question

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Alex Vlair
Simple Expression for Beginner Question
on Nov 13, 2013 at 11:28:42 pm

Hello Everyone,

I'd like to animate the "Glow Intensity" attribute in my blinn shader. Just a nice and simple looping animation that goes from 0 intensity to 100 intensity over the span of 28 frames, then back down again for another 28 frames, etc. It has to match another looping animation of 56 frames, which I already have working. I'm basically layering the glow on top of another animation.

I realize this is simple and perhaps could find it in a tutorial but I'm in a big rush on this project and the tutorials I've found seem to start with particle movements etc.

Thanks for all your help!

Alex


Return to posts index

Steve Sayer
Re: Simple Expression for Beginner Question
on Nov 18, 2013 at 3:42:15 pm

Hi, Alex. Your subject line says 'expression,' but this could be easily accomplished with keyframes. Just set your three keys at 0, 0; 28, 100; 56, 0 and then set your curve's 'post-infinity' behaviour to 'Repeat.'

If for some reason you really need to use an expression, here are a couple of options. First, a linear change:

[intensity] = 100/28.0 * (max(0, (frame % 56 - 28)) - min(0, (frame % 56 - 28)));

(As you can see, it's not exactly 'simple'... although I'm not a math whiz, so there may be a much more elegant way to accomplish this.) Next, a (much simpler) sine wave:

[intensity] = 50 * (1 - cos(frame/28*3.1416));

Hope this helps. Keep in mind, though, that it's almost always better to produce glow effects at the compositing step rather than in the 3D render itself.


Return to posts index

Alex Vlair
Re: Simple Expression for Beginner Question
on Nov 18, 2013 at 8:31:48 pm

Hi Steve,

Wow, I didn't even think about the post-infinity setting. I still have lots to learn.

I appreciate your tip about post-production. I noticed that when I render with Mental Ray, the glow effect disappears. Do you know if that's a maya software-only attribute?

It does seem as though the glow doesn't emit any photons for itself. If this is the case, I can see why you'd advise post-production.

Thanks a lot for the tips!

Alex


Return to posts index


Steve Sayer
Re: Simple Expression for Beginner Question
on Nov 22, 2013 at 7:16:28 pm
Last Edited By Steve Sayer on Nov 22, 2013 at 7:17:52 pm

Hi, Alex. Glad to help.

When we talk about glowing objects, there are two effects to consider: does the object illuminate other objects in the scene, and does it produce a bright 'haloing' effect in the camera's view?

The Maya software glow only has the second effect; it will make the object appear to bloom, halo, etc. as seen through the camera. However, it will not cast light on other surfaces in the scene. If you want to accomplish this, you will need to use an actual light source in your scene, or set up something more complex (like having the glowing object emit photons, then using those to perform a GI render with mental ray). I'm pretty sure you can get mental ray to render out a bloom, but off the top of my head I'm not sure how to do it; you probably have to create some extra nodes or shaders for it.

The reason to handle the bloom effect in post is that it's much faster and easier to fine-tune it at that stage, rather than re-render the whole scene if you decide the glow is a little too bright or a little too green, etc.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]