POV-Ray : Newsgroups : povray.advanced-users : multipigment surface : Re: multipigment surface Server Time
26 Jun 2024 08:21:47 EDT (-0400)
  Re: multipigment surface  
From: PC John
Date: 28 Jul 2011 15:30:01
Message: <web.4e31b79533486a128a2333330@news.povray.org>
> > To simplify the things, I want to have one pigment for OpenGL
> > emissive color and another pigment for OpenGL diffuse color.
> > POV-Ray should compute the lighting on both of them and the
> > final color would be sum of these. Is it possible to do
> > this in POV-Ray?
>
> If I get it correctly:
> OpenGL     povray
> =========+=========
> emissive | ambient
> diffuse  | diffuse
>
> To perform a sum, use the average pigment with relevant map
>
> > http://wiki.povray.org/content/Documentation:Reference_Section_5.3#Average

Things are more difficult:

OpenGL           povray
===============+================
ambient  COLOR | ambient  COLOR
diffuse  COLOR | diffuse  float
specular COLOR | specular float
emission COLOR | (no equivalent, but can be emulated by ambient)

In OpenGL, ambient color is real color used for the computation of ambient light
contribution to the final color, while ambient on povray side is just pigment
filter.

In OpenGL diffuse, specular and emission are all colors that can be completely
different colors while povray's diffuse and specular is just float multiplying
pigment color.

As a result, OpenGL allows to specify for example blue diffuse color - e.g.
object is blue when lit by the light coming from the scene, and red ambient
light (e.g. surface shines red, provided that there is global ambient light in
the scene).

You may wonder why I need this, but it would allow to correctly show all the
models that are used in OpenSceneGraph, OpenGL, DirectX, and real-time graphics
in general.

Thanks for any good advice,
John


Post a reply to this message

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