POV-Ray : Newsgroups : povray.general : no_image behaviour : Re: no_image behaviour Server Time
5 May 2024 08:17:21 EDT (-0400)
  Re: no_image behaviour  
From: Alain
Date: 21 Jun 2018 16:53:19
Message: <5b2c103f$1@news.povray.org>
Le 18-06-21 à 04:48, jr a écrit :
> hi,
> 
> William F Pokorny <ano### [at] anonymousorg> wrote:
>> The latest 'Pre_release' has been good to me.
>> https://github.com/POV-Ray/povray/releases/tag/v3.8.0-alpha.9606898
> 
> thanks.  after installing I tried your code, and yes, you were correct, the
> scene demonstrates the exact effect I'm after.
> 
> so I printed out the code for closer examination.  it must have taken me 20 mins
> or so before I saw where the colours are coming from (the trailing commas in
> user_defined{} did that  :-)), and perhaps as long again to understand why the
> enclosing sphere doesn't display in white.
> 
> I thought I now have a handle on this - until I changed the green component of
> the user_defined from multiply to add.  :-)  and now I have more questions..
> 
> so, I do not understand why the multiplication and addition differ.  I get the
> changed colours, but not why the part of the hidden sphere which does not
> intersect the reveal box only shows when added or why it doesn't when
> multiplied.
> 
> another question regards the actual density of box and hidden sphere.  their
> densities decrease away from the centres because functions are used, I presume.
> how would one get an uniformly dense box and/or sphere?  is a DF3 needed?
> 
> and, last question, is there a particular reason that the media colour is rgb
> while all other colours are sRGB?
> 
> thank you again for the code (and your time), I feel I'm learning.
> 
> 
> regards, jr.
> 
> 
> 
> 

The actual effect of all media depend on how long is the path through 
them as well as it's density. Double the path's length and you double 
it's contribution.
Next, that density can get affected with some pattern, like spotted, 
granite, spherical, planar, ... You don't need to use any DF3.
If you don't use any pattern, then the media's density is uniform and 
only the length of the paths through it will affect the end result.

Using an orthographic camera parallel to an axis and a container/pattern 
aligned to the axis can ensure that all paths are of the same length. In 
all other cases, you can't be sure that all paths have the same length 
unless you are extremely careful.

Take those colours : rgb<1,0,0.5> and rgb<0,1,0.5>
When you  multiply them, you get :
Mult = <1,0,0.5>*<0,1,0.5> = <1*0, 0*1, 0.5*0.5> = <0,0,0.25> (dark blue)
When you add then, you get :
Add = <1,0,0.5>+<0,1,0.5> = <1+0, 0+1, 0.5+0.5> = <1,1,1> (white)
That's when working in rgb or linear colour space.

If you use srgb instead, the actual values you give are gamma adjusted 
before the rendering start. If all of the colour components are 0 or 1, 
then, it makes no difference to use rgb or srgb. In all other cases, 
there is a difference.
rgb<0.1, 0.5, 0.8> is not the same as srgb<0.1, 0.5, 0.8>

Whenever you have additive effects to take into account, you need to 
work in linear colour space to get accurate results. That's why it's 
highly recommended to always use "assumed_gamma 1" in the 
global_settings block.


Post a reply to this message

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