PDA

View Full Version : OpenGL 3D Object to DXF file



psankaranv
02-06-2002, 08:17 PM
Hi All,
I am trying to write a DXF file from a 3D object which is constructed with polygons(triangles). There are more than 1lakh triangles generated by our marching cube implementation to re construct a human face. But when I am writing the same triangles in the 3DFACE ENTITY of DXF file, the same face (with colour and shading) are not coming. I have the following doubts.
1. Is 3DFACE is the best entity to choose
2. How can I represent Colour and Normal of each triangle

Please help me by providing some clue on this area.

Thanks in Advance
Sankaran

Rob The Bloke
02-08-2002, 05:46 PM
I can't help you with the bug in your code, but I can tell you that DXF files don't support normals, texturing coords or vertex colours.

psankaranv
02-10-2002, 06:52 PM
Hello
Actually It is not a bug of my code, since the marching cube will produce that much triangles without doing the decimation. My doubt persists ! then How can I store colour in a DXF file ?? suppose a BLUE coloured face.

Thanks in advance
Sankaran

Syslock
02-10-2002, 08:31 PM
I think DXF files are only limited to 16 colors, according to
some kind of system palette. I don't think you can specify
RGB colors.

If you don't need DXF, I recommend switching to OBJ, which has
everything you need.