|
|
Hi everybody !
I'm posting here a message I've sent to Nathan himself
about 10 days ago, but for which I had no answer... Maybe it's
just that this problem is not so important ;-) Anyway here it
is, slightly modified though:
I'm updating a conversion tool (devoted to scientific visualization)
to add a MegaPOV support using the mesh2 object, where triangles
have a different color (texture) at each vertex. Unfortunately, when
transforming the object in space (rotation/translation...), the
textures are not transformed as well, sometimes leading to a completely
invisible object. Of course, applying the same transformation to every
textures definitions does not correct the thing...
Here is an example (derived from the demos):
// Persistence of Vision Ray Tracer Scene Description File
// File: smooth_color_triangle.pov
// Date: 15/11/99
// Demo showing a triangle with different colors at each vertex.
#version unofficial MegaPov 0.5;
camera {
location <0.0, 0.5, -4>
angle 30
look_at <0.0, 0.0, 0.0>
}
light_source {
<30, 30, -100>
color rgb <1.0, 1.0, 1.0>
}
light_source { <0.0, 0.0, -50> rgb 0.3 }
mesh2 {
vertex_vectors { 3,
<-0.8,-0.5,0.0>,<0.0,0.5,0.0>,<0.8,-0.5,0.0>
}
normal_vectors { 3,
<0.0,0.0,-1>,<0.0,0.0,-1>,<0.0,0.0,-1>
}
texture_list { 3,
texture{pigment{rgb<1,0,0>}},
texture{pigment{rgb<0,1,0>}},
texture{pigment{rgb<0,0,1>}}
}
face_indices{ 1,
<0,1,2>,0,1,2
}
// rotate z*90 // uncomment to see the difference
// translate x // or this one
}
Added in this post:
The problem seems to be the same for triangles using a texture_list.
I hope this will be fixed soon, as MegaPOV offers an interesting answer
to memory requirements of such objects... especially if this will be
part of the next POV-Ray 3.5 !
Thanks Nathan =)
*** Nicolas Calimet
*** http://altern.org/pov4grasp
Post a reply to this message
|
|
|
|
Nicolas Calimet <pov### [at] alternorg> wrote...
> Hi everybody !
>
> I'm posting here a message I've sent to Nathan himself
> about 10 days ago, but for which I had no answer... Maybe it's
> just that this problem is not so important ;-) Anyway here it
> is, slightly modified though:
Sorry. I've been really busy the past 3 weeks and haven't answered all my
emails yet. However, I did find the bug. It only affects the
corner-interpolated meshes. Meshes that use a solid texture for each
triangle will not have this problem. The fix involves adding the following
code to Mesh_Interpolate:
if (m->Trans != NULL)
{
MInvTransPoint(EPoint, IPoint, m->Trans);
}
else
{
Assign_Vector(EPoint, IPoint);
}
Then later in the same function EPoint is used instead of IPoint.
I hope that you can be patient and wait for a fix, because I'm a bit too
busy right now to release a patched version. Sorry.
-Nathan
Post a reply to this message
|
|