POV-Ray : Newsgroups : povray.general : export set of triangles to 3DS : Re: export set of triangles to 3DS Server Time
10 Aug 2024 09:16:17 EDT (-0400)
  Re: export set of triangles to 3DS  
From: david sharp
Date: 13 Jan 2000 11:57:25
Message: <387e03f5@news.povray.org>
A 'RAW' file just lists triangle vertices.
A single triangle with vertices :
V1x,V1y,V1z
V2x,V2y,V2z
V3x,V3y,V3z
would look , in the RAW file, like:
V1x V1y V1z V2x V2y V2z V3x V3y V3z
(no commas, just  space separating the 9 coordinate
numbers)
Each triangle goes on a separate line.
I think you can add a triangle's normals too, just by putting them
on that same line.
I don't know anything about colors in RAW files, though.

You could use #fopen, #fwrite(), and #fclose directives
to get POV to write the RAW file. I've got examples
I've done lying about someplace and I could find them
if you want to see.


Micha Riser wrote:
[ ... ]
> I have written some pov-macros which calculate the edge points of
> triangle and writes these to an pov include file. Each triangle has a
> different color. Now I want pov to write this triangle data into such a
> format that it can easily imported by 3DS. What's the easiest way to do
> that? I have a program that converts POB, RAW and some other formats to
> 3DS. But for POB I had to find a parser first. I don't know anything
> about the RAW format. Is it possilbe to write the triangles with pov
> directly into a 'raw' file?
>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.