Oky, so in this case one would need a seperate texture for each tread
with a material proxy that references the entity it is bound to, to get
the amount of offset to do. My next question would be... Lets say I have
two tanks ont he screen. Does the each tank get it's own instance of the
texture and/or material proxy? What I'm worried about here is one tank
is moving while the other is stationary; but, since they share the same
texture handle both treads appear to be moving.
Just did a test where I breaked at the material proxy init and the
onbind. Each seperate entity appears to use the same instance of the
proxy, and calls bind seperatly. Is there a way to force each entity to
use it's own instance of the material proxy?
James
Jay Stelly wrote:
A material proxy is the easiest way. You can animate the UV coordinates
easily as long as they are using a continuous tiling loop in texture
space or at least a looping repeatable section.
The easiest way to modify the UVs from a proxy is to set the value of
the basetexturetransform from the proxy.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
James Sapara
Sent: Wednesday, September 28, 2005 9:42 AM
To: [email protected]
Subject: [hlcoders] Tank Treads
Hi,
I'm working on making a tank vehicle for sourcesdk. I
attempting to determine the best way to make animate tank
treads within source. My options seem to be:
1. Animate the treads geometry. To make this look good I have
to have a fair amount of extra geometry.
2. Create a materialproxy that somehow links to the vehicle
class to get how much rotation there should be. Offset the
texture for the treads with in the texture to simulate movement.
3. Somehow move the UV coords for the textures on the tank
treads. Is it possible to make an animation that doesn't move
vertexes, but uv's instead? Perhaps there's a programatical
way to access and adjust uv's within the engine?
I'd appreciate any help in the matter. If I find a
satisfactory solution I'll probably make a tutorial of the process.
James
_______________________________________________
To unsubscribe, edit your list preferences, or view the list
archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders