Skip to main content

ColorModel/Recoloring Verticies

2 replies [Last post]
tpittman
Offline
Joined: 2004-08-12
Points: 0

Hello Board,

I am building a topographic model which is colored per vertex using its height as a parameter. At a later time, it is necessary to recolor this. For the moment I am going through each vertex and entering new colors. This is quite slow for a large data set.
Is there a way to use something similar to a IndexedColorModel from 2D? Could each range of colors could be assigned an index and then the referenced Color changed instead of assigning it directly per vertex?

Any advice would be much appreciated.

Travis

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mnjacobs
Offline
Joined: 2003-06-13
Points: 0

Travis, For an example of indexed colors for a terrain, have a look at the September JDJ article: http://sys-con.com/story/?storyid=46231&DE=1. The FractalWorld example uses color indices. I have not tried to change the colors at runtime.

Mike

tpittman
Offline
Joined: 2004-08-12
Points: 0

Thank you Mike for the post back. I am taking a look at the articles now. My issues come when changing colors at runtime, I will keep an eye peeled when reading the articles for any hints on this.

Cheers,
Travis