PDA

View Full Version : Replacing objects with new positions?



Blue Screen Sam
07-14-2010, 03:02 PM
Hi,

I am working with a scene with about 100 objects. It's really pretty simple (think simple architectural interior).

I have been working for a week on the LightWave file that someone sent to me. When I received it, there were no surfaces, lights, or much of anything other than objects and a scene file.

There are five objects (box01, box02, etc) that need to be repositioned. However, I cannot reposition them myself, because I don't know exactly where they are supposed to be. Another person in another city needs to move them to their new positions, then send them to me. However, they can only work from the original (no surface, no lights) file.

What is the best way to accomplish this? I would prefer to simply replace the objects in the scene (and have them automatically be in their new positions). I could also use objects with new names, if that will make it any easier.

Thanks in advance! -Sam

nickdigital
07-14-2010, 03:10 PM
They could send you the motion file of each object.

If there are lot of objects they/you could use this script to export and load all the motion files at once.

http://flay.com/GetDetail.cfm?ID=1245

Blue Screen Sam
07-14-2010, 03:30 PM
Is there a way to do this without introducing motion? Would really prefer to avoid introducing any motion/animation to the file. This is because it will likely be exported to another application when we are all done in LightWave.

Will the "File/Load Items From Scene" do the trick? Will that give me a list of objects from the brand new scene/objects that they send to me?

nickdigital
07-14-2010, 03:43 PM
So they're changing the position of objects in Modeler? The motion file just records the placement of your object in Layout. It doesn't necessarily mean there's animation. The objects in your current lws file already have a motion associated with them.

If they're sending you a new lws file with updated models then you could do a "Load Items From Scene" of your light rig into their file.

Danner
07-14-2010, 03:50 PM
If it's just 5 objects I'd do it by hand, load the newly positioned ones onto your textured scene. move your textured objects to place. delete the plain ones.

Blue Screen Sam
07-14-2010, 03:53 PM
They are exporting from their CAD program into LightWave format, so they aren't really doing anything in LightWave. I get a scene file and the objects.

I am hoping to simply get their new scene and somehow just merge the few new objects into my existing scene (and have their objects properly placed).

nickdigital
07-14-2010, 03:54 PM
Haha, I missed that it was only 5 objects.

If it's only 5 objects just do what Danner said or have them send you 5 motion files.

They could even email you the xyz/hpb/scale values if the motion file thing is too complicated (which it isn't).

nickdigital
07-14-2010, 03:56 PM
They are exporting from their CAD program into LightWave format, so they aren't really doing anything in LightWave. I get a scene file and the objects.

I am hoping to simply get their new scene and somehow just merge the few new objects into my existing scene (and have their objects properly placed).

Ah I see. If they're giving you a lws file then you can just do an object replace.

Sounds like you're gonna have to do some manual updating anyway since this isn't coming out of LW. If they were giving you lws file with all the surfaced objects then you could do a "Load Items" of your light rig into their scene.

Blue Screen Sam
07-14-2010, 03:56 PM
Hi Danner:

If it were only going to be five objects ever, I would totally agree! :)

However, it will be five now, 20 later, 10 another time, 3 then, etc. This will be an ongoing (several times/week). Also, the position of the new objects will need to be perfect, not just close.

Blue Screen Sam
07-14-2010, 03:59 PM
I get one .lws file and many .lwo files. My understanding of the LightWave format is that the .lws tells the .lwo files their position in the scene. Is that correct?

Once I get the files, they are completely LightWave files. I don't get any CAD files or .obj files at all.

nickdigital
07-14-2010, 03:59 PM
Well if they're giving you a lws file then that multimotion script will really help.

nickdigital
07-14-2010, 04:01 PM
I get one .lws file and many .lwo files. My understanding of the LightWave format is that the .lws tells the .lwo files their position in the scene. Is that correct?


Yep, that's where saving out the motion files would be helpful.

Or just do object replace. The motion file thing is probably easier since you already have the lws file with the textured objects loaded up. That is unless you're both pathing your lws files to the same folder where they're pathing to untextured versions but you're pathing to textured versions.

Danner
07-14-2010, 04:10 PM
you can position objects (.lwo) inside modeler or inside the scene (.lws) No idea how their exporter works, it could leave the objects at 0,0,0 and do the positioning on the Lws, or position the object itself and leave the pivot point offset so it would be at 0,0,0 in layout (altho the geometry is off center). Also no telling if it uses a model with layers or a bunch of separate .lwo files..

Depending on how the scene is exported is really how you should go about this.

Blue Screen Sam
07-14-2010, 04:14 PM
Perhaps part of this is my limited understanding of the LightWave file format.

I will be getting the lws/lwo files. The new version (with the new locations of the objects) will not have any record of the old position or any motion. It will be just like getting the file for the first time, except some of the objects will be in new places. There will also sometimes be some new objects, too.

Re-texturing the new objects will be super-easy. If they are in the right place, all will be good.

Blue Screen Sam
07-14-2010, 04:17 PM
Danner: Whenever I get anything, I get everything.

I'll get a .lws and 100+ lwo files. I then know that I need to use the new versions and position of only a few specific objects. No layers are used at all. I get 100+ objects every time.

Danner
07-14-2010, 04:26 PM
Ok so no layers. that is actually bad, there is a way to do a mass replace of all surfaces if that was the case. (just paste the new object into a layer of the textured object and if the surface has the same name all atributes are inhereted)

I is still unclear if the new position will be in the geometry itself or the scene. If the position is on the geometry, your textures will not line up the same way if you copy and paste the surface or inheret it like the above example.

I don't know if I explained the two types of position well enough. They could have moved the geometry itself, moved points away from the center, (we usually do that in modeler and gets recorded to the lwo)or just moved the center/handle/pivot point. (done in layout and saved in the lws)

nickdigital
07-14-2010, 05:03 PM
If you load up the new objects in Modeler are they in the same place as you would see them in Layout?

It sounds like the geometry is placed during the CAD stage. Meaning the model isn't modeled as 0,0,0 in modeler and placed at 10,0,10 in Layout.

As long as the surface names of our old and new objects are the same Danner's surface update technique will work. If there are UVs hopefully those are identical in layout and name too.

Blue Screen Sam
07-14-2010, 08:03 PM
Thanks so much for your help. Your suggestions helped us narrow down the options and get a better handle on the LightWave file formats.

We were finally able to do some tests. The "File/Load Items From Scene" did the trick!

When we perform that command, it brings up a dialog from which we select the new objects. We select the only ones we want. They come into the existing scene properly positioned as we want.

A couple notes:

We have NOT tried this with objects with the same name as the originals. We have had the out-of-town person add "*-01" to each of the object names in the CAD program prior to export. Because of this, I'm not sure whether we could simply "replace" the old objects automatically. Right now, we are effectively "adding" new objects, then manually "deleting" the old.

Since adding the surface to the new objects is done in seconds, so we may never try using the same object names (which may or may not simply replace the old objects with the new).