POV-Ray : Newsgroups : povray.unofficial.patches : improved smooth_color_triangle patch Server Time
2 Sep 2024 16:17:05 EDT (-0400)
  improved smooth_color_triangle patch (Message 1 to 1 of 1)  
From: Ansgar Philippsen
Subject: improved smooth_color_triangle patch
Date: 9 Sep 1999 15:18:48
Message: <37D81691.D2281F86@ubaclu.unibas.ch>
Hi all

I put up an improved version of my smooth_color_triangle patch at

http://www.bioz.unibas.ch/~xray/dino/pov

It fixes two severe problems which affected regular mesh performance: a
malloc error and incorrect rendering of non-color smoothed triangles.
Also, I no longer modify the texture directly but rather create a local
copy before changing the texture (so that shared textures do not get
messed up).

There is a linux-i386, an SGI and a MacOS-PPC binary available for
download. If anyone else creates a binary, I would be happy to include
it.

And just to add some technical comments here - which might be more
suitable for p.b.p:
To circumvent the feature of POVray to use the absolute
intersection-coordinate (instead of the relative one to each object) in
producing its textures, I check each intersection-event wether it
involves the smooth_color_triangle of the mesh. If so I interpolate a
new color (from the intersection and the three corners of the triangle)
and then force the current texture to type PLAIN with the interpolated
color. This is done for each intersection point.
I bring this up here because I saw some previous discussions how it
could be implemented to specify exact texture coordinates for each
triangle vertex. This might be saying the obvious, but instead of
forcing a new color based on a simple three-color- interpolation, it
could come from a texture . . .just a thought.

Ansgar

--
 Sometimes I think the surest sign that intelligent
 life exists elsewhere in the universe is that none
 of it has tried to contact us.


Post a reply to this message

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