POV-Ray : Newsgroups : povray.newusers : Combining objects? : Combining objects? Server Time
30 Jul 2024 10:21:37 EDT (-0400)
  Combining objects?  
From: IntersectedShape
Date: 21 Jun 2004 11:52:01
Message: <web.40d18f74ad894901f5cb6e800@news.povray.org>
File Context (5 lines):
}
#declare fbb = merge {
  fb
  object
Parse Error: No matching } in 'merge', object found instead

"fb" is a union of four boxes, with an applied texture:

#declare fb = union {
  box {
    <-1.75, 2.0, -0.1> <1.75, 2.25, 0.15>
  }
  box {
    <-1.75, -0.25, -0.1> <1.75, 0.0, 0.15>
  }
  box {
    <-1.75, -.05, -0.1> <-1.50, 2.05, 0.15>
  }
  box {
    <1.75, -.05, -0.1> <1.50, 2.05, 0.15>
  }
  texture{
     White_Marble
     //pigment{ color rgb<0.9,0.9,0.9> }
     //normal { crackle 0.75 turbulence 0.25 scale 0.25 }
     finish {ambient 0.5 diffuse 0.5}
  }
}

#declare fbb = merge {
  fb
  object {
    polygon {
      5,
      <-1.5, 2, .1>, <-1.5, 0, .1>,
      <1.5, 0, .1>, <1.5, 2, .1>,
      <-1.5, 2, .1>
      finish {
         diffuse 0.2
        ambient 0.8
        specular 0.0
        conserve_energy
      }
    }
  }
}

Should it, in general, be possible to combine multiple objects into a more
complex object? Are there restrictions to the number of levels of
composition, textures, types of component objects and so on?

This seems like it should be a simple thing, but I've thrashed with it for a
while now... My goal is to provide a "framed billboard" (frame composed of
boxes) with one textured (pigmented) polygon in front, and a plain polygon
in back to hide the back of the front polygon. I'd like the frame and
backing to be an object (fbb) that I could then compose multiple times with
different front polygons to produce various unique billboards in my scene.

Thanks in advance for any help! I'm excited about getting more POV-Ray
expertise...it is very cool! :-)


Post a reply to this message

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