PDA

View Full Version : Converting instances to single mesh



Boris Goreta
11-06-2013, 09:23 AM
Is it possible to convert instances to single mesh. I want to reduce instance count. I have 360000 instances of 20 polys that I would like to convert into let's say 1000 instances of 7200 polys to get similar results but more rendering speed.

Plus I need fast object collapser, the one I use takes days to collapse higher amounts of objects.

The Dommo
11-06-2013, 10:46 AM
Does Save Transformed work?

probiner
11-06-2013, 12:20 PM
I use Mike Green's Instance Baker and Sven's Scene2Modeler to bake the instances and then send them to Modeler and save as a single object and do whatever changes I need.

Cheers

lertola2
11-06-2013, 06:18 PM
There is a python script that comes with Lightwave called 'Bake instance' which will convert your instances to objects. Then you can export your scene as an fbx file. You can open the fbx file in modeler. You have the option to load all the objects in the fbx file into a single layer.

allabulle
11-07-2013, 09:15 AM
There is a python script that comes with Lightwave called 'Bake instance' which will convert your instances to objects. Then you can export your scene as an fbx file. You can open the fbx file in modeler. You have the option to load all the objects in the fbx file into a single layer.

Hey,that's handy! I didn't know that. I have to try it out for sure. Thanks for the tip, lertola2!

aquinde
01-10-2014, 01:53 PM
This works, sort of. It took me a few tries before I realized that you need to have the object which has been instanced selected, rather than the object being instanced upon, for this to work. However when exporting to fbx it seems not all the geometry is being exported. I'll have to explore further, but its a good start.

jeric_synergy
01-10-2014, 02:11 PM
With uncompiled scripts, you can add notes and tips to the script itself. That way at least you can find a reminder, next time.

If you're more adventurous and there's a UI, you can add the tip into the UI.

aquinde
01-10-2014, 02:30 PM
This works, sort of. It took me a few tries before I realized that you need to have the object which has been instanced selected, rather than the object being instanced upon, for this to work. However when exporting to fbx it seems not all the geometry is being exported. I'll have to explore further, but its a good start.

Interesting. This was my first time running a python script in LW. It'll be some time before I go digging into one though ^_^

jeric_synergy
01-10-2014, 04:12 PM
Uncompiled scripts are just text, so you can always add comments as a form of 'documentation'.

tcoursey
12-31-2014, 02:32 PM
Ran into this thread searching for something similar. I didn't read past the thread that mentioned the Python Script....just went right to the script and tried running it. Like the following post I could not get it to work. Now of course that I know to run the script on the object that is being instanced instead of the object that places the instances it works. I'm not a python person but does someone know if it could throw an error (msgbox) of sorts if when it was ran that there were no instances found or something? Just seems like a missed opportunity for the programmer to make it a bit User Friendly. Just wondering if it's even possible with a script to do such a thing.

Waiting on my 1,400 instances of chairs to complete now.... :)

jeric_synergy
12-31-2014, 07:14 PM
Yep, that's a reasonable 'bug', no matter what pushback you get. Submit it.

Note that fogbugz seems to have gone the way of the dodo. Blasted sailors.

jeric_synergy
08-09-2016, 09:24 PM
Bumping because, hey, today I needed it! Don't know if it's mentioned in the dox.

YMMV, but to me the placement of this script in the UI didn't make sense-- it's in a couple places so I'm pretty sure I didn't customize it (and I've never used it, so...). POUR MOI, the proper menu location for a script of this nature is in FILE: EXPORT. I'll be placing a copy there.

While not onerous, it's a little roundabout, what with the FBX shuffling and all.

fishhead
08-11-2016, 04:37 AM
There is a python script that comes with Lightwave called 'Bake instance' which will convert your instances to objects. Then you can export your scene as an fbx file. You can open the fbx file in modeler. You have the option to load all the objects in the fbx file into a single layer.
Didnīt know that either! Very handy indeed. Thx for refreshing it...

jeric_synergy
08-13-2016, 07:42 PM
Possibly in a dull moment some altruistic user might list the native Python scripts (and LScript for that matter) and put them in the "Basic things LW users should know..." thread.

It's pretty slick how one COULD use instancing as a modeling tool, albeit with all these added steps. There's probably something Instancing does that Point Clone+ et al do not or do clumsily. Something nodal with w.maps, perchance. For instance, it might make some very specific morph really easy. (Assuming point order stays valid.) :confused: