POV-Ray : Newsgroups : povray.general : Displacement via Isosurface : Re: Displacement via Isosurface Server Time
1 Aug 2024 04:17:57 EDT (-0400)
  Re: Displacement via Isosurface  
From: Anthony D  Baye
Date: 14 Apr 2006 14:04:51
Message: <443fe443$1@news.povray.org>
McHannemann wrote:
> Hello everyone,
> 
> I have a question:
> I would like to do the following,
> I have a Mesh with a displacement map(UV-Mapped in Z-Brush),
> I want to use it with the mesh as a isosurface and the texture
> as function, how is it done?
> 
> #declare disp = function{
>  image_map { BITMAP_TYPE "displacement map.bmp")
>  }
> 
> #declare dispiso =
>  isosurface{
>   function{
>    mesh(x,y,z) - disp(x,y,z).grey)
>   }
>  }
> 
> is a starting idea?
> 

> 
> Thnx
> 
> Thor
> 
> 
> 
The only way I can think of is to use the object pattern.
f/ex.

#declare disp =
function {
    pigment {
       image_map {
          bmp "displacement_map.bmp"
          map_type 0
          interpolate 0
          once
          }
       }
  }

#declare dispiso =
function {
    pattern {
       object { yourmeshobject }
       }
    }


isosurface {
    function { dispiso(x,y,z) - disp(x,y,z).red }
    max_gradient 10
    threshold 0
    contained_by { box { -obj_max_extent, obj_max_extent } }
    }

This is where I'd start.

Regards,

ADB


Post a reply to this message

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