Jump to content
Sign in to follow this  
Spinell

Understanding LODs

Recommended Posts

Hello everyne. I need some help fixing a mesh I did in blender 2.63

I uploaded it and textured it ingame with no problem but when I zoom out the mesh becomes blocky and distorted, like a sculpty. Now, what botehrs me is not that, I work with sculpties often, but when it distorts, it messes up the texture I applied really badly: it's as if it has chops of white splattered over it. ANd it can very, very distracting.

At first, I thought the problem was the texture, but my help group told me it was the LOD. However, I've never worked with this before so I'm not sure how to fix it.

The most helpful indication I got was from here: http://wiki.alternativaplatform.com/Blender_Alternativa_Addon_-_Using_LOD

I know it's not specific to SL, but if this is the way to fix problems with LOD, I want to ask: what distance should I put?

The mesh itself is a sort of headress, so it's small and stands on top of your head.

 

Share this post


Link to post
Share on other sites

You seem to be confusing the issue.  The LOD container in your modeling program is just a database node used by the program itself.  It's essentially an organizational tool.  It has nothing to do with creating the four versions of your model required for SL.  SL has no way of knowing or caring whether any such a container exists in your modeling program scene.

What you need to do is create four separate versions of your model, at four different levels of detail, so that SL can use its own LOD system to swap between them.  When you upload to SL, you'll put the four models into their appropriate slots in the uploader dialog, and then SL itself will put them into a 'container' of its own, as the natural result of the upload process.  You won't be uploading any container nodes from Blender to SL, ever.

Let's talk about the four models you need to create.  It sounds like you've already made the high detail version.  So, you just need to make three simpler ones.  Very generally speaking, the easiest way to do that is likely going to be to make a copy of the one you've got, and remove some edge loops, to create the next level down.  Rinse and repeat two more times to make the low and lowest levels. 

Another curcial thing you must do on each model is adjust the UV layout to make sure the texturing stays wraps the way you want it to.  The reason the texturing has been borking on you up until now is because you've been letting the system auto-generate the lower three levels of detail, instead of creating them yourself.  The UV layouts have been getting messed up, because the automation process has no way of knowing what looks good or bad.  It just does a simple mathematical reduction, and calls it a day.  To keep things looking good across all four levels of detail requires the attentions of a human artist.   Automation won't do it (occasional dumb luck, notwithstanding).

Once you've created the four models (plus a fifth for the physics mesh), and you've UV'ed them properly, export each one to a separate COLLADA file.  In the SL uploader, you will then place each of the files into its appropriate LOD slot.

Make sense?

  • Like 2

Share this post


Link to post
Share on other sites

Oh, alright then. Thank you for explaining that to me. I knew the link I found wasn't specific for SL, but I didn't know how to tone down the details of my Mesh. I thought there was a specif way to do it in blender, like a tool you had to use. But all I need to do is remove some of the loops?

That seems simple enough.

So, tell me mroe about how SL processes this imformation: say I now fitted the respective 4 collada files into their slots in the upload window. What does SL do with these files? When I have the camera zoomed in it shows a high-quality LOD but then as I zoom out, it switches to a lowers LOD file I uploaded? Is that how it works?

Just curious here. ^.^

Share this post


Link to post
Share on other sites

Yes, that is how it works.  As you zoom in and out it will switch between your levels of detail.

Share this post


Link to post
Share on other sites


Spinell wrote:

Oh, alright then. Thank you for explaining that to me.

Most welcome. :)

 


Spinell wrote:

But all I need to do is remove some of the loops?

That's often the easiest strategy, yes, but depending on the specifics of your model, there might other approaches that are more practical.  There's no one-size-fits-all methodology.  The important thing is that you reduce the number of polygons in the model, while maintaining its overall shape..  At the end of the day, it doesn't really matter exactly how you did it, as long as it's done.

As you do this more and more, you'll find that it's often better to work the other way around, by buildng the lowest level first, and then adding detail to create the higher levels.  Again, it all depends on the specifics of the model in question.

 


Spinell wrote:

When I have the camera zoomed in it shows a high-quality LOD but then as I zoom out, it switches to a lowers LOD file I uploaded? Is that how it works?

