POV-Ray : Newsgroups : povray.general : "reference objects" Server Time
17 Nov 2024 21:22:17 EST (-0500)
  "reference objects" (Message 1 to 7 of 7)  
From: Steve Shelby
Subject: "reference objects"
Date: 1 Feb 2003 09:14:40
Message: <3e3bd650@news.povray.org>
Hi,
I've been working with Moray for a couple years, and just recently started
learning to manipulate scenes in PovRay. One thing Moray has that I like is
the ability to create "reference objects", so that if you transform the
first object, all of the reference objects will automatically be transformed
in the same way. This is a great time saver. Does PovRay have a way of doing
the same thing?
Steve Shelby


Post a reply to this message

From: Jellby
Subject: Re: "reference objects"
Date: 1 Feb 2003 09:19:33
Message: <3e3bd775@news.povray.org>
Among other things, Steve Shelby wrote:

> Hi,
> I've been working with Moray for a couple years, and just recently started
> learning to manipulate scenes in PovRay. One thing Moray has that I like
> is the ability to create "reference objects", so that if you transform the
> first object, all of the reference objects will automatically be
> transformed in the same way. This is a great time saver. Does PovRay have
> a way of doing the same thing?

Well... you can #declare a transform and then reuse it as many times as you 
wish.

-- 

Linux User #289967 (counter.li.org)
PGP Pub Key ID: 0x01A95F99 (pgp.escomplinux.org)


Post a reply to this message

From: Dennis Miller
Subject: Re: "reference objects"
Date: 1 Feb 2003 10:51:41
Message: <3e3bed0d$1@news.povray.org>
Or you can declare an object and then use it numerous times... transform the
declared object and you get what you want.
D.

"Jellby" <jel### [at] M-yahoocom> wrote in message
news:3e3bd775@news.povray.org...
> Among other things, Steve Shelby wrote:
>
> > Hi,
> > I've been working with Moray for a couple years, and just recently
started
> > learning to manipulate scenes in PovRay. One thing Moray has that I like
> > is the ability to create "reference objects", so that if you transform
the
> > first object, all of the reference objects will automatically be
> > transformed in the same way. This is a great time saver. Does PovRay
have
> > a way of doing the same thing?
>
> Well... you can #declare a transform and then reuse it as many times as
you
> wish.
>
> --

> Linux User #289967 (counter.li.org)
> PGP Pub Key ID: 0x01A95F99 (pgp.escomplinux.org)


Post a reply to this message

From: Jellby
Subject: Re: "reference objects"
Date: 1 Feb 2003 11:58:34
Message: <3e3bfcba@news.povray.org>
Entre otras cosas, Dennis Miller tuvo a bien escribir:

> Or you can declare an object and then use it numerous times... transform
> the declared object and you get what you want.

Yes, that's the way if all the objects are the same as the "reference" one. 
But if they are of different kind (a sphere, a box, a cone, an mesh...), 
declaring the transform is the best way, isn't it?

-- 

Linux User #289967 (counter.li.org)
PGP Pub Key ID: 0x01A95F99 (pgp.escomplinux.org)


Post a reply to this message

From: Slime
Subject: Re: "reference objects"
Date: 1 Feb 2003 12:35:33
Message: <3e3c0565@news.povray.org>
#declare referenceobject = sphere {
0,1
//stuff
}

object {
referenceobject
// stuff
}
object {
referenceobject
// stuff
}
//etc

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Steve Shelby
Subject: Re: "reference objects"
Date: 1 Feb 2003 17:15:26
Message: <3e3c46fe@news.povray.org>
I set up the scene the way Slime presented it below, and for ordinary
transformations, it works OK. My problem is with The "bend" transformation,
using Chris Colefax's bend.inc. It works OK with one object, but when
reference objects are added, it doesn't work at all. Maybe it's just a flaw
in the bend program?
Steve
----- Original Message -----
From: Slime <slm### [at] slimelandcom>
Newsgroups: povray.general
Sent: Saturday, February 01, 2003 12:34 PM
Subject: Re: "reference objects"


> #declare referenceobject = sphere {
> 0,1
> //stuff
> }
>
> object {
> referenceobject
> // stuff
> }
> object {
> referenceobject
> // stuff
> }
> //etc
>
>  - Slime
> [ http://www.slimeland.com/ ]
>
>


Post a reply to this message

From: Vadim Sytnikov
Subject: Re: "reference objects"
Date: 2 Feb 2003 21:54:35
Message: <3e3dd9eb@news.povray.org>
"Steve Shelby" <ssh### [at] rexnetnet> wrote:
> I've been working with Moray for a couple years, and just recently started
> learning to manipulate scenes in PovRay. One thing Moray has that I like
is
> the ability to create "reference objects", so that if you transform the
> first object, all of the reference objects will automatically be
transformed
> in the same way. This is a great time saver. Does PovRay have a way of
doing
> the same thing?

Interestingly enough, the answer might as well be 'No' -- depending upon
what you're looking for.

If you're looking just for coding time etc. saving, then look at previous
answers.

However, please be warned that all those '#local's and '#declares' do next
to nothing to save memory -- except for (IIRC) textures and meshes. All
other objects will one day explode right into your face if you instantiate
them... err, generously enough, thinking that you're only making
'reference's...

Even if you, say, #declare a huge CSG object and use it just once in 'object
{...}', you actually create *two* copies, one in the table, and one in the
scene.

Unfortunately, true mesh-like references are not always practical in
POV-Ray, due to rendering performance considerations.


Post a reply to this message

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