POV-Ray : Newsgroups : povray.general : Heightfield applied to mesh Server Time
4 Nov 2024 17:37:47 EST (-0500)
  Heightfield applied to mesh (Message 1 to 7 of 7)  
From: Skip Talbot
Subject: Heightfield applied to mesh
Date: 12 Dec 2003 15:08:37
Message: <3fda2045$1@news.povray.org>
Howdy,

I was wondering if there were any macros or techniques out there to wrap a
heightfield to a mesh.  I've got a model I'm exporting to POV-Ray and have a
bitmap decal I'd like raised on the surface.  Any ideas?

Skip


Post a reply to this message

From: Hugo Asm
Subject: Re: Heightfield applied to mesh
Date: 12 Dec 2003 16:04:14
Message: <3fda2d4e@news.povray.org>
To my knowledge there are no POV-macros available to do the job on any kind
of mesh. It's relative easy to code one, provided you have - or can
calculate - the surface normals.

Bear in mind though, that your mesh needs to be very dense for "surface
displacement" to look good. This needs a lot of memory - sometimes wasted
memory, if your bitmap/pattern is not very bumpy then it will just waste
triangles.

That is why you will usually benefit A LOT from doing a "triangle
decimation" after the displacement has taken place. That means, redundant
triangles are removed and the resulting holes are nicely triangulated.
Currently the most efficient way to do all this, in my opinion, is a
commercial modeller like 3dsMAX. If you don't have access to that program,
it's going to be more complicated. You can use 3 small applications:

1) Poseray OBJ 2 POV converter (Freeware, and it has some kind of surface
displacement algoritm. I think your mesh needs UV vectors for this to work)
2) Wizup Optimiser (Free version only works with small meshes .. can do
triangle decimation)
3) A multi-converter will be handy. The "Wizup Optimiser" only works in VRML
format. I haven't found a freeware converter for this that *work*.

Regards,
Hugo


Post a reply to this message

From: Skip Talbot
Subject: Re: Heightfield applied to mesh
Date: 12 Dec 2003 16:41:30
Message: <3fda360a$1@news.povray.org>
Thanks for the detailed explanation, Hugo.  Like you said, I'm going to try
and go through the modelor.

Skip


Post a reply to this message

From: Shay
Subject: Re: Heightfield applied to mesh
Date: 12 Dec 2003 17:33:56
Message: <3fda4254@news.povray.org>
"Hugo Asm" <hua### [at] post3teledk> wrote in message
news:3fda2d4e@news.povray.org...
| You can use 3 small applications:
|

Is this not the function of Warp's mesh compressor?

 -Shay


Post a reply to this message

From: Hugo Asm
Subject: Re: Heightfield applied to mesh
Date: 12 Dec 2003 19:23:26
Message: <3fda5bfe$1@news.povray.org>
> | You can use 3 small applications:
> |
>
> Is this not the function of Warp's mesh compressor?
>

Oh yea, now you mention it.. It has some features like this.. But I never
tried.

Regards,
Hugo


Post a reply to this message

From: Christopher James Huff
Subject: Re: Heightfield applied to mesh
Date: 12 Dec 2003 19:46:44
Message: <cjameshuff-699B69.19422312122003@netplex.aussie.org>
In article <3fda2d4e@news.povray.org>, "Hugo Asm" <hua### [at] post3teledk> 
wrote:

> To my knowledge there are no POV-macros available to do the job on any kind
> of mesh. It's relative easy to code one, provided you have - or can
> calculate - the surface normals.

Unfortunately, it will be quite slow on high-res meshes. And you need 
the vertex locations as well as normals, of course. And it just won't 
work with some meshes...think of a mesh box, for example. Displacing 
each face along its normal will completely destroy the edges...you will 
end up with six displaced squares roughly aligned with the sides of a 
box.


> Bear in mind though, that your mesh needs to be very dense for "surface
> displacement" to look good. This needs a lot of memory - sometimes wasted
> memory, if your bitmap/pattern is not very bumpy then it will just waste
> triangles.

It is also possible to write a displacement algorithm that is smart 
enough to subdivide areas with highly detailed or large amounts of 
displacement.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Warp
Subject: Re: Heightfield applied to mesh
Date: 13 Dec 2003 15:05:18
Message: <3fdb70fe@news.povray.org>
Shay <sah### [at] simcopartscom> wrote:
> Is this not the function of Warp's mesh compressor?

  The compressor does not modify the number of triangles in the mesh.
It simply converts it from one format to another.
  (The name is more or less historical, even though I think a pcm file
will still be somewhat smaller than a mesh2 file...)

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

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