Yup.

 

 

Share this post


Link to post
Share on other sites

In Blender 2.63, you can use "Dissolve" to remove edge loops leaving the UV map intact. Try it with a cube first. Subdivide twice. Make the usual seams and UV unwrap. Now go to edge select mode and select the six edge loops you need to remove first, the ones introduced by the second subdivide. Do Mesh->Dissolve->Dissolve. The edges will disappear leaving 8-edged ngons with an vertex in the middle of side of the squares. Now go to vertex select mode and select all these extra vertices. Do Mesh->Dissolve->Dissolve again. The extra vertices disappear. Now select all and look at the UV map. Of course this is a bit silly for a cube, but once you now how it works, you can use it for more interesting shapes.

  • Like 3

Share this post


Link to post
Share on other sites


Drongle McMahon wrote:

can use "Dissolve" to remove edge loops leaving the UV map intact

If anyone's wondering, the equivalent command in Maya is called "Reduce".   It has optional settings to preserve UV's or not.

What you'll find with any automated decimation tool is that they generally work best with high-poly models.  They can be pretty destructive to low-poly models (unless the topology happens to be well set up for it in advance).  In most cases, you'll get the best results doing your reductions by hand.

Share this post


Link to post
Share on other sites

the equivalent command in Maya is called "Reduce"

Maybe, but that sounds more like Blender's Decimate modifier. Dissovle is not automatic. You specify exactly what gets removed and you have to specify it all. So it's still manual. It's just an improvement on the other ways of doing it, like edge slideing and vertex merging, because those all messed up the UV map which you had then to spend ages repairing.

Dissovle quite significantly changes the balance in deciding whether to go high->low or low->high LOD. However, you do have to be careful to get rid of superfluous vertices, so as not to end up with lots of ngons though, which will become nasty extra triangles.

Share this post


Link to post
Share on other sites

Hi Chosen:

 

Is it essential to assign materials and UV wrap each level before trying to upload?

 

I have made my high LOD version of an object and been able to upload it.  It looks good.  I have not yet assigned materials or done any UV work.  I started a medium LOD version by deleting some edge loops, but I also deleted some faces, making a cube door with some detail work, essentially into a plane that would be textured from the outside to look right.

 

When I went to upload a the high LOD and added the medium LOD I received an error - "Level of Details Have a Different Level of Texturable Faces."  I have done some research on this and it seems instead of there being an issue with me deleting faces on the door, this really may be a materials issue.  Do you have any words of wisdom for me?

Share this post


Link to post
Share on other sites

There are two error messages you can get that result from material matching problems when you read a lower LOD from a file*.

The first appears in yellow t the bottom of the dialog and says "Error: Material of model is not a subset of reference model." It is a requirement of upload that the lower LODs must use a subset of the materials used by the high LOD ("reference") model. You have to make sure the material slots in each LOD point to the same material. (in fact it is tha name of the material in the collada file that is checked).

The other message appears at the same time as a red cross after the line in the dialog where the file is chosen, and is below the file selectors, not at the very bottom. It says "X Levels of detail have a different number of texturable faces." The appearance of this message is a regression bug from when it used to be a requirement that all LODs had the same number of textures. It can be ignored. It does not prevent successful calculation of weights or subsequent upload. (I am very surprised this is still in the current release; the jira was long ago).

The message you quote sounds more like the latter, but is not identical. Perhaps you are using a non-LL viewer? Or an older version?

Concerning yur question about UV mapping etc.: It is possible to upload models without UV maps, but that is not a good idea. The uploader essentially uses uninitialised data for the UV map, and that can have quite large effects on the dowload weight and land impact. You can also upload models with no materials assigned, as long as all the LODs are the same!

You ask if it is necessary to unwrap the UV for each LOD. That is one way of doing it, but then you have to make sure the maps are all consistent with the same texture, or use different materials. Usually, it is possible to do thw unwrapping for your original model (be that low of high LOD) and then to to do the detal addition/removal of geometry on copies adjusting the UV map (moving and welding vertices, etc.) as required so that it still fits the texture. In the case of the dissolve technique I described, adjustments are not needed.

