Planetside Software Forums

General => Terragen Discussion => Topic started by: gregsandor on April 22, 2008, 11:59:45 AM

Title: Parenting objects and lights
Post by: gregsandor on April 22, 2008, 11:59:45 AM
I have 12 lights that line up on my gas station model.  I want to attach them to the model so I can move it to another location on the terrain.  How do I do this?
Title: Re: Parenting objects and lights
Post by: cyphyr on April 22, 2008, 12:17:29 PM
Simple, as yet you cant. Don't know if Planetside have this in the works (PLEASE it would be so useful) but for now just sit there with a calculator and a note pad (could be done quite quickly in Excel) and work it out the old fashond way.
Richard
Title: Re: Parenting objects and lights
Post by: DeathTwister on April 22, 2008, 12:18:56 PM
What I do is if I have everything the way I want them, I take one piece f the model and move it where I want, then when I have the Cordenances I just type them in and they should all be in the exact same place.  Maybe group them all first I would say also. At least it works for me that is.
Title: Re: Parenting objects and lights
Post by: cyphyr on April 22, 2008, 12:22:38 PM
You can group your models and move them as one. Well done, how do you do that?
Richard
Title: Re: Parenting objects and lights
Post by: Harvey Birdman on April 23, 2008, 06:06:35 AM
-
Title: Re: Parenting objects and lights
Post by: Matt on April 27, 2008, 04:58:04 PM
There isn't yet a way to parent one object or light source to another. It may be something we can work on after 2.0 release.
Title: Re: Parenting objects and lights
Post by: gregsandor on April 27, 2008, 06:23:48 PM
Quote from: Matt on April 27, 2008, 04:58:04 PM
There isn't yet a way to parent one object or light source to another. It may be something we can work on after 2.0 release.

Is there any way to hack it?
Title: Re: Parenting objects and lights
Post by: Matt on April 27, 2008, 07:17:16 PM
I can't think of any way to get around this at the moment.
Title: Re: Parenting objects and lights
Post by: gregsandor on April 27, 2008, 07:34:57 PM
As far as I can tell the cmpter wil do what Im going to have to do with my calculator:  if lightA is at -2, 2, -1, when the gas station is at 0,0,0, then when I move the building to -10, 10, -5 add those coordinates to the original light position.  An awful lot of work considering that there are 12 lights for the station, not to mention the streelights and cars and other buildings int he town.
Title: Re: Parenting objects and lights
Post by: nikita on April 28, 2008, 12:21:12 PM
Instead of moving all the objects around, you could move the terrain underneath.
Title: Re: Parenting objects and lights
Post by: gregsandor on April 28, 2008, 01:27:17 PM
sure, but I still have to calculate the new difference in altitude at the very least, and then modify all my shaders.
Title: Re: Parenting objects and lights
Post by: Mr_Lamppost on April 28, 2008, 01:41:11 PM
It would definitely save a lot of time if it were possible to link lights and objects to a parent.
Title: Re: Parenting objects and lights
Post by: gregsandor on April 28, 2008, 01:50:11 PM
I make my shaders with masks and haven't used functions; is it possible that a GetPostion or similar node can be used to relate a light or object to another?  Alternately how about a populator with more than one slot for its object?
Title: Re: Parenting objects and lights
Post by: Arandil on April 28, 2008, 02:00:22 PM
There may be a way to script this outside of TG2.  Basically, a text processing script would have to run through and adjust postitions/etc. based on manually moving one of the associated objects and then calculating the offset.  I'm not able to do this atm ...