Level Of Detail (LOD)

abstract: We show you, how you can use blender to create sculpted prims with high precision. This tutorial will cover the basics of LOD (Level of detail) and show you how to avoid the most common pitfall in sculptie creation. We used blender 2.46 for all demonstration sequences.Important Note: Please take a minute to read the Tutorial license terms.

High quality download preciseSculpties.wmv

Welcome to our third blender tutorial.
Today we will talk about how to create sculpted prims with very high accuracy.

We will cover the LOD, “level of detail”, and we will show you some pitfalls, and how to avoid them. We will use blender 2.46 together with the sculptie export scripts, provided by domino Marama. Please be sure, you grab the newest script version!

ok! We will create a very simple object now, a basic cube. With this base object i will demonstrate you some very important aspects of sculptie creation. Attention here, Do not use the default cube that shows up whe you start Blender. In fact you can use it, but you will need to apply some additional steps before it becomes a sculptie. you will have to unwrap your 3D mesh manually , to get a usable UV map.

So back to now and here, as usual the first task is to remove the default object. And for convenience you ca split up the screen and open the UV image editor. I use this configuration so frequently, that i have decided to use it as my default settings.

The following sequence is for educational purposes only. I will fall into a trap. So please never repeat what i am doing now. in my first naive attempt on making a cube which satisfies my wishes, i will start with a cylinder object. So i Press SPACE, add, mesh, sculpt mesh, and choose option 4 from the available options.

I Scale it up a bit and enter edit mode. We will work in top view first. Now i want to change the shape to a square. I grab the upper quarter of the available vertices, and squeeze them in the y-dimension to get a straight horizontal line. press s, y, zero, for this purpose.

Then do the same for the lower quarter of the vertices, and finally do also modify the left and right side in the same way. In this case you will Press, s,x,zero. At the end i clean up the construction a bit, so that i get a perfect rectangle. The cylinder is still open at both ends. So we want to close it. For this purpose i go to the front view, grab the top vertices, and scale them down to zero. press s, zero. Now the top is closed. I do that again with the bottom part, and finally move all selected vertices back into the top and bottom planes. I Just select the points by using b, and scale them down along the z-axis, pressing s,z, then move the mouse.

We want to be sure, that the bottom and top are really flat. So i select all bottom vertices, and scale the z-axis down to zero. Now i get a perfect flat bottom. I do the same for the top vertices.

Yeah! this looks like a perfect block. Lets go back to object mode, then select render, bake SL sculpties.I import the resulting sculptie-map into OpenSim (or a compatible online world). And wonder, what happens.
After creating the sculptie and applying the texture, we see a perfect cube. Congratulations. But what is this ? We move away from the object, and suddenly some of the edges jump away from their dedicated position, and the bottom and the top get bumpy. We go further away and it gets even worth. Can we explain what happen here ? And can we doo something against this behaviour ?

The first good news is, that indeed we can reduce this effect. Now is the moment, where LOD, comes into effect. LOD, The “level of detail”, is an economic principle. It is used to reduce the render processing-time for relatively small, and for far-away objects. Such objects do not need the full rendering precision. So only a subset of the full mesh will be used for the rendering calculations. The crucial point is, that starting from a certain view distance, only 25 percent of all vertices are used. When moving further away, the number of relevant vertices is reduced more and more.

In numbers, that means that we start with 1024 faces when we are nearby, and we end up with only 64 faces at reasonably far distances. Each decreasing LOD level corresponds to a decrease of faces by a factor of 4. In OpenSim we have seen 4 LOD levels so far, so the lowest level of detail corresponds to 16 faces only!

Hence, if the mesh is not carefully constructed, the rendered object shape will differ significantly from the expected object shape. And this is exactly what we can see here. So we conduct, that we must take care of the LOD level, in our construction.

The secnd good news is: You can check the LOD in blender. Thanks to a feature named Multi-ress. And thanks again to Domino Ma rama for supporting this feature in his scripts.

So, get back to blender and examine, what we are talking about in detail. Go to edit mode, and search the Multi-ress Tab in the button panel. Currently we see the object in LOD level 3, which is the highest level of detail. Now decrease the level by one. we immediately see a deviation from the cube shape. Now decrease the LOD level again. Things get worse. And this is exactly what we have seen in our online world a minute before.

