POV-Ray : Newsgroups : povray.general : displacement mapping Server Time
19 Nov 2024 15:38:57 EST (-0500)
  displacement mapping (Message 1 to 10 of 10)  
From: John Bradshaw
Subject: displacement mapping
Date: 20 Feb 2002 12:59:40
Message: <3c73e40c$1@news.povray.org>
I'm finding with my neuron image (p.b.i. if you're curious) that I really
wished I could use displacement mapping instead of just bump mapping. How
hard is this to implement? I'm not asking for the pov team to do it (so
don't start another POV 4 flame session), but wondering if someone knew of
an algorithm and if it would be reasonable to expect that I could use it to
pertrub my mesh (taking into consideration that I am not a hard-core
programmer).

Better yet would be a freeware type program that already does it.

Thoughts?

John


Post a reply to this message

From: Simon Adameit
Subject: Re: displacement mapping
Date: 20 Feb 2002 13:04:18
Message: <3c73e522@news.povray.org>
I think that this is possible with Chris Colefax Compressed Mesh include.
You can download it here: http://www.geocities.com/ccolefax/pcm.html


Post a reply to this message

From:
Subject: Re: displacement mapping
Date: 20 Feb 2002 13:11:08
Message: <o5p77u0arrldd88p6j9ujblupjctffvqm3@4ax.com>
On Wed, 20 Feb 2002 12:58:53 -0500, "John Bradshaw"
<joh### [at] nospamhotmailcom> wrote:
> I'm finding with my neuron image (p.b.i. if you're curious) that I really
> wished I could use displacement mapping instead of just bump mapping. How
> hard is this to implement?

If ideal solution could be easy it would be done probably.
AFAIK at this moment you have three ways to do it:
a) accurate but limited in geometry - fast parse and slow render - isosurface
b) aproximation - slow parse and fast render - store vertices of mesh in
array, displace in loop, create final mesh
c) other program with export to pov

All this tesselation stuff p.u.p, mesh manipulation things are small steps in
a way towards displacement maping.

ABX


Post a reply to this message

From: Christopher James Huff
Subject: Re: displacement mapping
Date: 20 Feb 2002 21:09:11
Message: <chrishuff-1C0A88.21085920022002@netplex.aussie.org>
In article <3c73e40c$1@news.povray.org>,
 "John Bradshaw" <joh### [at] nospamhotmailcom> wrote:

> I'm finding with my neuron image (p.b.i. if you're curious) that I really
> wished I could use displacement mapping instead of just bump mapping. How
> hard is this to implement? I'm not asking for the pov team to do it (so
> don't start another POV 4 flame session), but wondering if someone knew of
> an algorithm and if it would be reasonable to expect that I could use it to
> pertrub my mesh (taking into consideration that I am not a hard-core
> programmer).

There is a patch that attempts it by approximating the curved rays using 
short segments, I don't know how fast it is or how well it works. Look 
for the "deform" patch.

There are also patches in progress for tesselation, turning objects into 
meshes. A mesh is much easier to deform than most of POV's primitives, 
since you can often just displace the vertices, and you can subdivide a 
triangle into more triangles as necessary.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: John Bradshaw
Subject: Re: displacement mapping
Date: 21 Feb 2002 00:43:14
Message: <3c7488f2$2@news.povray.org>
Looked good until I tried it. Not what I'm looking for (the mesh got all
boxy).


Post a reply to this message

From: John Bradshaw
Subject: Re: displacement mapping
Date: 21 Feb 2002 00:48:17
Message: <3c748a21@news.povray.org>
> If ideal solution could be easy it would be done probably.

That's what I was afraid of.

> b) aproximation - slow parse and fast render - store vertices of mesh in
> array, displace in loop, create final mesh

 Sounds like a lot of work. I might as well just write a displacement shader
and use povman (hey that's not such a bad idea--maybe I'll try that).
Although writing a displacement shader might not be kiddie play either. And
maybe displacement shaders don't work in povman (never used povman).

> All this tesselation stuff p.u.p, mesh manipulation things are small steps
in
> a way towards displacement maping.

I look forward to seeing how it all turns out.


Post a reply to this message

From: John Bradshaw
Subject: Re: displacement mapping
Date: 21 Feb 2002 00:49:22
Message: <3c748a62@news.povray.org>
Sorry, couldn't find it. Perhaps a link?


Post a reply to this message

From:
Subject: Re: displacement mapping
Date: 21 Feb 2002 03:32:35
Message: <lja97uct2uqjrqaqdi827j2rj7lv3avqa5@4ax.com>
On Wed, 20 Feb 2002 21:08:59 -0500, Christopher James Huff <chr### [at] maccom>
wrote:
> There is a patch that attempts it by approximating the curved rays using 
> short segments, I don't know how fast it is or how well it works. Look 
> for the "deform" patch.

I never finished it becouse of limitations. Patch wasn't published but some
previews ara available at:

images:
http://news.povray.org/3a5d9024%40news.povray.org
http://news.povray.org/3a782898%40news.povray.org
http://news.povray.org/3a6c8124%40news.povray.org

animations:
http://news.povray.org/3a70570b%40news.povray.org
http://news.povray.org/3a6f152e%40news.povray.org
http://news.povray.org/3a6c74e9%40news.povray.org

ABX


Post a reply to this message

From: Warp
Subject: Re: displacement mapping
Date: 21 Feb 2002 09:25:02
Message: <3c75033d@news.povray.org>
John Bradshaw <joh### [at] nospamhotmailcom> wrote:
: Looked good until I tried it. Not what I'm looking for (the mesh got all
: boxy).

  Perhaps you just didn't use it in the right way?

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Rune
Subject: Re: displacement mapping
Date: 21 Feb 2002 10:44:04
Message: <3c7515c4@news.povray.org>
"Warp" wrote:
> Perhaps you just didn't use it in the right way?

Don't know if this is the cause of his problem, but the Compressed Mesh
include have no support for smooth meshes and if it's attempted to use one,
the results are all wrong. The reason is that normal vectors are handled the
same way as point vectors, which doesn't make any sense.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Feb 16)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

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