Jump to content

Blender Question: What dictates the root prim when importing to SL?


Loki Eliot
 Share

You are about to reply to a thread that has been inactive for 2916 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

When using SL's import feature for mesh from Blender, i find LOD generation results can depend on which i decides is the root prim in a multiobject mesh. 

My question is, how doe SL importer decide which part of a Blender exported Mesh file is the root prim?

Link to comment
Share on other sites

It is the object of which geometry is exported first. In blender before 2.64 the order of export is given by the internal order of the objects in the Blender database. There is no way to directly change that order.

In Blender 2.64 it will be possible to specify that the objects shall be sorted by name before exporting. This has been added to support LOD files. And that works well as long as the objects apply to the same sort order in the different LOD files:

use this name convention for example will work:

For the LOD 3 export:

my_object1_LOD3
my_object2_LOD3
my_object3_LOD3

for the LOD 2 export:

my_object1_LOD2
my_object2_LOD2
my_object3_LOD2

for the LOD1 export:

my_object1_LOD1
my_object2_LOD1
my_object3_LOD1

its just important that the object collections in the different LOD files use the same sort order. The actual names are not important as far as i know.

  • Like 3
Link to comment
Share on other sites

  • 3 years later...

Would be great if that would still be true with Blender 2.77a. Inside .dae file <library_geometries> <gemotry> entries are not sorted alphabetically even if you check "Sort by object name" in export settings. To me it seems that they appear in historical order of their creation. Older created come first. So question is still open - how to make object X become a root prim in SL?

Link to comment
Share on other sites

it's about the workflow, imagine you need to  import multiple objects into SL. Each of them having different dimensions but yet - they all should be at their exact positions like you placed them in Blender. Since dimensions differ - their pivots differ in SL too (despite the fact that you set pivot point in Blender elsewhere - it uses center of object in SL anyway).

So as far as i know the only way to do it  is export each of these objects together with dummy "root cube" - which is always at exact same spot for every object you export. "Root cube" is used to match coordinates for every imported object and then you simply delete it leaving just one for further reference. This approach allows you to come back to your build later and import any single part and place exactly where it should be with high precision.

Now if I have to unlink every single object I import and link it back correctly so the "root cube" becomes root - takes a lot of time during a day.

Link to comment
Share on other sites

I tested with blender 2.77 and i found the Collada exporter exports the geometries in alphabetical order of the object name if the export option "sort by object name" is enabled.

If you can not get the alphabetical ordering of the geometries to work for you, then please prepare a demo blend file and open a report at

    https://developer.blender.org/maniphest/task/create/?project=2&type=Bug

Then someone will take care of your issue :matte-motes-asleep-2:

Hint: Please add the keyword COLLADA : Secondlife to the report title.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2916 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...