POV-Ray : Newsgroups : povray.general : deforming a texture on a mesh : Re: deforming a texture on a mesh Server Time
29 Jul 2024 20:18:03 EDT (-0400)
  Re: deforming a texture on a mesh  
From: esterichia
Date: 3 Sep 2010 05:55:00
Message: <web.4c80c5d59ce242be49aa3f520@news.povray.org>
Thank you for the reply, I tried to use the second method you suggested and it
works but I still have two problems:

> Assuming P is your existing image map pigment, and
> (fx(x,y),fy(x,y)) is some 2D deformation function
> to be applied to the image with coordinates ranging
> from 0 to 1,

Is it possible to use define fx, fy as macros? The transformation I want to
apply depends on some parameters I have defined and parameters can not be passed
to functions.

> #macro FROM_BLACK(COLOR)
> color_map
> {
>    [0 color rgb 0]
>    [1 color COLOR]
> }
> #end

This works but the colors are very dark. I thought I should use some other
color_map, like
[0 color rgb 0]
[0.5 color COLOR]
[1 color rgb 1]
but this is not the case. Do I have to change the color_map?

Thank you for your help!


Post a reply to this message

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