POV-Ray : Newsgroups : povray.general : How to ... Server Time
1 May 2024 12:58:30 EDT (-0400)
  How to ... (Message 4 to 13 of 23)  
<<< Previous 3 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Bald Eagle
Subject: Re: How to ...
Date: 23 Nov 2021 13:40:00
Message: <web.619d3540d5fe89401f9dae3025979125@news.povray.org>
Francois LE COAT <lec### [at] atariorg> wrote:

> For example, *.TRI format of 3D shapes contain <x,y,z> coordinates, and
> a color affected to these. If you use TRI2POV it gives a surface like...
>
>  <https://www.youtube.com/watch?v=Yf7q2KdAS-4>
>
> When you use TRI2POV it converts the surface in a set of smooth_triangle
> that can render the surface with ray-tracing. That exists since the very
> first versions of POV-Ray, and produces a very nice result.
>
> I hope that it is what you're thinking about. Some 3D file formats, like
> *.TRI is perfect to describe that kind of colored 3D surfaces. It's easy

I don't believe I am aware of TRI2POV.  Where is it available?
I'm sure I have asked a similar question in the past, so I'm thinking that there
are a lot of other people who are unaware of this utility.


Post a reply to this message

From: Francois LE COAT
Subject: Re: How to ...
Date: 23 Nov 2021 15:00:04
Message: <619d4844$1@news.povray.org>
Hi,

Bald Eagle writes:
> Francois LE COAT wrote:
>> For example, *.TRI format of 3D shapes contain <x,y,z> coordinates, an
d
>> a color affected to these. If you use TRI2POV it gives a surface like.
..
>>
>>   <https://www.youtube.com/watch?v=Yf7q2KdAS-4>
>>
>> When you use TRI2POV it converts the surface in a set of smooth_triang
le
>> that can render the surface with ray-tracing. That exists since the ve
ry
>> first versions of POV-Ray, and produces a very nice result.
>>
>> I hope that it is what you're thinking about. Some 3D file formats, li
ke
>> *.TRI is perfect to describe that kind of colored 3D surfaces. It's ea
sy
> 
> I don't believe I am aware of TRI2POV.  Where is it available?
> I'm sure I have asked a similar question in the past, so I'm thinking t
hat there
> are a lot of other people who are unaware of this utility.

I have C sources for TRI2POV. But I remembered that it's ATARI software:
"
TRI-POV Converter Version 1.0 Sept/97
Copyright (c) 1993 by Steve Anger
And 97 by Archimedium

This program converts .TRI files generated by the Atari programs
to POV-Ray or Vivid raytracer scene files. Bounding shapes are
automatically generated for POV-Ray to greatly reduce the rendering time.



Syntax:  tri2pov inputfile[.tri] [outputfile] [options]

Options:
-snnn    - Generates smooth triangles. The boundaries between triangles
            are only smoothed if the angle between the triangles is less
            that nnn degrees. -s0 will not smooth any triangles while
            -s180 will smooth all triangles. Values from -s45 to -s90
            usually work well. If unspecified smoothing defaults to -s60.


-op      - Output to POV-Ray 1.0 format
-op2     - Output to POV-Ray 2.0 format (2.0 is unreleased as yet)
-op3     - Output to POV-Ray 3.0 format (default)
-ov      - Output to Vivid 2.0 format
-or      - Output to Raw triangle format.

-lxnnn   - Set look_at x coord to nnn
-lynnn   -  '     '    y   '   '   '
-lznnn   -  '     '    z   '   '   '

-vxnnn   - Set view_point x coord to nnn
-vynnn   -  '       '     y   '   '   '
-vznnn   -  '       '     z   '   '   '

e.g. tri2pov car.tri car.pov -s60.0


                                   Steve Anger, Guelph, ON, Canada
                                   CIS: 70714,3113
                                   Internet: 707### [at] compuservecom
                                   ADEnet Boards i.e.:TGA: (510)524-2780

Archimedium WEB: http://www.ief.u-psud.fr/~lecoat
E-mail: lec### [at] iefu-psudfr
"
I modified it a long time ago. It works well. I can send you sources...

Best regards,

-- 

Author of Eureka 2.12 (2D Graph Describer, 3D Modeller)
http://eureka.atari.org/


Post a reply to this message

From: Bald Eagle
Subject: Re: How to ...
Date: 23 Nov 2021 19:30:00
Message: <web.619d872fd5fe89401f9dae3025979125@news.povray.org>
Francois LE COAT <lec### [at] atariorg> wrote:

> I have C sources for TRI2POV. But I remembered that it's ATARI software:

:O
Maybe you can post a zip to the utilities group - then several people can look
it over and play with it.

The C and C++ programmers, the povray macro writers, etc...

It sounds like a great utility to make generally available!


Thanks   :)


Post a reply to this message

From: Francois LE COAT
Subject: Re: How to ...
Date: 24 Nov 2021 04:30:10
Message: <619e0622$1@news.povray.org>
Hi,

Bald Eagle writes:
> Francois LE COAT wrote:
>> I have C sources for TRI2POV. But I remembered that it's ATARI softwar
e:
> 
> :O
> Maybe you can post a zip to the utilities group - then several people c
an look
> it over and play with it.
> 
> The C and C++ programmers, the povray macro writers, etc...
> 
> It sounds like a great utility to make generally available!
> 
> 
> Thanks   :)

The author of TRI2POV is Steve Anger, who is a member of the POV-Team:

<https://www.povray.org/documentation/view/3.6.0/204/>

I can't publish the C sources, because it is copyrighted. I can send
you something, privately. But if it should be opened publicly, we
should ask Steve Anger, about opening his code from 1993...

What do you think of that?

Best regards,

-- 

Author of Eureka 2.12 (2D Graph Describer, 3D Modeller)
http://eureka.atari.org/


Post a reply to this message

From: Alain Martel
Subject: Re: How to ...
Date: 24 Nov 2021 11:49:18
Message: <619e6d0e$1@news.povray.org>
Le 2021-11-23 à 15:00, Francois LE COAT a écrit :

> This program converts .TRI files generated by the Atari programs
> to POV-Ray or Vivid raytracer scene files. Bounding shapes are
> automatically generated for POV-Ray to greatly reduce the rendering time.
> 
> 
That part about adding bounding is no longer useful. It was useful to 
manually bound things back then, but, the automatic bounding have 
improved dramatically since 1993.
Now, not using those bounding often result in better performances.

Remember that adding bounded_by to an union suppress the normal bounding 
of it's components. That mean that any ray that enters that bounding box 
have to get tested against every individual primitives contained in that 
union.


Post a reply to this message

From: Bald Eagle
Subject: Re: How to ...
Date: 24 Nov 2021 16:10:00
Message: <web.619ea93fd5fe89401f9dae3025979125@news.povray.org>
Francois LE COAT <lec### [at] atariorg> wrote:
> Thanks   :)
>
> The author of TRI2POV is Steve Anger, who is a member of the POV-Team:
>
> <https://www.povray.org/documentation/view/3.6.0/204/>
>
> I can't publish the C sources, because it is copyrighted. I can send
> you something, privately. But if it should be opened publicly, we
> should ask Steve Anger, about opening his code from 1993...
>
> What do you think of that?
>
> Best regards,

Sure - one would hope that he would be fine with that.
Feel free to send me an email as well.

- Bill


Post a reply to this message

From: kurtz le pirate
Subject: Re: How to ...
Date: 26 Nov 2021 09:39:25
Message: <61a0f19d$1@news.povray.org>
On 23/11/2021 21:00, Francois LE COAT wrote:
> Hi,
> 
> Bald Eagle writes:
>> Francois LE COAT wrote:
>>> For example, *.TRI format of 3D shapes contain <x,y,z> coordinates, and
>>> a color affected to these. If you use TRI2POV it gives a surface like...
>>>

>>>
>>> When you use TRI2POV it converts the surface in a set of smooth_triangle
>>> that can render the surface with ray-tracing. That exists since the very
>>> first versions of POV-Ray, and produces a very nice result.
>>>
>>> I hope that it is what you're thinking about. Some 3D file formats, like
>>> *.TRI is perfect to describe that kind of colored 3D surfaces. It's easy
>>

>> I'm sure I have asked a similar question in the past, so I'm thinking 
>> that there
>> are a lot of other people who are unaware of this utility.
> 
> I have C sources for TRI2POV. But I remembered that it's ATARI software:
> "
> TRI-POV Converter Version 1.0 Sept/97
> Copyright (c) 1993 by Steve Anger
> And 97 by Archimedium
> 
> This program converts .TRI files generated by the Atari programs
> to POV-Ray or Vivid raytracer scene files. Bounding shapes are
> automatically generated for POV-Ray to greatly reduce the rendering time.
> 
> 

> 
> Options:





> 





> 



> 



> 
> e.g. tri2pov car.tri car.pov -s60.0
> 
> 




