 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hi I am trying to render a scene of a child's room with some toya on
the floor and a bed in the corner. Everything renders fine except for
two plastic blocks that have wheels on. The wheels and the knobs on top
of the blocks come out as planned but the main part of the block comes
out as being black.
The two blocks are identical except for colour, one is meant to be blue
with white wheels and the other is white with red wheels
The code related to the two blocks is below. Please tell me what i've
done wrong. I'm using Povwin3.02 if it helps.
#declare Bottom = box { <-4, 4, -5>
<4, 6, -7>
finish {
ambient .3
diffuse .6
}
}
#declare Knob1 = cylinder { <-3, 6, -6.5>
<-3, 7, -6.5> .5
}
#declare Knob2 = object { Knob1
translate <2, 0, 0>
}
#declare Knob3 = object { Knob2
translate <2, 0, 0>
}
#declare Knob4 = object { Knob3
translate <2, 0, 0>
}
#declare Knob5 = object { Knob4
translate <0, 0, 1>
}
#declare Knob6 = object { Knob5
translate <-2, 0, 0>
}
#declare Knob7 = object { Knob6
translate <-2, 0, 0>
}
#declare Knob8 = object { Knob7
translate <-2, 0, 0>
}
#declare Wheel1 = cylinder { <-3, 4, -7.5>
<-3, 4, -7> 1
}
#declare Wheel2 = object { Wheel1
translate <6, 0, 0>
}
#declare Block_1 = union {
object {Knob1}
object {Knob2}
object {Knob3}
object {Knob4}
object {Knob5}
object {Knob6}
object {Knob7}
object {Knob8}
object {Bottom}
}
#declare Block_2 = object {Block_1
translate <10, 0, 0>
}
#declare Tyres = union {
object {Wheel1}
object {Wheel2}
}
#declare Tyres_A = object {Tyres
translate <10, 0, 0>
}
object {Block_1
pigment {Blue}
}
object {Block_2
pigment {White}
}
object {Tyres
pigment {White}
}
object {Tyres_A
pigment {Red}
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 18 Dec 1997 16:59:47 +1100, Mark Hyde <mlh### [at] northnet com au>
wrote:
>Hi I am trying to render a scene of a child's room with some toya on
>the floor and a bed in the corner. Everything renders fine except for
>two plastic blocks that have wheels on. The wheels and the knobs on top
>of the blocks come out as planned but the main part of the block comes
>out as being black.
>
>#declare Bottom = box { <-4, 4, -5>
> <4, 6, -7>
> finish {
> ambient .3
> diffuse .6
> }
>}
[ ... ]
>#declare Block_1 = union {
[ ... ]
> object {Bottom}
>}
[ ... ]
>object {Block_1
> pigment {Blue}
>}
It looks as though the texture on a union doesn't override any
textures specified for the components of the union. I wasn't able to
find where this is mentioned in the documentation, if anywhere, but if
you move your finish statement from the declaration of Bottom to the
declaration of Block_1 (where it should probably be anyway) it works
just fine.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 18 Dec 1997 14:14:50 GMT, ron### [at] farmworks com (Ronald L. Parker)
wrote:
>
>It looks as though the texture on a union doesn't override any
>textures specified for the components of the union.
That is correct. The way I think about it is "The texture of a parent
(union CSG in this case) applies to any and all children (primitives
or other CSGs that make up the parent) unless that child has a texture
of its own specified."
-----------
George Hunt --- Raytracer Obsessivo
http://ourworld.compuserve.com/homepages/lightsword
102### [at] compuserve com
-----------
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Mark Hyde (mlh### [at] northnet com au) wrote:
[...]
> #declare Bottom = box { <-4, 4, -5>
> <4, 6, -7>
[...]
> }
Here is one error. _Each_ component of the first if the two vectors
defining the corners of the box should be less than the corresponding
one in the second vector. See what I mean?
box {
<x1, y1, z1>, <x2, y2, z2>
}
where x1 < x2, y1 < y2, z1 < z2. Here:
#declare Bottom = box {
<-4, 4, -7>, <4, 6, -5>
}
Let us know if this correction does not work.
B-o-b
--
bob### [at] casimir rezel enst fr -- Linux, POV-Ray, LaTeX
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Roland Mas (bob### [at] casimir rezel enst fr) wrote:
: Mark Hyde (mlh### [at] northnet com au) wrote:
: [...]
: > #declare Bottom = box { <-4, 4, -5>
: > <4, 6, -7>
: [...]
: > }
: Here is one error. _Each_ component of the first if the two vectors
: defining the corners of the box should be less than the corresponding
: one in the second vector. See what I mean?
Why? I have never had any problem with that.
--
- Warp. -
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Yeah, it makes no difference.
--
Alan Grainger
Member of DNRC
E-mail - scythex*@geocities.com
Homepage - http://alansworld.home.ml.org
Remove * from e-mail address to reply
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |