realbasic-games
[Top] [All Lists]

Re: Vertex Colors

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Vertex Colors
From: Joseph Nastasi <joe at pyramiddesign dot us>
Date: Wed, 14 Dec 2005 08:43:48 -0500
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <328800874cbf85936b626c9b2d927a39 at pyramiddesign dot us> <a0620070abfc4ba334e7e at [10 dot 0 dot 1 dot 4]> <b7863075141cbd28afc3ae4791b95116 at pyramiddesign dot us> <a06200714bfc4dd3782d0 at [10 dot 0 dot 1 dot 4]> <3dd65603df103e3ba5ccbadc6660d259 at pyramiddesign dot us> <a06200717bfc4e91149f6 at [10 dot 0 dot 1 dot 4]> <A656087A-51F9-4F6C-8C8D-844AB1DE75A4 at chaoticbox dot com> <a06200719bfc51123ada6 at [10 dot 0 dot 1 dot 4]>

On Dec 13, 2005, at 7:01 PM, Joseph J. Strout wrote:

At 5:12 PM -0500 12/13/05, Frank Condello wrote:

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).

That's a good point. AddRGBtoAll is more useful when you have a multicolored mesh, and want to (say) tint it red by adding 50 to the red component of all colors.

What I'm aiming for is a particle generator that uses a single triangle its base (in addition to a quad with a texture which I have now), so I can change the color as the particle's lifetime increases. For me it's to simulate flames whose particles will go from yellow, orange and red to black. It's the simplest geometry, but there will be dozens in a particle system. So it sounds like I'd define a texture (Material), but instead of loading an image with a mask, I'd just update DiffuseColo.

This is nicer because I can use a quad and just add some additional logic to my current particle system.

Thank you both!
--
Joseph Nastasi
Pyramid Design - a software development firm
http://www.pyramiddesign.us
Voice 609 601-0814      Fax 609 601-0815
Products:
A-OK! Spacecraft Simulation System - http://aok.pyramiddesign.us
A-OK! The Wings of Mercury http://www.aokwom.com
FTP Suite for REALbasic - http://ftpsuite.pyramiddesign.us
Columnist for REALbasic Developer Magazine
Proud Sponsors of REALbasic Olympics 2005




_______________________________________________
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>


<Prev in Thread] Current Thread [Next in Thread>