> 
> Archimedium WEB: http://www.ief.u-psud.fr/~lecoat
> E-mail: lec### [at] iefu-psudfr
> "
> I modified it a long time ago. It works well. I can send you sources...
> 
> Best regards,
> 

This utility looks interesting.
I'd like the sources. If it is not too complicated, the conversion from 
C to POV SDL can be considered.

My email address is valid.


-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: kurtz le pirate
Subject: Re: How to ...
Date: 27 Nov 2021 11:39:12
Message: <61a25f30$1@news.povray.org>
On 22/11/2021 17:23, kurtz le pirate wrote:
> Hello,
> 
> I have a surface defined by a set of points <x,y,z> and for each point, 
> its color.
> 
> In your opinion, which object/method is the most appropriate to 
> represent such a surface?


I'm moving slowly. I can now build my surface by generating a mesh from 
my set of points exactly as for a height_field.
But I'm still struggling with the color story.

I have this scheme on the <x,z> plane

+--> z
|
V
x

     |     |     |
--- * --- * --- * ---
     |     |     |
--- * --- * --- * ---
     |     |     |
--- * --- * --- * ---
     |     |     |
--- * --- * --- * ---
     |     |     |


Each "*" is my points. This points are on a "square grid".
I convert this grid to triangle. I get :

     |     |     |
--- * --- * --- * ---
     |   / |   / |
     |  /  |  /  |  /
     | /   | /   | /
--- * --- * --- * ---
   / |   / |   / |
  /  |  /  |  /  |  /
/   | /   | /   | /
--- * --- * --- * ---
   / |   / |   / |
  /  |  /  |  /  |  /
/   | /   | /   | /
--- * --- * --- * ---
     |     |     |

I obtain a set of triangles schematized below.
These triangles compose the mesh which is easy to display.

But ... for the color, I still don't know how to do it :(
The color is "at" a point "*". impossible to find out how to give the 
color to which triangle.


One more time, any suggestion ?





-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: Bald Eagle
Subject: Re: How to ...
Date: 27 Nov 2021 12:05:00
Message: <web.61a26434d5fe89401f9dae3025979125@news.povray.org>
kurtz le pirate <kur### [at] gmailcom> wrote:

> But I'm still struggling with the color story.

You're doing exactly the right things for your geometry.   Make sure you get the
normals set correctly for the smooth_triangles, so you get a nice smooth
surface.
Let me know if you're struggling there - I got it right a while back after
struggling with that myself - for the Bezier patch paper, IIRC.

What I was trying to suggest in my first post was:

"By using the texture_list it is possible to specify a texture per triangle or
even per vertex in the mesh. In the latter case the three textures per triangle
will be interpolated. To let POV-Ray know what texture to apply to a triangle,
the index of a texture is added to the face_indices list, after the face index
it belongs to.

http://www.povray.org/documentation/view/3.7.1/68/

scroll down to:

1.3.2.2.3 A separate texture per triangle


Presumably POV-Ray will interpolate the textures across the triangle surface
between the 3 vertices.

For anything more advanced that you may need, I'd suggest looking at hgpovray38
by Jerome Grimbert (LeForgeron)
https://wiki.povray.org/content/User:Le_Forgeron#Which_colourspace_.3F




- Bill


Post a reply to this message

From: Cousin Ricky
Subject: Re: How to ...
Date: 27 Nov 2021 13:02:18
Message: <61a272aa@news.povray.org>
On 2021-11-27 12:39 PM (-4), kurtz le pirate wrote:
> 
>     |     |     |
> --- * --- * --- * ---
>     |     |     |
> --- * --- * --- * ---
>     |     |     |
> --- * --- * --- * ---
>     |     |     |
> --- * --- * --- * ---
>     |     |     |
> 
> 
> Each "*" is my points. This points are on a "square grid".
> I convert this grid to triangle. I get :
> 
>     |     |     |
> --- * --- * --- * ---
>     |   / |   / |
>     |  /  |  /  |  /
>     | /   | /   | /
> --- * --- * --- * ---
>   / |   / |   / |
>  /  |  /  |  /  |  /
> /   | /   | /   | /
> --- * --- * --- * ---
>   / |   / |   / |
>  /  |  /  |  /  |  /
> /   | /   | /   | /
> --- * --- * --- * ---
>     |     |     |

You might consider turning off format=flowed in your Thunderbird
settings.  It messes up your diagrams in the Web view.


Post a reply to this message

<<< Previous 3 Messages Goto Latest 10 Messages Next 10 Messages >>>

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