POV-Ray : Newsgroups : povray.newusers : Making shadows and making more visible wall texture Server Time
4 Nov 2024 23:20:37 EST (-0500)
  Making shadows and making more visible wall texture (Message 1 to 5 of 5)  
From: Wade
Subject: Making shadows and making more visible wall texture
Date: 7 Sep 2001 16:32:15
Message: <3b992ecf$1@news.povray.org>
How do I make shadows?  How do I make my wall texture more visible?  Here's
my code:

#include "colors.inc"
#include "woods.inc"


background {color White}

light_source{
 0*x
 color White*1.1
 area_light
 <8,0,0> <0,0,8>
 8, 8
 adaptive 0
 jitter
 translate <40,180,40>
}

camera {
 location <0, 0, 11>
 look_at 0
 angle 40
}

// Right Wall

box{
 <1,1,1>,<-1,-1,-1>
 texture{
  pigment{
   color 1-(1-Khaki)*.490
  }
  normal{
   wrinkles 0.25
   scale 0.005
  }
  finish{
   ambient 0.266167
   diffuse 0.884867
  }
 }
 scale <0.1, 1.5, 3.5>
 translate <-2.938508, 0, .140896>
}

// Left Wall

box{
 <1,1,1>,<-1,-1,-1>
 texture{
  pigment{
   color 1-(1-Khaki)*.490
  }
  normal{
   wrinkles 0.25
   scale 0.005
  }
  finish{
   ambient 0.266167
   diffuse 0.884867
  }
 }
 scale <0.1, 1.5, 3.5>
 translate <2.938508, 0, .140896>
}

// back wall

box{
 <1,1,1>,<-1,-1,-1>
 texture{
  pigment{
   color 1-(1-Khaki)*.490
  }
  normal{
   wrinkles 0.25
   scale 0.005
  }
  finish{
   ambient 0.266167
   diffuse 0.884867
  }
 }
 scale <3.5, 1.86, 0.1>
 translate <0,0,-6.838508>
}


// The floor

#declare light_wood= pigment {P_WoodGrain7A  color_map {M_Wood7A} }
#declare  dark_wood= pigment {P_WoodGrain14A color_map {M_Wood14A} }

#declare board_length= 1.5;
#declare board_width= 0.25;

box{
 <2.938508,0,6.838508>,<-2.938508,0,-6.838508>
 pigment{
  gradient y triangle_wave
  pigment_map {
   [0.0 light_wood ]
   [1.0 dark_wood ]
  }
  warp{
   repeat board_length*z offset 0.37*y
  }
  warp{
   repeat board_width*x offset board_length*5/2*z
  }
 }
 normal {
  boxed
  slope_map {
   [0.5 <1,0>]
   [1.0 <0,0>]
  }
  bump_size 0.1
  scale <board_width,1,board_length>
  warp{
   repeat board_length*z
  }
  warp{
   repeat board_width*x offset board_length/2*z
  }
 }
translate y*-2.0185
scale <1.3,0,1.22>
}

// The ceiling

box{
 <2.938508,0,6.838508>,<-2.938508,0,-6.838508>
 texture{
  pigment{
   color 1-(1-Khaki)*.49000245
  }
 }
 translate y*2.0185
 scale <1.3,0,1.22>
}

Wade


Post a reply to this message

