![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
How do I get the table's shadows on the back wall? here's my 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{
<-1.5,-2.1,-1.5>,<1.5,2,6>
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{
<-1.5,-2.1,-1.5>,<1.5,2,6>
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{
<-1.5,-2.1,-1.5>,<1.5,2,6>
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>
}
// a round table
union{
cylinder{
0*y .100*y 1.5
}
cylinder{
0*y 1.4*y .300
translate y*.100
}
cylinder{
0*y .001*y 3
translate 1.5*y
}
texture{
T_Wood1
}
translate y*-5.5
translate z*-20.5
scale <.350,.350,.350>
}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Wade" <Zav### [at] aol com> wrote in message
news:3b9d48a1$1@news.povray.org...
> How do I get the table's shadows on the back wall?
I think you should have listened before when Warp was telling you about the
walls and ceiling pigments filtered transparency and needing a rgb <1,1,1>
instead of just color 1.
And that I had said your light source is way outside the room too, as well
as changing the zeroes in your scales to either 1 or some small non-zero
number.
I hadn't followed what you're doing but it sure looks like the script has
touches of Moray in there judging by those decimal numbers and I'm not sure
if you realize how you've cobbled it all together or not. Maybe you do, but
since you seem new to it I have to think maybe you don't know what you're
doing. :-)
Anyhow, I took that script and changed it to get the shadow of the table on
that back wall Seriously though, I can't tell what you're trying to do in
making the room the way you did. I'd have simply differenced out a slightly
smaller box from a larger one.
#include "colors.inc"
#include "woods.inc"
//background {color White}
light_source{
0*x
color 1
area_light
<0.8,0,0> <0,0,0.8> // narrower area
4, 4
adaptive 1
jitter
translate <1,-2,-5> // inside room, near table and below left of it
}
camera {
location <0, 0, 11>
look_at 0
angle 40
}
// Right Wall
box{
<-1.5,-2.1,-1.5>,<1.5,2,6>
inverse
texture{
pigment{
color rgb <1,1,1>// -(1-Khaki)*.490 // just to make things regular
}
normal{
wrinkles 0.2
}
}
scale <0.1, 1.5, 3.5>
translate <-2.938508, 0, .140896>
}
// Left Wall
box{
<-1.5,-2.1,-1.5>,<1.5,2,6>
inverse
texture{
pigment{
color rgb <1,1,1>// -(1-Khaki)*.490
}
normal{
wrinkles 0.2
}
}
scale <0.1, 1.5, 3.5>
translate <2.938508, 0, .140896>
}
// back wall
box{
<-1.5,-2.1,-1.5>,<1.5,2,6>
inverse
texture{
pigment{
color rgb <1,1,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,1,1.22>
}
// The ceiling
box{
<2.938508,0,6.838508>,<-2.938508,0,-6.838508>
texture{
pigment{
color rgb <1,1,1>// -(1-Khaki)*.49000245
}
}
translate y*2.0185
scale <1.3,1,1.22>
}
// a round table
union{
cylinder{
0*y .100*y 1.5
}
cylinder{
0*y 1.4*y .300
translate y*.100
}
cylinder{
0*y .001*y 3
translate 1.5*y
}
texture{
T_Wood1
}
translate y*-5.5
translate z*-20.5
scale <.350,.350,.350>
}
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Maybe you do, but
> since you seem new to it I have to think maybe you don't know what you're
> doing. :-)
it's my very 1st scene ever. plus I didn't understand Warp or you were
saying. Sorry I will ask more questions.
Wade
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Wade wrote:
>
> How do I get the table's shadows on the back wall? here's my code:
>
Here's why:
> light_source{
[snip]
> translate <40,180,40>
> }
> // a round table
> union{
> translate y*-5.5
> translate z*-20.5
> scale <.350,.350,.350>
> }
Since your table's final position is < 0, -3.25, -7.15 > (scale works
about the origin, so your translates get scaled as well), your light
shines down on it with an angle of ~12 degrees. Not enough to move the
shadow to the wall.
Here are a few tips.
1 - Place the objects in your scene before starting to work on textures.
2 - Learn the basics before playing with area_lights, warps and
color_maps
3 - Learn how vectors work and their syntax in POV.
4 - Learn how POV handles colors, filter and transmit
THEN: play with a modeller.
I don't want to sound too harsh, but knowing what your modeller does
"under the hood" will not only help you a lot with your scenes, but
you'll also be able to realise that the basic laws still hold: Walls
aren't transparent. Walls and ceilings meet. Floors don't hover.
Lights are inside rooms. Etc... Right now, it sure looks like you're
pointing and clicking your way around without knowing what you're doing.
In the off chance that you aren't using a modeller, I'd strongly suggest
you make your room dimensions easier; say 10x10x8.
--
Francois Labreque | Unfortunately, there's no such thing as a snooze
flabreque | button on a cat who wants breakfast.
@ | - Unattributed quote from rec.humor.funny
videotron.ca
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Wade wrote:
>
> How do I get the table's shadows on the back wall? here's my code:
I modified your code to fix a few of the problems it had, and made the
dimensions a bit easier to work with. I hope you'll find that it looks
nicer (I'm not talking about the indentation, but the clarity).
You have some fine textures, here. Keep it up!
#include "colors.inc"
#include "woods.inc"
#declare Wall_Texture = texture{
pigment{ color White-(White-Khaki)*0.495 }
normal{ wrinkles 0.2 }
}
#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;
#declare Floor_Texture = texture{
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 }
}
}
light_source{
< 9, 9, 9 >
color White
area_light
< 2, 0, 0 > < 0, 0, 2 >
8, 8
adaptive 0
jitter
}
camera {
location <0, 5, 11>
look_at < 0, 5, -10 >
}
// Right Wall
box{
<10, 0, -12 > <11, 10, 12 >
texture{ Wall_Texture }
}
// Left Wall
box{
< -11, 0, -12> <-10, 10, 12>
texture{ Wall_Texture }
}
// back wall
box{
< -10, 0, -12 > < 10, 10, -13 >
texture{ Wall_Texture }
}
// The floor
box{
< -10, -1, -12> < 10, 0, 12 >
texture{ Floor_Texture }
}
// The ceiling
box{
< -10, 10, -12> < 10, 11, 12 >
texture{ Wall_Texture }
}
// a round table
union{
cylinder{ < 0, 0, 0 > < 0, 0.1, 0 > 1.5 }
cylinder{ < 0, 0, 0 > < 0, 1.4, 0 > 0.3 translate 0.1*y }
cylinder{ < 0, 0, 0 > < 0, 0.1, 0 > 3 translate 1.5*y }
texture{ T_Wood1 }
translate z*-7.25
}
--
Francois Labreque | Unfortunately, there's no such thing as a snooze
flabreque | button on a cat who wants breakfast.
@ | - Unattributed quote from rec.humor.funny
videotron.ca
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Wade" <Zav### [at] aol com> wrote in message news:3b9d7d74@news.povray.org...
> Maybe you do, but
> > since you seem new to it I have to think maybe you don't know what
you're
> > doing. :-)
>
>
> it's my very 1st scene ever. plus I didn't understand Warp or you were
> saying. Sorry I will ask more questions.
Nah, don't be sorry. I should be for maybe sounding like you weren't
listening to us instead of having trouble understanding things.
It's been so long ago since I began using POV (8 years!) I hardly know
anymore what it's like to start out in it. But I think Ron is very right in
that I too will never really master POV-Ray.
Besides, answers need questions (?) :-)
Bob H.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Nah, don't be sorry. I should be for maybe sounding like you weren't
> listening to us instead of having trouble understanding things.
Thanks for understanding, Bob. How do I create a doorway with a
partly-closed door allowing some light in?
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thank you Francois for cleaning my code up. I've a question though: why did
you remove the inverse?
Wade
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"Wade" <Zav### [at] aol com> wrote in message
news:3b9fe8e2$1@news.povray.org...
> How do I create a doorway with a
> partly-closed door allowing some light in?
Ahhh, the wonders of CSG...
With the room script I last saw you'd need to put difference {} around the
wall the door is to be. Also place the texture into the end of that
'difference' so that the door frame shows as a color. But you can also put
a new texture into the box used for the doorway cutout too.
Basically:
// left wall
difference {
box { // wall
<-2,-1,-6>,<2,1,6>
scale <0.1,1,1>
}
box { // doorway cutout
<-0.21,-1,-3>,<0.21,0.7,-2>
}
texture {pigment {rgb <1,1,1>}}
translate <2,0,0>
}
I'm just guessing at dimensions and placement here, you'll want to change
those.
I must point out something about the way you are going about your scene.
There doesn't seem to be any real world units used, i.e. meters, feet,
yards, etc. That makes it difficult to accumulate the scene because you
always have to reference at least some part of it to know where and what
size things will be.
Anyway, notice that the scaled wall box is at 0.2 POV units along +/- x,
making it 0.4 total thickness, then the doorway box is a couple hundredths
thicker so it will complete the CSG correctly. As well as being postioned
from floor (-1*y) to near ceiling but not quite (+0.7*y) and a width of 1
unit along z.
Apologies if I'm explaining what you already knew or even if you can't
follow me easily.
This should be the idea you asked about as far as creating the doorway. To
make the door and it be ajar (opened a little) there is a little more to it.
Really actually simple though. You make the box (with texture added) so one
side where the hinges would be is along 0*y. Something like: box
{<0,-1,0>,<0.1,0.7,1>} where the 0*x and 0*z axes are the pivot plane
(corner edge of door). Add rotate -15*y to the box statement for the amount
of open/close. Finally translate into place where the doorway is, in this
example it would be at <1.8,0,-3>, since the cutaway was put at <1.8,-1,-2>
to <2.2,0.7,-3> (so -2 to -3 * z is door width and position) and the door
itself goes from zero to one z.
Hinges would be inside room in this case, toward +z, and door opens on
the -z side into room. Adding clock to the rotation for animation, or just
a predeclared variable, makes it easy to change the door movement.
Since you used a +z placed camera last I saw this opens the door so light
outside wouldn't go toward the table and back wall though so you'll need to
turn that all around. Sorry. I'm getting confused. I'm not trying this as
I go, just writing it here so be aware this could be faulty.
Basically you can see how it matters a whole lot how you go about setting it
all up from the beginning. The door could be placed into a union of the
difference so that when translating it to the right or left it all goes
together rather than piecing it in later. Obviously it's all something
individual people must learn to do in their own way.
Bob H.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Wade wrote:
>
> Thank you Francois for cleaning my code up. I've a question though: why did
> you remove the inverse?
>
> Wade
It really doesn't matter as you're not doing CSG or media, but a shape
without the inverse has the interior inside the limits of the shape. By
putting "inverse", you fill your universe with the shape EXCEPT inside
the limits of the shape.
Render the following example to see the difference:
//---8<---8<---8<---8<---
#include "colors.inc"
intersection{
box{ < -5, 0, -2 > < -1, 4, 2 > }
sphere{ < -3, 2, 0 > 2.5 }
texture{ pigment{ color Blue } }
}
intersection{
box{ < 1, 0, -2 > < 5, 4, 2 > }
sphere{ < 3, 2, 0 > 2.5 inverse }
texture{ pigment{ color Red } }
}
light_source{ < 10, 10, -10 > color White }
camera{ location < 0, 2, -10 > look_at < 0, 2, 0 > }
//---8<---8<---8<---8<---
As you can see, the shape that is defined by the blue sphere is inside
the surface, whereas the shape defined by the red one is the outside.
--
Francois Labreque | Unfortunately, there's no such thing as a snooze
flabreque | button on a cat who wants breakfast.
@ | - Unattributed quote from rec.humor.funny
videotron.ca
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |