View Full Version : animate change of shaders
superblack 05-22-2008, 12:05 AM hi all,
i'm looking for solution this: i have multiple objects with shader A (silver). now i would like to change to shader B (glass), one after the other. like a wave going through. unfortunately the objects are not clones...
thanks, for any help.
sascha
|
|
Zmurowski
05-22-2008, 10:03 AM
Few solutions I could think of:
1)render two animations, each with different shader, than put them together in postproduction and animate a mask
2)Use a layer shader then put the Shader A at the bottom of the list, add a gradient above it and set it to Layer Mask, and then put Shader B on the top (both A and B shader in normal mode). Now animating the gradient will swap the two shaders in the layer. If you want the wave to move through all the clones as if they were one object you just need to map this texture properly.
Hope it helps
superblack
05-22-2008, 11:05 PM
hi Zmurowski
Use a layer shader then put the Shader A at the bottom of the list, add a gradient above it and set it to Layer Mask, and then put Shader B on the top (both A and B shader in normal mode).
this sounds like what i need. but i was only able to do this in each texture channel. i can't find out how to do it with a full shader that uses several channels.
thanks for your help...
sascha
sismik
05-22-2008, 11:23 PM
In the object manager, choose the Texture Tag of the material you want to change. Look in the attributes Manager and find the MATERIAL parameter. Place a keyframe on that one. Advance the timeline where you want the shader change to be complete, drag the new shader in the Material box and add another keyframe. C4D will mixe from one shader to the other in the number of frame you specify. Hope it is clear enough
Sorry for my english
Good luck
Martin
GruvDOne
05-23-2008, 01:05 AM
In the object manager, choose the Texture Tag of the material you want to change. Look in the attributes Manager and find the MATERIAL parameter. Place a keyframe on that one. Advance the timeline where you want the shader change to be complete, drag the new shader in the Material box and add another keyframe. C4D will mixe from one shader to the other in the number of frame you specify. Hope it is clear enough
Sorry for my english
Good luck
Martin
This would require a separate set of keyframes for every object that needed to change, and since the OP wants them to change in contagion, this could get very, very tedious. There might be another workaround involving the use of a Fracture Object and a Multi-Shader, but I think it too has limitations that wouldn't serve your need.
Indeed the best way was probably the first suggested. Render two passes, one with each material on your objects and then animate a mask in After Effects (with a bit of a feather so it looks natural) to change between the two looks.
To save render time, you could, on your second pass give everything but these objects a compositing tag that will make the rest of the scene invisible to camera, but visible to reflection. At the same time, put a composting tag on your shader-changing objects and use the object buffer and render that buffer out in Multi-Pass. That way, in AE you can use the buffer pass as an matte for your objects, and apply the animated mask. This will result in the desired objects changing as you would like, without affecting the background.
HTH
Will
sismik
05-23-2008, 01:17 AM
I agree with you Will that it can be complicated in some circumstance, but often, you can simply animate one and copy the tag to all your objects or, if you have the chance to put all objects under a parent and have the shader only on the parent (depending if you need a special mapping). You advice is very good Will, thanks for sharing
Martin
laughingtotem
05-23-2008, 01:21 AM
an invisible object triggering the proximal work?
Oops... Never mind. I though I remember someone using proximal in the transparency channel to achieve this effect, but I just tried it and it doesn't seem to work...
GruvDOne
05-23-2008, 02:15 AM
I agree with you Will that it can be complicated in some circumstance, but often, you can simply animate one and copy the tag to all your objects or, if you have the chance to put all objects under a parent and have the shader only on the parent (depending if you need a special mapping). You advice is very good Will, thanks for sharing
Martin
Right, and you could also drag the sequences for each shader to achieve the offset look.. but I think there is less work involved with doing in post. Plus, doing it in post allows you timing flexibility without having to re-render in Cinema :)
laughingtotem
05-23-2008, 03:01 AM
stack your metal and glass shaders on the object and use the proximal shader in the alpha channel of thr top material.
Darter
05-23-2008, 09:49 AM
Assuming that you want the effect to be cumulative, this expression might be useful. It's a modification of my old Sequential Visibility (http://forums.cgsociety.org/showthread.php?t=492607) expression.
User Data are on the XPresso tag.
superblack
05-25-2008, 10:31 PM
Thanks a lot everybody for your help! Sorry for not being very "responsive" the last days ...
... in the attributes Manager and find the MATERIAL parameter. Place a keyframe on that one. Advance the timeline where you want the shader change to be complete, drag the new shader in the Material box and add another keyframe. C4D will mixe from one shader to the other ...
Great! Didn't know this works ... I'm still doing animatics and edit, so this perfect for now.
Indeed the best way was probably the first suggested. Render two passes, one with each material on your objects and then animate a mask in After Effects
To save render time, you could, on your second pass give everything but these objects a compositing tag that will make the rest of the scene invisible to camera, but visible to reflection.
Yes, i think i will go this route for the final renderings.
stack your metal and glass shaders on the object and use the proximal shader in the alpha channel of thr top material.
Haven't had time to try this ... :-(
Assuming that you want the effect to be cumulative, this expression might be useful. It's a modification of my old Sequential Visibility (http://forums.cgsociety.org/showthread.php?t=492607) expression.
Thanks Darter for sharing this. Works great... :-)
Really great to see all the different options. Thanks again everybody!
sascha
CGTalk Moderation
05-25-2008, 10:31 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.