POV-Ray : Newsgroups : povray.general : export set of triangles to 3DS Server Time
10 Aug 2024 11:27:43 EDT (-0400)
  export set of triangles to 3DS (Message 1 to 3 of 3)  
From: Micha Riser
Subject: export set of triangles to 3DS
Date: 13 Jan 2000 11:06:14
Message: <387DEEE8.7BE333B7@datacomm.ch>
Hallo!
My problem is not quite related to pov, more to 3ds, but I'm a pov user
and I hope you can help my.

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?

Thanks for your adivces

-Micha

--------------------------------------------------------------
 email:                      mic### [at] michavirtualavenet
 visit my homepage:          http://micha.virtualave.net
 POVRay Objects Collection:  http://povobjects.virtualave.net


Post a reply to this message

From: david sharp
Subject: Re: export set of triangles to 3DS
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

From: Gilles Tran
Subject: Re: export set of triangles to 3DS
Date: 13 Jan 2000 13:32:06
Message: <387E1A37.795241B5@inapg.inra.fr>
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?

If you have a union of triangles (not a mesh, and no smoothing information)
in pov syntax you can use Crossroads to convert it to other formats. This
is one of the few official occurences of POV-to-other-formats conversion.
I'm not sure about the colors though.
G.


Post a reply to this message

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