POV-Ray : Newsgroups : povray.general : Freeware Displacement Mapping for Pov-Ray for Windows Server Time
27 Nov 2024 20:22:24 EST (-0500)
  Freeware Displacement Mapping for Pov-Ray for Windows (Message 1 to 10 of 10)  
From: FlaPovFan
Subject: Freeware Displacement Mapping for Pov-Ray for Windows
Date: 12 Feb 2008 16:15:01
Message: <web.47b20b7d20247d8fd3b1f88e0@news.povray.org>
Is the following method the only way to use displacement mapping in Pov-Ray for
Windows using only freeware?

1) CrazyBumps to create displacement map (GIMP optional;

2) Blender, to create mesh deformed by displacement map;

3) Blend2Pov to export from Blender to Pov-Ray


Post a reply to this message

From: Jan Dvorak
Subject: Re: Freeware Displacement Mapping for Pov-Ray for Windows
Date: 12 Feb 2008 18:16:52
Message: <47b228e4$1@news.povray.org>
FlaPovFan napsal(a):
> Is the following method the only way to use displacement mapping in Pov-Ray for
> Windows using only freeware?
> 
> 1) CrazyBumps to create displacement map (GIMP optional;
> 
> 2) Blender, to create mesh deformed by displacement map;
> 
> 3) Blend2Pov to export from Blender to Pov-Ray
> 
> 

height_field

isosurface

even slower, parametric

the map can be made using procedural pigments


Post a reply to this message

From: Jim Charter
Subject: Re: Freeware Displacement Mapping for Pov-Ray for Windows
Date: 12 Feb 2008 19:12:16
Message: <47b235e0$1@news.povray.org>
FlaPovFan wrote:
> Is the following method the only way to use displacement mapping in Pov-Ray for
> Windows using only freeware?
> 
> 1) CrazyBumps to create displacement map (GIMP optional;
> 
> 2) Blender, to create mesh deformed by displacement map;
> 
> 3) Blend2Pov to export from Blender to Pov-Ray
> 
> 
PoseRay too


Post a reply to this message

From: Tim Attwood
Subject: Re: Freeware Displacement Mapping for Pov-Ray for Windows
Date: 12 Feb 2008 23:03:25
Message: <47b26c0d$1@news.povray.org>
> Is the following method the only way to use displacement mapping in 
> Pov-Ray for
> Windows using only freeware?

No, there are almost too many ways to remember them all easily,
depending what you mean by displacement mapping.

POV comes with a few macros for creating mesh objects
from a displacement image and an assumed basic shape.

There are programs like Terragen and Worldmachine.

There are other programs to convert from DEM format
(real data) landscapes, though it's a hassle.

You can manipulate almost any graphic tool available
to output to POV.


Post a reply to this message

From: FlaPovFan
Subject: Re: Freeware Displacement Mapping for Pov-Ray for Windows
Date: 13 Feb 2008 01:10:00
Message: <web.47b287db12f59258d3b1f88e0@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:
> > Is the following method the only way to use displacement mapping in
> > Pov-Ray for
> > Windows using only freeware?
>
> No, there are almost too many ways to remember them all easily,
> depending what you mean by displacement mapping.
>
> POV comes with a few macros for creating mesh objects
> from a displacement image and an assumed basic shape.
>
> There are programs like Terragen and Worldmachine.
>
> There are other programs to convert from DEM format
> (real data) landscapes, though it's a hassle.
>
> You can manipulate almost any graphic tool available
> to output to POV.

Thanks all for the help.

From a short review of the articles on the web, I think that "displacement
mapping" differs from "normal mapping" and "bump mapping" in that "displacement
mapping" actually deforms the vertices of the object, whereas the others just
apply a texture to the object that gives the impression of a change in shape.
I'm not sure where this is significant.

It seems that PoseRay's displacement function is actually the application of a
bump map.

Originally I became interested while following a Blender tutorial, which was
labelled, to paraphrase, "Turning a 2d image into a 3d object".  An image of
the word "Blender", softened with Gaussian blur, is added as a "displacement
map"; it's also modified with subsurface scattering. the final product gives
the impression of being "embossed", as if pushed out from back to front.  It
might be useful for logos.

Finally, I wanted to give a heads up to an application found at
http://www.crazybump.com, which takes a photo and converts it into several
different kinds of maps.  It works great and it's free.


Post a reply to this message

From: Tim Attwood
Subject: Re: Freeware Displacement Mapping for Pov-Ray for Windows
Date: 13 Feb 2008 04:16:53
Message: <47b2b585@news.povray.org>
Normal maps in POV don't support 3-axis displacement,
which is what is present in many game engines. It's a
single pseudo displacement along the object normal,
similar to data used in height fields.


Post a reply to this message