So, how can we avoid this visible behaviour ? Lets keep in LOD level one for a moment and simply select the lower peak. Then go back to LOD level 2. We see that we have not selected only one single vertex, but a whole plane of vertices.

When we look at LOD Level three, we see that we have selected three planes plus the lowest point, which originally was an entire plane by itself. And if we examine further very carefully, we see that with each decrease of the level of detail, only a quarter of the remaining faces get used. So, as mentioned before, precision goes down by a factor of 4 with each LOD level, and our object gets more and more jaggy. We can see in the top view what exactly happens here.

Start with the highest LOD level. That seems correct. But when we decrease the LOD level, we immediately see, that the corner vertices are gone away.

So, i see that i have choosen the wrong vertices in my first try. But now i know what to do: In LOD level 1, choose 4 vertices. scale them in x, then in y, until they are clearly positioned at the corners of the cube. Then go back to the next LOD level…

Oh, god! Now things get worse. Well, we messed up everything by now. we could correct this here, but let us better start over again with a fresh object and make it better the next time. So now we first go to LOD level 1 and again choose the correct corners. Now increase the LOD level again.

Select the corners again, and move them further out. Ignore for a moment, that the edges have become jaggy, we will flatten them in a moment. Now we can see, that the square approximately keeps its shape, when flipping through the LOD levels.

Let us go to the highest LOD level and flatten the edges. Use, s,y,0, and s,x,0, to achieve this. Now we are almost done. A quick test shows the improvement. The LOD does not interfere any more with the object shape. So let us finally take care of the top and the bottom, and Go to front view. go to LOD level 1, select the top plane and then go back to LOD level 3.

Here we see that we have selected 4 planes, which we now squeeze to one point. Press s,0. and finally move the selection down into the highest plane, using g,z.

Check, that now the LOD does not influence the shape anymore.
We do the same now at the bottom of the cube, bake the sculptie map, reimport it to OpenSim (or yuor preferred online world), and watch what happens now.

The object on the right side uses the corrected sculpt-map. Watch it carefully while we are moving away from it. And compare its behaviour with the behaviour of the left object. How wonderfull! the object keeps its shape now, regardless from which distance we look at it.

This was our first lesson in sculpting regarding the LOD. The next lesson will take care of precision, and how to arrange vertices in a clever way, so that you keep as many vertices as possible, to get the precision at the right places.

And now i will show you, how you can create a closed box in only 8 steps and in less than 40 secs.

19 Enlightened Replies

Trackback  •  Comments RSS

  1. Gaia Rossini says:

    Hello Gaia ,

    first of all TYVM for all you did and…compliments for the name 😛

    I need just a little help on this tutorial : I am able to follow and understand all steps ….but I have a problem at the end when you “close” top and bottom of the box.

    “S+O” command work , then if I hit ” G Z” nothing happen …. of course I can grab “manually” the vertex but I would like to understand what I do ^^.

    I am using Jass.

    TYVM in advance 🙂

  2. Matt D says:

    I have taken a .3ds object and imported it into Jass/Blender, and am trying to export it as an SL sculptie, and all seems to go well with telling it what directory to send it to, but then i get an error message telling me that there is nothing to do, and that I have not selected a root prim, with no explanatin of *how* to select one for export. Any suggestions? thx

    • Matt D says:

      Sorry, I think I posted that to the wrong place.

    • Gaia Clary says:

      You can not do that. When you select “export to Second Life LSL” then primstar checks all selected objects for having a UV-map of name “sculptie” and possibly a texture of name “UVTex”. If it can not find any object which matches the conditions, it says “nothing to do” or something similar.

      So what you need to do is:

      – import your object.
      – Create an appropriate UVmap for it (taking care about the SL constraints)
      – name the UV map “sculptie”

      Only then the export to SL will do something for you.

      But …

      What i have written down above is typically a tedious error prone and time consuming process. I myself have never managed to create a SL compliant UV map from an existing object. However it is possible!
      If i where you, i’d take another approach:

      import the object,
      use it as model for your sculptie
      create your sculpte from scratch.

      Although that sounds like beeing more work, it actually isn’t.

Post a Reply

Your email address will not be published. Required fields are marked *

Top