How do I select multiple objects at one time?

Started by gregsandor, June 24, 2008, 03:41:50 AM

Previous topic - Next topic

gregsandor

I have a lot of individual objects in my scene and no terrain.  I want to select a number of them at one time so I can move them all to a new location.  How do I select them all and move them?  I have both versions of TG installed, so any answer that works in one will work.

jo

Hi Greg,

Unfortunately you can't do that right now, you can only select one object at a time. The object handling is something which does need considerable improvement. There'll be some small improvements in the TP4 release, but there is still some major work to be done.

Regards,

Jo

gregsandor

How about some kind of workaround; I'm not averse to editing the files in notepad.  I just have too much stuff here to calculate positions for every keyframe by hand one at a time.

gregsandor

I tried adding a second object line to a clip file of the population, but TG threw a warning of duplicate params or something like that. 

jo

Hi Greg,

You can of course open the file and edit it Notepad or some other text editor, it's just XML. If you're using obj files then you'll want to look for obj_reader nodes. You should be able to tell by the name and/or file parameters which obj you're dealing with. You can then modify the position by altering the translate parameter, which specifies the x, y and z coordinates. You probably know this already.

If you're animating the objects and have multiple keyframes to edit, then that obviously isn't going to make life very easy. You would have to edit each keyframe translate block, which is inside the obj_reader element and looks a bit like this :

<param name = "translate"
    vf1 = "0 125 0"
    vf10 = "0 125 1945.94"
    vf20 = "0 125 4276.24"
    />

The vf attributes correspond to keyframes, at frames 1, 10 and 20 in this case. You could write a script of some sort to add a certain offset to the translate params. That's my best suggestion at this point, I'm sorry. One of the others might have some better ideas.

Regards,

Jo

jo

Hi again Greg,

If you got to grips with .chan files, a possibility could be that instead of modifying the project file you could generate a new .chan file with your object offset to the new location and then import that. If you have an original animation source and something to generate a .chan file from it ( as I saw you discussing in another thread ) then you could modify the .chan generator to apply the required offset when converting from the original source. That's just an idea though, I haven't done anything with .chan files myself.

Regards,

Jo



gregsandor

#6
Thanks jo, I appreciate your help here.  I watched Moose's 38 minute (excellent) video tutorial http://forums.planetside.co.uk/index.php?topic=3706.0 on using Houdini to generate .chan files for TG, and was getting my project set up when he posted that the new version of H has removed this ability to create them.  I'm casting about for a new solution now; I think I'll dig into my CamPath files and see if I can make something work from that.

I haven't keyframed anything in this file yet.  I have two groups of models, which I want to move closer together.  Each has more than 50 objects in it, so editing each one individually is pushing the limit of the time I have for this, to say nothing of doing any "fun" creative stuff after. 

Anyone with ideas please drop in here.

gregsandor

Can someone please post an example (or link if one is already available online) of a simple .chan file that moves an object around in a scene?  I think looking at an example is a good place to start.

gregsandor

Here's the starting point.

jo

Hi Greg,

Are you able to program in PHP? If so it should be pretty straightforward to use PHP's DOM_XML stuff to load a project file, and then use it to find the objects and modify they're positions. I would have a crack at it myself but I'm too tired this evening.

How did you place the objects in the first place?

Regards,

Jo

gregsandor

#10
Hi jo,
I don't know PHP but I am able to grasp simple code enough to modify it. 

I started by building all my models to "real world" scale in TG, so Star Destroyers are are 1200 meters long, TIE fighters are 7 meters, Corellian Corvettes are 150 meters, etc.  I mapped the layout of the fleets, and applied it as a texture to the terrain and scaled it up, then placed the ships.  (side note for TG next year, very low priority: it would be helpful to be able to apply a semitransparent texture to the Groups panel backgrounds:  I laid the nodes out on the panes as they are in the fleet to keep track of them.)

Now I want to move the Republic fleet around and through the Imperial in a large scale action, while moving the Imperial toward their opponents.  After I have the general movement of the capital ships, I will add squadrons of fighters in middle scale actions, and individual fighters dogfighting in detail nearest the cameras.
I can send you the .tgd if you like.

MooseDog

Quote from: gregsandor on June 25, 2008, 12:22:00 AM
Can someone please post an example (or link if one is already available online) of a simple .chan file that moves an object around in a scene?  I think looking at an example is a good place to start.

hope these help:

first a step backwards (and if you know this you may happily ignore).  i discovered that the .chan file is a simple ascii file with the following format

FRAME TX TY TZ RX RY RZ VFOV

(where T is transform and R is rotation) (doh!)

found this out kinda cryptically here:

http://www.vfxtalk.com/forum/boujou-nuke-ummm-t10336.html

so...since chan files seem native to nuke, i used that in my googling and found these two plug-ins :

one for max:  http://www.fxshare.com/nuke/downloads/tools/3d_converters/Max2Nuke-5034.html

and one for xsi:  http://www.highend3d.com/xsi/downloads/tools/3d_converters/XSI-to-Nuke-Chan-exporter-4032.html

of course, if you don't use either of those, that's no help whatsosever. ;D

however, regardless of your 3d app, it surely must bake out some kind of motion file.  which could then be modified to fit the chan format.  i know lightwave's mdd file fits this bill.

good luck 8)

Moose

Quote from: gregsandor on June 25, 2008, 12:22:00 AM
Can someone please post an example (or link if one is already available online) of a simple .chan file that moves an object around in a scene?  I think looking at an example is a good place to start.

How is your Blender chops?

Crouch, over on the Blender Artists Forums, is working on a script to integrate Blender with TG2. The script currently lacks object export from blender (.chan). I took the liberty of adding this simply by repurposing one of his functions (I'm not really a scripter / coder so I hope it was the right thing to do...).

From my quick and non-exhaustive tests, it seems to be working 'ok', though there seems to be some sort of pivot offset with object rotations back in TG2 land. Alas, I've never really used Blender before so I may have set things up incorrectly. But it may also be an issue in TG2(?) as it's still in dev... or maybe it's some other think I've overlooked. But it may still be usable if you wish to give it a go. Perhaps you could even liaise with Crouch to help produce a solid tool when he is able to work on it again (I believe he's currently short of time).

Crouches thread - http://blenderartists.org/forum/showthread.php?t=113590&page=4

Instructions
- Extract the script into your home/blender/scripts directory.
- Manually set export paths from within the script itself (actually best to just read all the instructions in the script).
- In Blender, File > Export > CHAN

This will export the camera and all active objects' transforms into individual .chan files (be sure to name your objects for meaningful .chan file names).

HTH :)