POV-Ray : Newsgroups : povray.windows : Block colour not being rendered : Block colour not being rendered Server Time
28 Jul 2024 20:25:38 EDT (-0400)
  Block colour not being rendered  
From: Mark Hyde
Date: 18 Dec 1997 00:59:47
Message: <3498BBD0.F6C2DA24@northnet.com.au>
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

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