POV-Ray : Newsgroups : povray.bugreports : Superellipsoid+Crand=Problem Server Time
21 Nov 2024 22:34:12 EST (-0500)
  Superellipsoid+Crand=Problem (Message 1 to 4 of 4)  
From: Sven Littkowski
Subject: Superellipsoid+Crand=Problem
Date: 23 Mar 2018 16:37:53
Message: <5ab565a1$1@news.povray.org>
A part of a superellipsoid shape is not covered bzy crand.

Please try the following code to reproduce the faulty crand display (I
also used radiosity):

light_source
{
 < -300000.0, 100000.0, -300000.0 >
 color rgb < 1.0, 0.949, 0.850 >
}

camera
{
 location < -90.0, 20.0, -20.0 >
 look_at < -55.0, 0.0, 0.0 >
}

union
{
 superellipsoid
 {
  < 1.25, 0.25 >
 }
 texture
 {
  pigment { color rgb < 0.816, 0.752, 0.533 > }
  finish { crand 0.75 }
 }
 translate < 0.0, 1.0, 0.0 >
 scale < 0.5, 0.5, 0.5 >
 rotate < 0.0, 90.0, 0.0 >
}

---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com


Post a reply to this message

From: Le Forgeron
Subject: Re: Superellipsoid+Crand=Problem
Date: 24 Mar 2018 03:46:43
Message: <5ab60263$1@news.povray.org>
Le 23/03/2018 à 21:37, Sven Littkowski a écrit :
> A part of a superellipsoid shape is not covered bzy crand.
> 
> Please try the following code to reproduce the faulty crand display (I
> also used radiosity):
> 
> light_source
> {
>  < -300000.0, 100000.0, -300000.0 >
>  color rgb < 1.0, 0.949, 0.850 >
> }
> 
> camera
> {
>  location < -90.0, 20.0, -20.0 >
>  look_at < -55.0, 0.0, 0.0 >
> }
> 
> union
> {
>  superellipsoid
>  {
>   < 1.25, 0.25 >
>  }
>  texture
>  {
>   pigment { color rgb < 0.816, 0.752, 0.533 > }
>   finish { crand 0.75 }
>  }
>  translate < 0.0, 1.0, 0.0 >
>  scale < 0.5, 0.5, 0.5 >
>  rotate < 0.0, 90.0, 0.0 >
> }
> 
> ---
> Diese E-Mail wurde von AVG auf Viren geprüft.
> http://www.avg.com
> 

Which version of povray ?
I tried it on 3.7, adding the two extra lines at start:
#version 3.7;
global_settings{ assumed_gamma 1.0 }


I even added a sky_sphere to get a bit of background
sky_sphere{
  pigment { color srgb <0.6, 0.4, 0.2 >}
}

And from that point, I do not see your problem, after checking the
documentation:
The crand keyword can be added to a finish to cause a minor random
darkening in the diffuse reflection of direct illumination. Typical
values range from crand 0.01 to crand 0.5 or higher. The default value
is 0.

Darkening is happening.

The difference between a.png & b.png is commenting the finish.

Same shape, darkened with crand. Of course with a black background, some
part does not appear, black on black is hard to see from simple black.


Post a reply to this message


Attachments:
Download 'a.png' (6 KB) Download 'b.png' (6 KB)

Preview of image 'a.png'
a.png

Preview of image 'b.png'
b.png


 

From: Kenneth
Subject: Re: Superellipsoid+Crand=3DProblem
Date: 25 Mar 2018 00:50:00
Message: <web.5ab7292676ba8cd7a47873e10@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

>
> ...checking the documentation:
> The crand keyword can be added to a finish to cause a minor random
> darkening in the diffuse reflection of direct illumination.

I actually didn't know about this 'direct illumination' caveat until several
weeks ago; I had not read the documentation carefully enough. (I thought crand
would always show up over the entire scene, regardless of lights or no lights.)

Sven, try running this simple scene (with antialiasing or without it.) It shows
that crand appears only on directly-lighted surfaces. Crand will not show up in
un-lighted shadows OR on surfaces that are only 'illuminated' by emission or
ambient. And it does not appear on objects that are pure black in color (rgb
0.0)-- probably because 'black crand on black' looks like pure black anyway, as
Le Forgeron says.

--------------
#version 3.7;
global_settings {assumed_gamma 1.0}

camera {
  perspective
  location  <.5, .5, -15>
  look_at   <.5, .5,  0>
  right     x*image_width/image_height
  angle 20
}

light_source {
  0*x
  color rgb 1.0
  translate <20, 40, -20>
}

plane{z,1.5
    pigment{rgb .1} // If this is pure BLACK, no crand shows up,
// regardless of any lighting.
    finish{ambient 0 emission .05 diffuse .95 crand 1.0}
    }

sphere{0,1 translate 1*y
  pigment{rgb .5} finish{ambient 0 emission .1 diffuse .9 crand 1.0}
  }


Post a reply to this message

From: Kenneth
Subject: Re: Superellipsoid+Crand=3D3DProblem
Date: 25 Mar 2018 01:10:01
Message: <web.5ab72f05e0236274a47873e10@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

>
> Sven, try running this simple scene (with antialiasing or without it.)

There is an easy way to MAKE crand appear everywhere (to a more or less extent):
by putting a dim light_source AT the camera position, while optionally turning
down all the scene's emission and ambient values to 0.0. This additional direct
lighting will substitute for any ambient light; and the shadows cast from this
light will not appear, because they are hidden behind the objects in the scene.


Post a reply to this message

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