POV-Ray : Newsgroups : povray.general : WIP stargate - lighting problems Server Time
5 Aug 2024 00:19:07 EDT (-0400)
  WIP stargate - lighting problems (Message 1 to 4 of 4)  
From: Richard Morehouse
Subject: WIP stargate - lighting problems
Date: 24 Jan 2003 11:16:33
Message: <uvo23vocd7d79u1a4523f5gh35a6hs0pf2@4ax.com>
can someone please tell me why some of these objects do not appear lit
up. they are identical objects rotated about the z axis

Thanks

Richard 

image:
http://news.povray.org/povray.binaries.images/30039/

source:
// Desc: stargate chevron test
// Date: 01/24/2003
// Auth: Richard Morehouse

#include "kolors.inc"  // ken tyler's color includes
#include "stones.inc"
#include "textures.inc"
#include "shapes.inc"
#include "shapes2.inc"
#include "glass.inc"
#include "metals.inc"
#include "woods.inc"
#include "colors.inc"
#include "skies.inc"  
#version 3.5;

global_settings {  assumed_gamma 1.0
  max_trace_level 20
}

#macro Clipcyl(Rad,h,Rot) 
intersection {
box{<0,-((h/2)+1),-(Rad+1)><(Rad+1),(h/2)+1,(Rad+1)>rotate y*-Rot/2} 
box{<0,-((h/2)+1),-(Rad+1)><-(Rad+1),(h/2)+1,(Rad+1)> rotate y*Rot/2}
cylinder{-h/2*y,h/2*y,Rad}
}
#end

#local SGTex = texture {pigment{granite   
color_map {[0.0 Gray30][0.5 Gray50][1.0 Gray70]}
scale 32} finish {specular 0.7}}


#local s0=sin(radians(10));
#local c0=cos(radians(10));
#local s1=s0/c0;
#local s2=sin(radians(25))/cos(radians(25));

#declare chevbox1=intersection{
box{<0,0,0> <-12,31,12>} 
box{<0,0,0><6,30,6> rotate y*-45}
}
#declare chevbox2=intersection{
box{<0,0,0> <12,31,12>}
box{<0,0,0><6,30,6> rotate y*-45}
}
#declare Chevlightslits=
union{
#declare i=0;
#while (i<6)
box{<-44,11+i,1><44,11.25+i,-10>}
#declare i=i+1;
#end
}
#declare Chevlights=
union{
#declare i=0;
#while (i<6)
light_source{<s2*(2+11.125+i),11.125+i,-.25> color Orange*6 fade_power
1 fade_distance 4}
light_source{<-s2*(2+11.125+i),11.125+i,-.25> color Orange*6
fade_power 1 fade_distance 4}
#declare i=i+1;
#end
light_source{<-3,17.75,-.5> color Yellow*4 fade_power 1 fade_distance
20}
light_source{<0,17.75,-.5> color Yellow*4 fade_power 1 fade_distance
10}
light_source{<3,17.75,-.5> color Yellow*4 fade_power 1 fade_distance
20}
light_source{<0,11,-.5> color Red*6 fade_power 1 fade_distance 24}
}
 
 
#declare Chevron3=intersection{box{<-44,0,0><44,44,-10>}
union{
union{object{chevbox1 scale <.5,1,1>} object{chevbox2 } rotate z*-25}
union{object{chevbox1} object{chevbox2 scale <.5,1,1>} rotate z*25}
intersection{object{Clipcyl(32,7,50) rotate x*-90}  
difference{box{<-6,0,0><6,6,6>} cylinder{y*-1,y*7,.15}
box{<-7,0,2><7,10,-10> rotate x*-60 translate y*5}}}
translate y*-2 rotate x*-10}} 
#declare Chevron4= intersection {
object{Chevron3  translate z*.25}
object{Chevlightslits}
}
#declare Chevron5=intersection{cylinder{0*z,-7*z,124.875}
difference{object{Chevron3} 
object{Chevlightslits}

translate y*106 translate z*-2}
texture {SGTex}}
#declare chevlightshp=intersection{
box{<-44,0,-10><44,20,-0.01>}
 object{Chevron4} no_shadow
  }
#declare Chevron6= intersection{cylinder{0*z,-7*z,124.875}  
difference{
intersection{object{Clipcyl(32,15,40) rotate x*-90}
box{<-44,5,0><44,35,-10>}}
intersection{object{Clipcyl(32,16,40) rotate x*-90}
box{<-44,5,-.125><44,35,-11>} translate y*2  }
box{<-44,-1,0><44,30,-10> rotate x*-10 }
translate y*106 translate z*-2}
 texture{SGTex}} 