*checked on latest release viewer, Second Life 3.3.2 (258114) May 28 2012. Same situation as with previous release viewer.

ETA: I should have added this - there is still a bug with assigning textures to faces the materials when the LOD switches when you have only a subset of high LOD materials in the lower LODs. Until that is fixed, you are better off using the same number of materials at each LOD, even though you don't have to. So, for now, it's better to obey both error messages.

Share this post


Link to post
Share on other sites


Drongle McMahon wrote:

The edges will disappear leaving 8-edged ngons with an vertex in the middle of side of the squares. Now go to vertex select mode and select all these extra vertices. Do Mesh->Dissolve->Dissolve again. The extra vertices disappear.

By the way, if you enable "Dissolve Verts" in the operator panel after the first Dissolve, that extra clean-up step will not be necessary.

  • Like 1

Share this post


Link to post
Share on other sites

Thank you, Drongle.

I have gotten both errors it seems.  I need to look into the materials issue,

If I may ask another question.  What is the best method for going about constructing your LOD levels?  I have recently seen reference to using layers in Blender.  I know how to duplicate, use M to move and select a new layer so the model is essentially pasted on another layer in the same location.  I assume this also copies the correct material issue.

Do people then simple start removing edges and faces for the model on the new layer, and so on?  If you have one Blender file in Blender 2.63 with five layers ,one for each LOD and the physcis shape, can you save each level individually and also export them individually?  Thanks.

Share this post


Link to post
Share on other sites

<masami> "..enable "Dissolve Verts" in the operator panel.." :matte-motes-smile: Ohhh Thanks for that one!

<robert> ... layers ...

All depends what you like, I suppose. I like to keep all my LOD/physics models of the same thing on the same layer. As long as they are separate objects, you can export them separately by using the export selected checkbox. It can get cluttered though, so if you like order, then you could put them on different layers. I think Gaia had another good reason for doing this, but I can't remember it.

I usually make either high or LOW LOD first, UV map it, and then make the others from a shftD copy. If you have the naterials assigned, they will be copied. If not, it's not difficult to assign them later. Having the UV mapping done as early as possible, evenj before duplicating similar parts of a single LOD model, is usually a huge work saver, even if some adjustment is still needed.

By the way, there is a problem with the material naming in 2.63 that can give you problems with the subset error (the one that does matter). It puts vthe slot number on the end of the name, which forces you to have the materials in the same slots, and therefore all the materials in each object. This has been corrected in 2.63a (I believe).

 

Share this post


Link to post
Share on other sites

Thank you for this post! I stopped creating because of certian facets of the program I simply never understood. After reading this post I now understand about LOD's! I can't belive it. It all fell into place and makes me want to get back to mesh.

Now if I could just understand the mapping I'd be set. If you all could point me to a good tutorial it would be greatly appreciated :D

Thanks,

Jacki

Share this post


Link to post
Share on other sites

I edited my earlier post in this thread, about the error messages, because I forgot about a bug that makes it sensible to treat both as errors even though one of them is not enforced by the code.

Share this post


Link to post
Share on other sites

Thanks again, Drongle.

 

Jacki:

I have found this series of tutorials very beneficial for learning about unwrapping, laying out a UV design and scaling textures.

 

Share this post


Link to post
Share on other sites


Drongle McMahon wrote:

the equivalent command in Maya is called "Reduce"

Maybe, but that sounds more like Blender's Decimate modifier. Dissovle is not automatic. You specify exactly what gets removed and you have to specify it all. So it's still manual. It's just an improvement on the other ways of doing it, like edge slideing and vertex merging, because those all messed up the UV map which you had then to spend ages repairing.

Dissovle quite significantly changes the balance in deciding whether to go high->low or low->high LOD. However, you do have to be careful to get rid of superfluous vertices, so as not to end up with lots of ngons though, which will become nasty extra triangles.

Oh, thanks for clarifying, Drongle.  I guess I spoke too soon.  Sorry, eveyrone, if I caused any confusion.  

The version of Maya that I use (2009) does not have a direct equivalent command to what you describe.  I wonder if newer versions do. It sounds quite useful, if I'm understanding your description properly.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...