From: Jim Charter
Subject: Re: Freeware Displacement Mapping for Pov-Ray for Windows
Date: 13 Feb 2008 20:00:27
Message: <47b392ab@news.povray.org>
FlaPovFan wrote:

> It seems that PoseRay's displacement function is actually the application of a
> bump map.

No, it has real displacement, it is just that the resolution necessary 
to do this in mesh makes it impractical most of the time.


Post a reply to this message

From: FlaPovFan
Subject: Re: Freeware Displacement Mapping for Pov-Ray for Windows
Date: 14 Feb 2008 00:45:00
Message: <web.47b3d53112f59258d3b1f88e0@news.povray.org>
Jim Charter <jrc### [at] msncom> wrote:
> FlaPovFan wrote:
>
> > It seems that PoseRay's displacement function is actually the application of a
> > bump map.
>
> No, it has real displacement, it is just that the resolution necessary
> to do this in mesh makes it impractical most of the time.

Thanks for the correction, and sorry about the misinformation.

I tried applying displacement in PoseRay, to both .3ds and .obj imports.  It
seems though that the Blender displacement function allowed a more precise
displacement.  The object that I used was a mesh with a uv mapping of a line
drawing, just sharply defined black and white lines.  Blender allowed the black
lines to be raised in relief in a sharply defined and distinct way.  I don't
know if I tried it correctly in PoseRay, but my results showed a general,
nondescript relief.

How is it possible to obtain a similar effect using isosurfaces?


Post a reply to this message

From: Alain
Subject: Re: Freeware Displacement Mapping for Pov-Ray for Windows
Date: 14 Feb 2008 13:46:58
Message: <47b48ca2$1@news.povray.org>
FlaPovFan nous apporta ses lumieres en ce 2008/02/14 00:44:
> Jim Charter <jrc### [at] msncom> wrote:
>> FlaPovFan wrote:
>>
>>> It seems that PoseRay's displacement function is actually the application of a
>>> bump map.
>> No, it has real displacement, it is just that the resolution necessary
>> to do this in mesh makes it impractical most of the time.
> 
> Thanks for the correction, and sorry about the misinformation.
> 
> I tried applying displacement in PoseRay, to both .3ds and .obj imports.  It
> seems though that the Blender displacement function allowed a more precise
> displacement.  The object that I used was a mesh with a uv mapping of a line
> drawing, just sharply defined black and white lines.  Blender allowed the black
> lines to be raised in relief in a sharply defined and distinct way.  I don't
> know if I tried it correctly in PoseRay, but my results showed a general,
> nondescript relief.
> 
> How is it possible to obtain a similar effect using isosurfaces?
> 
> 
You can use a pigment function.


-- 
Alain
-------------------------------------------------
"We returned the General to El Salvador, or maybe Guatemala, it's difficult to 
tell from 10,000 feet."           -- Anon.


Post a reply to this message

From: Jim Charter
Subject: Re: Freeware Displacement Mapping for Pov-Ray for Windows
Date: 14 Feb 2008 20:59:52
Message: <47b4f218$1@news.povray.org>
FlaPovFan wrote:

> How is it possible to obtain a similar effect using isosurfaces?
> 
Here is a snippet of the code I used to get the engraved letters along 
with other textures all real displacement

It was necessary to superimpose two objects, one with noshadow to
get rid of some artifacting, one to create shadows in the scene.

I'll post example pictures on p.b.images

This code used the isocsg include files published by Christoff Hormann
This include files make it easy to reproduce POV objects and apply 
textures.

#declare Fn_Sor =
IC_Sor (Point_Array, IC_Open)

#declare Fn_Text =
function {
   pigment {
     image_map {
       jpeg "k13.cup.wk.jpg"
       interpolate 2
       map_type 2
       once
     }
   }
};
#declare Fn_Bump1 =
function {
   pigment {...

#declare cup_lathe_noshadow=
isosurface {
         function {
               Fn_Sor (x, y, z)
               - Fn_Bump1 (x, y, z).gray*.0025
               - Fn_Text (x, y, z).gray*.001
         }
         contained_by {
		box { <-.7,0,-.7>, <.7,P7.y,.7> }
	}
         threshold 0.0
         accuracy 0.001
         max_gradient 6.25
         no_shadow  //<- seems to prevent artifacting
         texture {
                 T_Brass_
         }
}

#declare cup_lathe_shadowdummy =
isosurface {
         function {
               Fn_Sor (x, y, z)
         }
         contained_by {
		box { <-.7,0,-.7>, <.7,1.1,.7> }
	}
         threshold 0.0
         accuracy 0.001
         max_gradient 6.25
         scale .998
         texture {
                 pigment { rgb .8 }
         }
}

#declare k13_cup_lathe_ =
union {
         object { cup_lathe_noshadow }
         object { cup_lathe_shadowdummy}
         translate <0,2.49,0>
};


Post a reply to this message

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