POV-Ray : Newsgroups : povray.binaries.images : PIP: did I hear someone saying "Displacement mapping" ? [72k] Server Time
17 Aug 2024 18:25:00 EDT (-0400)
  PIP: did I hear someone saying "Displacement mapping" ? [72k] (Message 1 to 5 of 5)  
From: Jérôme Grimbert
Subject: PIP: did I hear someone saying "Displacement mapping" ? [72k]
Date: 27 Aug 2001 02:50:56
Message: <3B89EE71.4AFFC9FD@atosorigin.com>
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.

The current scene code looks like:

background { rgb z*.5 }
#default { pigment { rgb <1,.8,.6> } finish { specular .5 } }

#declare Obj = sphere {0,1  }
smooth { 
  displace {  
    tesselate { Obj  accuracy 85 smooth  }  
    pigment { agate }, 0.4 , 0.5
           }
       }


camera { location <0,4,-13>*1.1 look_at <0,0,0> angle 35/3 }
light_source { <200,100,-150>, 1 }
light_source { <-200,100,-100>, x*.5 }
light_source { 0, y }


--


Post a reply to this message


Attachments:
Download 'bum2.jpg' (19 KB) Download 'disp2.jpg' (12 KB) Download 'nor2.jpg' (16 KB) Download 'orig2.jpg' (8 KB) Download 'tintin2.jpg' (18 KB)

Preview of image 'bum2.jpg'
bum2.jpg

Preview of image 'disp2.jpg'
disp2.jpg

Preview of image 'nor2.jpg'
nor2.jpg

Preview of image 'orig2.jpg'
orig2.jpg

Preview of image 'tintin2.jpg'
tintin2.jpg


 

From: Christoph Hormann
Subject: Re: PIP: did I hear someone saying "Displacement mapping" ? [72k]
Date: 27 Aug 2001 03:29:52
Message: <3B89F78A.F0ABB4FA@gmx.de>

> 
> 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?

How about the code, will you publish it?

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Jérôme Grimbert
Subject: Re: PIP: did I hear someone saying "Displacement mapping" ? [72k]
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

From: Tony[B]
Subject: Re: did I hear someone saying "Displacement mapping" ? [72k]
Date: 27 Aug 2001 09:23:24
Message: <3b8a49cc@news.povray.org>
'Xplain more... how did you export the mesh from POV, etc.? Wasn't there a
bug with this patch? Are we to assume that you fixed it? :D


Post a reply to this message

From: Jérôme Grimbert
Subject: Re: did I hear someone saying "Displacement mapping" ? [72k]
Date: 27 Aug 2001 10:45:16
Message: <3B8A5D9C.839F624B@atosorigin.com>
"Tony[B]" wrote:
> 
> 'Xplain more... how did you export the mesh from POV, etc.? Wasn't there a
> bug with this patch? Are we to assume that you fixed it? :D

See also the answer to Christoph Hormann.

Mu, I did NOT export the mesh from POV.
Yes, there is a bug with this patch. Finding the cause would be great.
No, I did NOT fix it (even if I did look at it and end up with my current mess).


Post a reply to this message

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