POV-Ray : Newsgroups : povray.newusers : color modulation in textures : Re: color modulation in textures Server Time
29 Jul 2024 18:16:27 EDT (-0400)
  Re: color modulation in textures  
From: Loki
Date: 11 May 2005 10:10:01
Message: <web.4282122f9d44ff21b8197a8e0@news.povray.org>
"tahoma" <nomail@nomail> wrote:
> I started with povray some days ago to convert some realtime scenes to
> povray files. After reading the documentation again and again i wondered if
> it would be possible to define materials or textures just like in OpenGL,
> 3dsMax and so on.
>
> E.g. the modulation of an image_map color with a constant color:
> pigment = <image_map[u,v].red * color.red, image_map[u,v].green *
> color.green, image_map[u,v].blue * color.blue>
>
> Furthermore i wondered why it is possible to define an ambient "reflection"
> as rgb but a diffuse and specular reflection just as scalar. If it would be
> possible i would not need to modulate the image_map anymore.
> Are there any workarounds to do that?
>
> I want to use the commonly used lighting equation:
> Result = Ambient(rgb) +
> DiffuseMap(rgb)*DiffuseReflection(rgb)*DiffuseCoefficient(scalar) +
> SpecularMap(rgb)*SpecularReflection(rgb)*SpecularCoefficient(scalar)
>
> Thanks,
> Jan

I know what you're getting at.  In fact I suggested a similar change in
implementation a while ago and was roundly accused of trolling for
mentioning it. (but that's all water under the bridge.)  There is no easy
way to implement different image maps for different illumination channels,
i.e. having a diffuse map separate from a specular map in the same texture.
 However, you can (with a bit of work) create multiple textures which blend
together the required aspects.  It is still not as versatile as mapping to
different channels, and with complex textures it can be a real brain-ache
to get it right, but it does offer some of the functionality that it sounds
like you're used to.  Oh for a truly world-class hypergraph. ;)

L
-


Post a reply to this message

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