POV-Ray : Newsgroups : povray.newusers : Combining objects? Server Time
5 Nov 2024 03:15:30 EST (-0500)
  Combining objects? (Message 1 to 3 of 3)  
From: IntersectedShape
Subject: Combining objects?
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

From: Warp
Subject: Re: Combining objects?
Date: 21 Jun 2004 13:50:40
Message: <40d71ff0@news.povray.org>
IntersectedShape <nomail@nomail> wrote:
> #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:

  Use "object { fb }" instead of "fb".

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: IntersectedShape
Subject: Re: Combining objects?
Date: 3 Jul 2004 12:15:01
Message: <web.40e6da604af355a29a9a6bf70@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> IntersectedShape <nomail@nomail> wrote:
> > #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:
>
>   Use "object { fb }" instead of "fb".

Just wanted to say thanks for the response - my message took several days to
post for some reason and I'd given up looking for it. I did finally figure
this out, it seemed very non-intuitive since a) "fb" is already inside an
object structure elsewhere and b) the error message didn't seem clear at
all. I have made a lot of progress since though!

Thanks to the POVRay team for all the hard work. It's an impressive piece of
software! :-)


Post a reply to this message

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