Duke4.net Forums: Is it possible to assign an animated texture as a model skin? - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Is it possible to assign an animated texture as a model skin?

User is offline   Sobek 

  • There's coffee in that nebula!

#1

Hello again,

I think the topic about explains my question. I tried defining a tile as an animation and setting a model to use that tile as it's texture but that didn't work. Is it actually possible to animate a model's skin?

:P
0

User is offline   Danukem 

  • Duke Plus Developer

#2

You could have a different skin for each frame of animation, then define each skin as a different pal (pick numbers > 24 so as not to overlap with tints), then have some CON code that cycles the pal of the model. Or do the same thing but with different tile numbers instead of pals. Other than that, I don't know.
0

User is offline   Evil Ash 

#3

Depending on the 3D program, I know in 3D Studio Max you can keyframe material changes.... but I don't see how'd that effectively export to an MD3... Unless there was a way to change the surface ID based on keyframing...

Sorry that wasn't very helpful, haha.

If you're only looking to animate a SECTION of the model, you could do it this way, although it'd waste your polycount depending on how much needs to be animated:

  • Detach the portion with the 'animated texture' from your model, creating it as an independent piece of geometry.
  • Duplicate the new geometry for each frame of TEXTURE animation.
  • Apply a frame of your texture animation to each piece.
  • Animate your model entirely, with one of the detached geometry pieces in place (but on its own bone/dummy, but possibly linked to wherever it should stay in place to make animating easier). Each other geometry piece should have its own dummy as well.
  • Keyframe the other pieces to stay INSIDE the model, unseen to the player.
  • Once satisfied with your animation, go back through your keyframes one by one swapping out the properly placed geometry key for one hidden within the body.
  • Export and enjoy (don't forget to define all those surface textures in your DEF!)


But yeah this is incredibly time consuming and depending on how much needs to be animated is not very efficient or easy. You'd need to know a fair amount about animating in a 3D environment to tackle this without making a bloody mess. What you'd essentially be doing is cycling the model as opposed to the texture. Would be easier to implement the above, said by DeeperThought.

Just throwing this concept out there.

This post has been edited by Evil Ash: 28 April 2010 - 08:30 AM

0

User is offline   Sobek 

  • There's coffee in that nebula!

#4

View PostEvil Ash, on Apr 29 2010, 02:57 AM, said:

Depending on the 3D program, I know in 3D Studio Max you can keyframe material changes.... but I don't see how'd that effectively export to an MD3... Unless there was a way to change the surface ID based on keyframing...

Sorry that wasn't very helpful, haha.

If you're only looking to animate a SECTION of the model, you could do it this way, although it'd waste your polycount depending on how much needs to be animated:

  • Detach the portion with the 'animated texture' from your model, creating it as an independent piece of geometry.
  • Duplicate the new geometry for each frame of TEXTURE animation.
  • Apply a frame of your texture animation to each piece.
  • Animate your model entirely, with one of the detached geometry pieces in place (but on its own bone/dummy, but possibly linked to wherever it should stay in place to make animating easier). Each other geometry piece should have its own dummy as well.
  • Keyframe the other pieces to stay INSIDE the model, unseen to the player.
  • Once satisfied with your animation, go back through your keyframes one by one swapping out the properly placed geometry key for one hidden within the body.
  • Export and enjoy (don't forget to define all those surface textures in your DEF!)


But yeah this is incredibly time consuming and depending on how much needs to be animated is not very efficient or easy. You'd need to know a fair amount about animating in a 3D environment to tackle this without making a bloody mess. What you'd essentially be doing is cycling the model as opposed to the texture. Would be easier to implement the above, said by DeeperThought.

Just throwing this concept out there.


Mmm, interesting. I pretty much understand all of what you're suggesting Evil Ash... But it'd take me a while to get the hang of that. I'm still learning as far as modeling goes so that's unfortunately a little over my head at present. Neat idea though.

View PostDeeperThought, on Apr 29 2010, 12:53 AM, said:

You could have a different skin for each frame of animation, then define each skin as a different pal (pick numbers > 24 so as not to overlap with tints), then have some CON code that cycles the pal of the model. Or do the same thing but with different tile numbers instead of pals. Other than that, I don't know.


That seems like a much easier way to go about it, but it's still an awful lot of work for something so 'simple'. I probably won't bother with it though - it's nothing critical and I was only thinking of making use of it for a few seconds at most. What I need I can probably accomplish another way with a handful of sprites, but thank you all the same :P

This post has been edited by Sobek: 28 April 2010 - 06:29 PM

0

User is offline   chicken 

  • Fashionable Modeler

#5

@Evil Ash: The problem in this case is that eduke blends the animations into each other so you will need to have the animation play with a high fps-rate.
If not you will see the individual pieces slowly moving from inside the model to the outside and vice versa (and change size).

I tried to make a roadsign with blinking arrows. At FPS 25 in the deflines it works halfway (you'll still notice it if you look closer).
At a lower rate you can see the arrows "mutate".
0

User is offline   Danukem 

  • Duke Plus Developer

#6

View Postchicken, on Apr 29 2010, 02:49 AM, said:

@Evil Ash: The problem in this case is that eduke blends the animations into each other so you will need to have the animation play with a high fps-rate.
If not you will see the individual pieces slowly moving from inside the model to the outside and vice versa (and change size).

I tried to make a roadsign with blinking arrows. At FPS 25 in the deflines it works halfway (you'll still notice it if you look closer).
At a lower rate you can see the arrows "mutate".


Use smoothduration 0.0 in the def for the frames and it will disable the animation smoothing, then you can use any fps you want.
0

User is offline   chicken 

  • Fashionable Modeler

#7

tried it like that:
anim { frame0 "FRAME1" frame1 "FRAME11" fps 1 smoothduration 0.0 flags 0 }

but no... didn't work ...
0

User is offline   Sobek 

  • There's coffee in that nebula!

#8

Isn't there also a console command (I'm sure you could disable it in the video options at one stage) to disable animation blending? Maybe something hardcoded is overriding your DEF code, kinda like Parallax maps at present.

This post has been edited by Sobek: 29 April 2010 - 06:12 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#9

View Postchicken, on Apr 29 2010, 08:35 AM, said:

tried it like that:
anim { frame0 "FRAME1" frame1 "FRAME11" fps 1 smoothduration 0.0 flags 0 }

but no... didn't work ...


In my defs I have smoothduration 0.0 in the frame commands, not the anim commands.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options