Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Animating textures; how?
Topic Started: Nov 10 2007, 08:11 PM (256 Views)
gmfreaky
Advanced Member
[ *  *  * ]
Hi, here's my second question, how can i use a animated texture on a .3ds file?
i have 2 textures in bmp format, how can i use them on the model?

Gmfreaky ;)
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
You can use SetMaterialStageTexture(...) to switch between the two textures. For that purpose you'll have to load them through LoadTexture(...). For more information about SetMaterialStageTexture(...) refer to the help file.
Offline Profile Quote Post Goto Top
 
gmfreaky
Advanced Member
[ *  *  * ]
Thanks, but i don't really get it. The problem is that i don't know what stages are and how to change them in my modelling program. Can't you just set the texture of a model?
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
Yes, you can and SetMaterialStageTexture(...) is exactly the function you need for this purpose ;) . E.g. if the material you want to change the texture for is called "Material1" and the textures you want to be used for it as animation have the indices 111 and 112 (load them through LoadTexture(...)), then you could use this code for animating it:
Code:
 
// Model object step event
if(texture==0){
   SetMaterialStageTexture(GetMaterialIndex("Material1"),0,111);
   texture=1;
}
if(texture==1){
   SetMaterialStageTexture(GetMaterialIndex("Material1"),0,112);
   texture=0;
}
Offline Profile Quote Post Goto Top
 
gmfreaky
Advanced Member
[ *  *  * ]
thanks! i figured it out. In future, can you make a easier variation of this function called

SetCurrentTexture(material,textureindex)

??
Offline Profile Quote Post Goto Top
 
Andrew75
Member Avatar
Andrew75
[ *  *  *  *  *  * ]
http://forum.ultimate3d.org/index.php?showtopic=680

theres alot of info in my anamated texture questions. make sure u real over it nice and good .
Posted Image
(SONIC CD REMIX)
check out my vids
http://www.youtube.com/profile?user=tuxmask75
Check out our projects vids
http://www.youtube.com/profile?user=AXSXProject
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply