POV-Ray : Newsgroups : povray.unofficial.patches : MegaPOV 0.5a mesh2 problem (bug ?) Server Time
2 Sep 2024 00:14:26 EDT (-0400)
  MegaPOV 0.5a mesh2 problem (bug ?) (Message 1 to 4 of 4)  
From: Nicolas Calimet
Subject: MegaPOV 0.5a mesh2 problem (bug ?)
Date: 22 Jun 2000 13:18:02
Message: <39524B52.6ACDAA5F@altern.org>
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

From: Nathan Kopp
Subject: Re: MegaPOV 0.5a mesh2 problem (bug ?)
Date: 22 Jun 2000 23:56:53
Message: <3952e005@news.povray.org>
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

From: Nicolas Calimet
Subject: Re: MegaPOV 0.5a mesh2 problem (bug ?)
Date: 23 Jun 2000 05:49:02
Message: <39533394.A4C2DC78@altern.org>
Nathan Kopp wrote:
> 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

	Thanks a lot for your answer, Nathan !

	I will include the quick fix you give in your message until
you do it in the next release of MegaGigaPOV ;-)
	Well it's true I'm a little bit impatient, 'cause I was
expecting to perform some benchs comparing the mesh2 object to my
own patch (that I started 2 years ago) and was quite disappointed
to see there was a trouble... I could also try to fix it by myself,
but was too busy to investigate the code. So don't be sorry, I
actually should apologize putting pressure on you !

	MegaPOV is anyway soooooooooo cool :-D
	Thanks again !

*** Nicolas Calimet
*** http://altern.org/pov4grasp


Post a reply to this message

From: Warp
Subject: Re: MegaPOV 0.5a mesh2 problem (bug ?)
Date: 23 Jun 2000 07:58:39
Message: <395350ef@news.povray.org>
I think this has been discussed before.
  I don't remember if it was just a bug or if there was a deeper problem
behind this.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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