From: Steve
Subject: Re: Making shadows and making more visible wall texture
Date: 7 Sep 2001 17:33:34
Message: <slrn9pif7n.s4t.steve@zero-pps.localdomain>
On Fri, 7 Sep 2001 15:42:38 -0500, Wade wrote:
>How do I make shadows?  How do I make my wall texture more visible?  Here's
>my code:
>
>#include "colors.inc"
>#include "woods.inc"
>
>
>background {color White}
>
>light_source{
> 0*x
> color White*1.1
> area_light

Have a read of the docs on what area_lights do. 

At the moment you havn't got anything that would cast 
much of a shadow, only the walls and the floor.  Really
you want the walls and floor to be illuminated. 

Remove the area light code from your light and put a 
sperer at <0,2,0> and you should see it's shadow. 

Hope some of that helps. 

PS: I always use MidnightBlue for my background, but I suppose it's
a matter of taste. 

--
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

 10:27pm  up 56 days, 33 min,  2 users,  load average: 1.00, 1.24, 1.35


Post a reply to this message

From: Warp
Subject: Re: Making shadows and making more visible wall texture
Date: 7 Sep 2001 17:45:27
Message: <3b993ff7@news.povray.org>
The main problem you are having here is that your walls are transparent.
This can be seen by changing the background color.
  The easiest way of defining an opaque color is to use: rgb <1,1,1> (or
whatever values between 0 and 1 inside the vector).

  I revised your code a bit and perhaps this is more what you were looking
for?

---------8<-------------8<-------------8<--------------8<-------------8<-----
#include "colors.inc"
#include "woods.inc"


light_source
{ 0, color 1
 //area_light <8,0,0> <0,0,8> 8, 8 adaptive 0 jitter
 //translate <40,180,40>
}
camera {
 location <0, 0, 11>
 look_at 0
 angle 40
}

box
{ <-2.9,-2.1,-4><2.9,2,12>
  inverse
  pigment { rgb 1 }
  normal { wrinkles .2 }
}


// The floor

#declare light_wood= pigment {P_WoodGrain7A  color_map {M_Wood7A} }
#declare  dark_wood= pigment {P_WoodGrain14A color_map {M_Wood14A} }

#declare board_length= 1.5;
#declare board_width= 0.25;

box{
 <2.938508,0,6.838508>,<-2.938508,0,-6.838508>
 pigment{
  gradient y triangle_wave
  pigment_map {
   [0.0 light_wood ]
   [1.0 dark_wood ]
  }
  warp{
   repeat board_length*z offset 0.37*y
  }
  warp{
   repeat board_width*x offset board_length*5/2*z
  }
 }
 normal {
  boxed
  slope_map {
   [0.5 <1,0>]
   [1.0 <0,0>]
  }
  bump_size 0.1
  scale <board_width,1,board_length>
  warp{
   repeat board_length*z
  }
  warp{
   repeat board_width*x offset board_length/2*z
  }
 }
translate y*-2.0185
scale <1.3,1,1.22>
}
---------8<-------------8<-------------8<--------------8<-------------8<-----

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Wade
Subject: Re: Making shadows and making more visible wall texture
Date: 9 Sep 2001 20:16:24
Message: <3b9c0658$1@news.povray.org>
Do I need to inverse the ceiling?  And how do I shorten the shadows?  here's
the code:

#include "colors.inc"
#include "woods.inc"


background {color White}

light_source{
 0*x
 color 1
 area_light
 <8,0,0> <0,0,8>
 8, 8
 adaptive 0
 jitter
 translate <40,180,40>
}

camera {
 location <0, 0, 11>
 look_at 0
 angle 40
}

// Right Wall

box{
 <-2.9,-2.1,-4>,<2.9,2,12>
 inverse
 texture{
  pigment{
   color 1-(1-Khaki)*.490
  }
  normal{
   wrinkles 0.2
  }
  }
 scale <0.1, 1.5, 3.5>
 translate <-2.938508, 0, .140896>
}
// Left Wall

box{
 <-2.9,-2.1,-4>,<2.9,2,12>
 inverse
 texture{
  pigment{
   color 1-(1-Khaki)*.490
  }
  normal{
   wrinkles 0.2
  }
  }
 scale <0.1, 1.5, 3.5>
 translate <2.938508, 0, .140896>
}
// back wall

box{
 <-2.9,-2.1,-4>,<2.9,2,12>
 inverse
 texture{
  pigment{
   color 1-(1-Khaki)*.490
  }
  normal{
   wrinkles 0.2
  }
  }
  scale <3.5, 1.86, 0.1>
 translate <0,0,-6.838508>
}


// The floor

#declare light_wood= pigment {P_WoodGrain7A  color_map {M_Wood7A} }
#declare  dark_wood= pigment {P_WoodGrain14A color_map {M_Wood14A} }

#declare board_length= 1.5;
#declare board_width= 0.25;

box{
 <2.938508,0,6.838508>,<-2.938508,0,-6.838508>
 pigment{
  gradient y triangle_wave
  pigment_map {
   [0.0 light_wood ]
   [1.0 dark_wood ]
  }
  warp{
   repeat board_length*z offset 0.37*y
  }
  warp{
   repeat board_width*x offset board_length*5/2*z
  }
 }
 normal {
  boxed
  slope_map {
   [0.5 <1,0>]
   [1.0 <0,0>]
  }
  bump_size 0.1
  scale <board_width,1,board_length>
  warp{
   repeat board_length*z
  }
  warp{
   repeat board_width*x offset board_length/2*z
  }
 }
translate y*-2.0185
scale <1.3,0,1.22>
}

// The ceiling

box{
 <2.938508,0,6.838508>,<-2.938508,0,-6.838508>
 texture{
  pigment{
   color 1-(1-Khaki)*.49000245
  }
 }
 translate y*2.0185
 scale <1.3,0,1.22>
}


Post a reply to this message

From: Bob H 
Subject: Re: Making shadows and making more visible wall texture
Date: 10 Sep 2001 03:28:38
Message: <3b9c6ba6@news.povray.org>
"Wade" <Zav### [at] aolcom> wrote in message
news:3b9c0658$1@news.povray.org...
> Do I need to inverse the ceiling?  And how do I shorten the shadows?

Don't know what's going on that you might need to inverse the ceiling, no
media in there and normals shouldn't matter.
To shorten shadows you just need to narrow the area light axis lengths
(<8,0,0>,<0,0,8> smaller numbers there) or move the light farther away if
you can.  In v3.5 you can also use the parallel keyword in the light which
will shorten shadows in a way too.
Looks to me like you have the light far outside the room walls.

Don't scale by zero, BTW.  Use a very small number if you must but zero gets
changed to 1 and causes a warning message.

Bob H.


Post a reply to this message

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