#declare Chevron7=intersection{cylinder{0*z,-7*z,124.874} 
difference{
intersection{object{Clipcyl(32,16,40) rotate x*-90}
box{<-44,5,-.125><44,35,-11>} translate y*2  }
box{<-44,-1,0><44,40,-10> rotate x*-10  translate z*.001}
translate y*106 translate z*-2} } 

#declare Chlitglass1=pigment{color Orange*6 filter .9} 
#declare Chunlitglass1=pigment{color Orange filter .9} 

#declare Chlitglass2=pigment{ gradient y color_map{[0 Red*2 filter
.9][11/18 Red*2 filter .9][14/18 Yellow*2 filter .9][18/18 Yellow*2
filter .9]} scale 18}
#declare Chunlitglass2=pigment{ gradient y color_map{[0 Red filter
.9][11/18 Red filter .9][14/18 Yellow filter .9][18/18 Yellow filter
.9]} scale 18} 
  
#declare LitChevron=union{
object{Chevron5}
object{Chevron6}
object{Chevron7 no_shadow pigment{Chlitglass2}}
cylinder{y*109,y*112,.15 scale<3,1,1> translate -2.2*z texture{SGTex}
} 
object{chevlightshp pigment{Chlitglass1} finish {F_Glass1}
interior{I_Glass} translate y*106 translate z*-2}  
object{Chevlights translate y*106 translate z*-2}
}
#declare UnLitChevron=union{
object{Chevron5}
object{Chevron6}
object{Chevron7 no_shadow pigment{Chunlitglass2} finish {F_Glass1}
interior{I_Glass}}
cylinder{y*109,y*112,.15 scale<3,1,1> translate -2.2*z texture{SGTex}
} 
object{chevlightshp pigment{Chunlitglass1} finish {F_Glass1}
interior{I_Glass} translate y*106 translate z*-2}  
}
 
camera {location  <0.0, 120, -200>   look_at   <0.0, 120, 100>}
background{Black}

light_source {  <0, 0, 0> color rgb <1, 1, 1> translate <-200,
100,-1000>}

#declare litup=1;

#declare litflag=array[9] {1,1,1,1,1,1,1,1,1};
 
#declare i=0;
#while (i<9) 
#debug concat("C ",str(litflag[i]*litup,1,1),"\n")
#if ((litflag[i]*litup) >0 )
object{LitChevron rotate i*40*z translate y*120 translate z*100 }
#else
object{UnLitChevron rotate i*40*z translate y*120 translate z*100 }
#end
#declare i=i+1;
#end
// end of source


Post a reply to this message

From: Warp
Subject: Re: WIP stargate - lighting problems
Date: 24 Jan 2003 17:36:03
Message: <3e31bfd3@news.povray.org>
When posting a "why this scene doesn't work properly" question, it's
always a good idea to reduce the scene to the minimal (but still
complete, meaning that it's rendable as it is, ie. has the proper camera
and light definitions necessary to render it properly) possible.
It's also a bad idea to require some non-standard includes which people
might not have installed unless this include is very essential for
showing the problem (some color definitions aren't).

  This is a good practice for several reasons.
  Firstly it's polite: It reduces the amount of work for people (who, after
all, are helping you for the goodness of their heart) have to do in order
to find the problem in question. It's polite to first make some work to
make it easier for people to study your scene.
  Secondly, the smaller and simpler your scene is, the more probably people
will look at it and find an answer. If the scene is too complicated, most
people will simply skip it.
  Thirdly, while you reduce the scene you might find the problem yourself,
thus avoiding the whole trouble and probably learning something new.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: rmorehouse
Subject: Re: WIP stargate - lighting problems
Date: 24 Jan 2003 18:25:04
Message: <web.3e31ca6f5878f57a2a1c8f120@news.povray.org>
Warp wrote:
>  When posting a "why this scene doesn't work properly" question, it's
>always a good idea to reduce the scene to the minimal

   (snip remainder of warp's chastisement of me :) )


ouch that hurt :)

this is only the part that is acting wierd. if i had included the entire
scene  it would have been much larger. i will try to reduce it even more.

in this case  you can use colors.inc in the place of kolors.inc. sorry
all of the other includes are standard.


any other suggestions?

Richard


Post a reply to this message

From: rmorehouse
Subject: Re: WIP stargate - lighting problems
Date: 30 Jan 2003 03:35:03
Message: <web.3e38e3995878f57a186aded30@news.povray.org>
problems fixed

the finish{specular 0.7} parameter in SGTex
and the *2's in the Chlitglass2 texture were the problem

Thank you,  Mike Williams


 new render of the stargate  at

http://news.povray.org/povray.binaries.images/30137

does anyone want source?

Richard


Post a reply to this message

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