POV-Ray : Newsgroups : povray.binaries.images : PIP: did I hear someone saying "Displacement mapping" ? [72k] : Re: PIP: did I hear someone saying "Displacement mapping" ? [72k] Server Time
17 Aug 2024 20:20:36 EDT (-0400)
  Re: PIP: did I hear someone saying "Displacement mapping" ? [72k]  
From: Jérôme Grimbert
Date: 27 Aug 2001 05:14:26
Message: <3B8A1014.12C23E8D@atosorigin.com>
Christoph Hormann wrote:
> 

> >
> > Thanks to Warps's Tesselate patch, creating a mesh become easier.
> > After that, it's only playing with the mesh... I did it in C,
> > but I have no doubt someone would be able to do it in pov-language too.
> > Render time is ok, but parsing time is exploding, especially
> > when it comes to compute mesh bounding tree.
> >
> 
> Great, how did you manage to avoid the known bug in the tesselation patch
> generating holes in the mesh?

I did not. I'm just lucky with my current setting and the tesselate code
(which I modifyied a little when I tried to solve that bug... I gave up).
BTW, the cube is not tesselated with Warps'tesselate, but with one of 
my variant. Interestingly, I have no holes in my variants... 
I really believe the holes come from the walking tetrahedron, 
maybe a case was overlooked (such as a full triangle coincident 
to the surface ??), but I cannot prouve it and I may as well be wrong.
Only good point is that it seems that the code that deals with
adding triangles to the mesh is fine, even if the underluying mesh code
is rather strange (I tried to generate all my triangle counter-clockwise,
because the displacement need a normal which must always be from the 
inside to the outside (or vice-versa, but always the same for the whole 
mesh). But it did not work, because the code in mesh.c reorder the
triangle vertex according to its own criteria. Hence the use of 
the "smooth" option in the "tesselate", so as to explicetely store
the normal with the vertex.

> 
> How about the code, will you publish it?

Once it has been finished, yes, if Warps is ok: 
I greatly reused his code, which allow me to only concentrate
on the vector manipulation and to forget the generation of the
mesh structure.


Post a reply to this message

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