Replacing/updating objects (.obj)

Started by trailgirl, March 03, 2008, 05:21:36 PM

Previous topic - Next topic

trailgirl

Hi everybody, I have an object (.obj) that I exported from Cheetah3D (along with its .mtl file) and have placed in my Terragen scene. Is there a suggested way to update the file in TG2 after I make changes in Cheetah and then re-export? It seems when I re-export the changes don't get updated in TG2 (at least not the materials). So I delete the object in TG2 and add the new version of it, then rescale and move it again. Is there a way to simply replace the object in TG2 but keep the scale and position and everything the same. I did try clicking on "Filename" and re-reading the file, but it doesn't seem to read in the updated materials.

Oshyan

Depending on what "materials" you're assigning/updating, they may not translate over at all. Were you able to get the materials loaded originally with a straight OBJ export from this program? Or did it require going through another app like Poseray? Are your texture changes procedural, or image-based? Procedural adjustments (either fractal noise-type functions, or changes to reflectivity, etc.) will not translate over.

In general if you re-load the object through the file dialog it should reload any settings, including the MTL file and material assignments. However this may not work if you've changed the materials assignment in TG2 after loading the object initially.

- Oshyan

trailgirl

No textures, or image files, no changes made in TG2, just changing colors in Cheetah. I export from Cheetah using OBJ+MTL Export.js (under the scripts menu). I just figured out -- if I change the name of the re-exported file, then I put the new name in TG2 under "filename", then it reads everything in but keeps all my object placement settings. Don't know why I didn't think of that earlier :-)

bigben

Yes, you need to force TG2 to re-import the file rather than just reading it. The textures only get read when you first import the file, and after that only the object is loaded unless you change the name.

This is actually a good thing if you want to animate a model. All you need to do is replace the model in between rendering frames. e.g. with Arbaro you can save several version of a tree model with different branch curvatures and include a command to export an object from the XML file between frames.

Mr_Lamppost

Quote from: bigben on March 08, 2008, 12:42:39 AM
This is actually a good thing if you want to animate a model. All you need to do is replace the model in between rendering frames. e.g. with Arbaro you can save several version of a tree model with different branch curvatures and include a command to export an object from the XML file between frames.

This is also a good thing if you change or assign any materials within TG as the changes are retained the next time your project is opened.  Saves the need for keeping multiple copies of an object just because you changed one of the colours.
Smoke me a kipper I'll be back for breakfast.