View Single Post
Old 6th December 2005, 09:45 PM   #1
roninlord
Junior Member
Junior member
 
Join Date: Dec 2005
Posts: 1
Default Drawing colored vertices

Hi all,

I have a seemingly simple problem that's left me stumped. What I want to do is display 3D points (x,y,z) each with a different (r,g,b) color. The number of points can be as high as 10^5. Ideally I'd like a script, like Scott Nelson's in the "Resources" page, that inputs a set of xyz points and returns an .ac file.

Now Scott's script lets you display plain xyz points by defining a large set of vertices and leaving out the "usual" surface facet info. But it seems like the ac3d file format does not support coloring those vertices in the viewer and only supports coloring facets. Now I can write a script to draw a small colored tetrahedron (it's less rendering work than for a sphere) or something like that for *each* point, but that requires something like 30 lines of ASCII for each point (for defining the 4 vertices and 4 surfaces of each tetrahedron) which makes for an *extremely* bloated .ac file and several minutes of file loading before you get something that's just so-so.

My question is: Is there an better way of doing this? It seems like an annoyingly primitive problem with a simple solution. I'm hoping my struggles with this are only because I'm a newbie with ac3d.
Thanks in advance,
~R
roninlord is offline   Reply With Quote