On 13-Dec-05, at 4:10 PM, Joseph J. Strout wrote:
At 3:36 PM -0500 12/13/05, Joseph Nastasi wrote:
AHA! So, I can use:
tm.VertexColors.Item(0) = &cCC0000
tm.VertexColors.Item(1) = &cCC0000
tm.VertexColors.Item(2) = &cCC0000
to set the trimesh (it's just a simple triangle.) color to a not-
so-bright red. Then use:
tm.VertexColors.AddRGBToAll -10, 0, 0
in a loop to gradually turn the color black, right?
Although the bulk per-vertex transformations are handled relatively
quickly in C++ code, Material.DiffuseColor would be much more
efficient for this situation (i.e. a solid coloured mesh changing to
some other solid colour). You may not see a difference for one or two
triangles, but even a modestly dense mesh will slow you down if
you're changing vertex colours every frame to do a fade like you're
describing.
Frank.
–––––––––––––––––––––––––––––––––
Open Source RB Goodies and Shareware
<http://developer.chaoticbox.com/>
<http://www.chaoticbox.com/>
–––––––––––––––––––––––––––––––––
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|