Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Materials / Keyframe texture?
  RSS 2.0 ATOM  

Keyframe texture?
Rate this thread
 
54172
 
Permlink of this thread  
avatar
  • Total Posts: 194
  • Joined: 11 March 2011 08:40 AM

I’m wondering how this situation would be approached. I’m far from this level of experience so I don’t need a detailed answer.

how would one go about having a texture change occur?
so say for 30 frames objectA is blue, then it becomes red. Is that something you’d just want to do some special effect for? or say I want a texture that constantly moves over the surface.
I also heard some jitter about condition nodes working this way, I sort of get that idea....



Replies: 0
avatar

You can do this more than one way. There is a ‘Blend Colors” utility node that can be placed in a shading network that will allow you to blend some percentage of two colors (or images). The change can be gradual or abrupt.

But the simplest is to just key the color. Do this:

Make a sphere (or whatever), then use Render -> Lighting/Shading -> Assign New Material
(because you cannot change much of the default material properties) to assign a new shader, say a Lambert.

Move the time slider (along the bottom row) to 1, select the sphere, then the tab that says “lambert2”. Click on color and pick red, then right-click on the word “Color” and choose “Set Key” from the menu that pops up.

Move the time slider to 16. Click on the color again and pick blue. Right click on the attribute name ("Color") and choose Set Key again.

Now you have the object being set to red at frame 1, and blue at frame 16. Play the animation and you will see it smoothly change from red to blue, with various shades of purple in-between.

To get an abrupt transition, you can change the tangents in the graph editor (complicated) or add another key of red at frame 15. After doing this, the color will red at the start, and stay red through frame 15. At 16, it will change to blue and stay that color.

Many (maybe most) attributes in Maya are keyable, and anything keyable can be set to change based on time.

<* Wes *>



Replies: 0
avatar

Thanks ^^

I didnt know colors of the shaders were keyable.

would this work for files as well?



Replies: 0
avatar

I never tried that, but I don’t think so. I use the Blend Colors utility node and key the blend amount for that. It is a few more steps, but it does a nice job.

There are some other things that could be done… one would be to make a texture image where half was your one color/pattern and the other half had the other. You could make the UVs cover just half of the image and then key the U and/or V offset in the place2dTexture node to cause the UVs to be placed on either half (you could also allow it to transition a bit at a time, like for a tube filling with liquid).

<* Wes *>



Replies: 0
avatar

awesome idea. thanks ^^



Replies: 0