Jump to content

Uploading Mesh As Linkset Question


Liandra Hellershanks
 Share

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

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

Recommended Posts

So, I never realized you could upload a .dae with several objects in it and SL will automatically put them into a linkset on upload.

I've experimented a little, but I am not entirely clear on how to prepare my LOD and custom physics files and I've been unable to find information about how to do that.

How does the mesh uploader know which LOD/physics model to pair mesh objects up with?  Is it based on the name?  Are there any naming conventions I have to observe?

Link to comment
Share on other sites

It's the order the models are listed in the DAE file. And the order depends on how your 3D modeling tool exports the models.

Achieving the correct order is done differently in Blender, 3DS Max, and Maya for example.

Blender can sort by name.
With max it's done by link/unlink each LOD set in the same order to a Box.
And in Maya you can re-order the models in the Outliner AFAIK.

However, with the current official SL viewer you can do it with naming your models like this:

"cylinder"
"cylinder_LOD2"
"cylinder_LOD1"
"cylinder_LOD0"
"cylinder_PHYS"

Where "cylinder" is your Hi LOD model, and "cylinder_LOD0" is the lowest LOD model.

  • Like 1
Link to comment
Share on other sites

The strict naming convention described by by Arton is the safest way of doing this, although it's inconvenient in some circumstances. It's also compulsory with models where any meshes have more than 8 materials*.

A bit more, just to confuse everyone...

If the uploader finds meshes in a lower LOD file that don't match the convention, it switches to "legacy" matching. However, this is NOT the same as it used to be. It used to be simply based on the order of the meshes in the dae file, but now the meshes are sorted by name**. So the "legacy" matching is now alphabetical instead of simple ordering in the file. Fortunately for Blender users, if you used the "sort by object name" exporter option, this makes no difference.

The application of this "legacy" matching is supposed to be controlled by the setting of the debug parameter ImporterLegacyMatching, but in my experiments, it was always active whether this was TRUE or FALSE. There is a wiki page that covers the naming convention, but the information there is outdated, as indicated in my comment there, and the naming convention applies to the meshes, not the files.

*This is now permitted, although it's a fudge - the uploader splits the mesh into multiple meshes each with up to 8 materials. You might as well do the splitting yourself, as that gives you better control over LOD switching etc. Also, there are potential problems if any of the materials has more than 21844 triangles (as usual). The "legacy" matching of LOD meshes doesn't have to work for meshes with more than 8 materials for backward compatibility because they weren't allowed before.

**Where that name comes from is another story. That has changed too. It appears that it looks first for a name or ID attribute in the <mesh> tag, but that isn't allowed in the Collada spec. So then it looks in the parent tag, which is a <geometry>. That does have a name, but the uploader tag appends "_N" to it, where N is a zero-based index, to avoid possible duplication of sibling names. That may be needed for other kinds of element in the Collada file, but is redundant with <geometry> because the collada spec doesn't allow multiple children there. (I will try to make a jira asking for this index to be removed for meshes.)

The name used to come from the <instance geometry> tag than instantiates the mesh, and Gaia very kindly added a name attribute to that in the output of the Blender exporter, so that we could get names without the appended sibling index, but it seems that good work is now undone.

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3108 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...