POV-Ray : Newsgroups : povray.advanced-users : Why does my superellipsoid suck up the light? Server Time
26 Nov 2024 09:27:04 EST (-0500)
  Why does my superellipsoid suck up the light? (Message 1 to 2 of 2)  
From: CreeD
Subject: Why does my superellipsoid suck up the light?
Date: 4 Sep 2000 12:41:54
Message: <01c0168f$d2ef33c0$ae1ba1d0@mk>
Hi, I have a lighting problem..
I have a scene composed of several height fields used to simulate wooden
floorboards
and a stucco-y wall.  Now I'm trying to add a superellipsoid running along
the
junction between the wall and the floor (you know, the decorative trim
thing that lets you stub your toes somewhere)...

The superE for some reason is not catching the light at all.  It's pretty
far from the light source (maybe 200 units or so) but the light in POV
seems to reach forever anyway.  The rest of the scene shows up great with
this lighting.
I have to put {ambient 50} or so in the finish statement to make the SE
visible.
When I do that, the wooden texture on it doesn't show up at all, or shows
up in garish colors.  

	Do I have to add more light sources?  So far I like the lighting a lot and
don't want to mess it up.  Also, due to some weird artifact of height
fields (I guess) the light source is way over to the 'left' side of the
floor, but the light is most prominent on the right.  I made sure my camera
was placed properly.  Is this effect due to the bumps in the floor facing
the light?

Bare bones code follows.  Plug in your favorite TGA if you want to actually
try running it (my TGA's were a top down view of a black-and-white wooden
texture applied to a plain). 
	The SE is at <0,0> because I want it to show up before I play with the
roundness of it, that's why I'm not just using a box.

//code
#version unofficial MegaPOV 0.5;

global_settings { assumed_gamma 2.2 radiosity {}
photons{count 40000    autostop 0    jitter .4}
 }
 

#include "colors.inc"
#include "textures.inc"
#include "woods.inc"
#include "metals.inc"
#include "stones.inc"
#include "glass.inc"

#declare A=<0,60,0>;
#declare B=<-50,50,-30>;
#declare Random=seed(tick_count)

camera { 
   location B
   look_at 
   <0,0,0>}
   
light_source {
<-50,51,-30>
color White*1.5
//area_light <-20,0,-20>,<20,0,20>,5,5
//photons { refraction on reflection on}
} 

/*
The following creates the floorboards and lays them end to end.
*/

#declare Row = union {              

#declare Count = 0;
#while (Count < 10)

height_field{
 tga "HFTest" 
 translate -.5
 scale <10,.5,80>
 texture{

 //image_map {tga "HFTest"}
 T_Wood10 //turbulence .1
 translate Count*rand(Random)*4*<1,1,1>
 rotate z*rand(Random)*20
 normal {
 bump_map {tga "HFTest"}}
 finish{phong .3 phong_size 20}}
 translate -2.25*y translate z*80.3*Count
} 

#declare Count = Count + 1;
#end
}//end row union

#declare Planks1 = union { //lays alternating rows of floorboards side by
side.
#declare Count = 0;
#while (Count < 5)   
object {Row translate <20.1*Count,0,40>}
object {Row translate <10,0,0> translate <20.1*Count,0,0>} 
#declare Count = Count + 1;
#end
}//end Planks1 union

#declare Wall = 
height_field{
 tga "HFTest2" 
 translate -.5
 scale <500,.3,500>
 texture{
 pigment {White}
 }
 }

//and this is the problem superellipsoid ...
superellipsoid {
<0,0> scale <1,3,100> translate <40,1,0>
texture {T_Wood1}
finish {phong 1 phong_size 300}
}
 
object {Planks1 translate <-50,0,-50>}
object {Wall rotate <0,0,90> translate <50,-30,50>}


Post a reply to this message

From: Bob Hughes
Subject: Re: Why does my superellipsoid suck up the light?
Date: 4 Sep 2000 18:45:30
Message: <39b4260a$1@news.povray.org>
| superellipsoid {
| <0,0>

Direct out of the DOC:

"Very small values of e and n might cause problems with the root solver (the
Sturmian root solver cannot be used)."

e and n are the floats used within the <>.  It's best to keep those numbers
somewhat more than zero since anything could go wrong with the shape if very
small decimals are used.  Also there have been reports of problems while
aligning on axes but possibly unnoticeable until viewing a large enough
superellipsoid or close up.

Bob


Post a reply to this message

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