Sunday, 28 May 2023

Moving!

 Good news: this blog is closing (sort'a)

What's so good about that???

I've found a better place to post my tips to content creators, the Open Metaverse Research Group (OMRG) wiki. This means my guides and tutorials can be coordinated with contributions from others and the wiki format is also better suited for this kind of content than a blog is.

It also means my focus will shift more towards opensim/the hypergrid and less towards Second Life but for us content creators there's actually very little difference so that shouldn't matter much.

All the content I've already posted here will stay here, at least for now. I'm not going to waste time reformatting it to the wikis when I can simply link to the blog instead but all new content will be posted at one of the wikis or both.

Thursday, 14 January 2021

Creating LoD models, case study 2, Lesson 7

 

 Tutorials: Creating LoD models, case study 2, Lesson 7

Creating LoD models

Case study 2: Lesson 7 - Getting physical

Finally time to upload:




We got the download weight down to 1.389, that's low enough to be rounded down to 1. Yay! :D

The physics weight is 1.4 though, not high enough to make a difference to the LI but even so, is that really necessary? People may bump into the sign every now and then but they're not likely to ever try to walk all over it. A cube would make a much better physics model than whatever the uploader generates (and if you thought GLOD was horribly bad at his job, just look at what lunacies his physics generating brother can dream up!)




0.36 physics weight, that's more like it.

I think most mesh makers know this but just in case:

Make two dae files, one with a single triangle and one with a simple cube, and save them in an easy to find spot on your harddisk. Use the triangle (0.200 physics weight) as physics model for items that don't really need physics at all and the cube (0.360 physics weight) for anything avatars and/or moving physical objects are going to bump into. No need to worry about the size of these two meshes, the uploader will automatically scale them to the same size as the main model.

 

But the proof is in the pudding...

And here it is. High LoD:




Mid:




Low:




Lowest:




And a few details:



 

Finally time to upload:



We got the download weight down to 1.389, that's low enough to be rounded down to 1. Yay! :D

The physics weight is 1.4 though, not high enough to make a difference to the LI but even so, is that really necessary? People may bump into the sign every now and then but they're not likely to ever try to walk all over it. A cube would make a much better physics model than whatever the uploader generates (and if you thought GLOD was horribly bad at his job, just look at what lunacies his physics generating brother can dream up!)



0.36 physics weight, that's more like it.

I think most mesh makers know this but just in case:

Make two dae files, one with a single triangle and one with a simple cube, and save them in an easy to find spot on your harddisk. Use the triangle (0.200 physics weight) as physics model for items that don't really need physics at all and the cube (0.360 physics weight) for anything avatars and/or moving physical objects are going to bump into. No need to worry about the size of these two meshes, the uploader will automatically scale them to the same size as the main model.

 

But the proof is in the pudding...

And here it is. High LoD:




Mid:




Low:




Lowest:




And a few details:





A final word

We keep talking about keeping the LI down but this is also a way to increase the amount of fine details in the full high resolution model.

The challenge with this sign was of course the chain, the other parts are very simple. The common solution would be to reduce the curve resolution for the chain links but I really wanted to avoid that. Don't get me wrong, I have nothing against octagons and hexagons, some of my best friends are...

No, they aren't really. Anyway: there is a time and a place for everything but a rugged chain is not the place for any kind of polygons.

These efficient modelling techniques meant that I could afford properly rounded chain links. They may actually be a bit too round, perhaps I should remove a few vertices from them just to make them look more natural before I upload to the main grid.

Resource efficient modelling is not about saving for the sake of saving, it's all about getting more for less.


A final final word

After I wrote this tutorial and took all the pictures, I made a few more tweaks and got the download weight down to 0.732:


This didn't affect the land impact of course since it already was as low as it can be but every tri and vertice we can eliminate is a tri or vertice our GPUs don't have to worry about. How I did it? I can't remember but it must have been some tris in the lowest LoD model that turned out not to be neccessary. There's always room for improvement and there's always new tricks to discover. I've been making mesh for Second Life and opensim for more than seven years now and I'm still learning.


A final final final word (to keep people from suing me)

A sign like this is for virtual worlds only. In the Real World they have something called wind so heavy signs need rigid mounting, not chainlinks - at least if they are outdoors.

Creating LoD models, case study 2, Lesson 6

 

Tutorials: Creating LoD models, case study 2, Lesson 6

Creating LoD models

Case study 2: Lesson 6 - The faraway

Here's the lowest LoD model:




and yes, I could have done a little bit better...

I don't know if anybody remembers an old C&W song called "The Builder":

  Ev'ry builder knows that the secret to survival
  Is knowing what to throw away and knowing what to keep

(Kenny Rodgers rewrote the lyrics and called it "The Gambler" but that advice doesn't make any sense at all to gamblers of course.)

A common problem with the lowest LoD model - and sometimes with other LoD models too - is what we need to keep. We need to keep triangles outlining the main elements. We also need to keep at least one triangle for each face and those are not necessarily the same ones.

In this LoD model the horizontal beam at the top is very prominent and needs four triangles, two facing each direction. Texturing isn't very important there though, we just need the shape. So, assign those four triangles to four different faces and we save three tris elsewhere in the model. There isn't much more to say about this model, really. I obviously kept four triangles for the actual sign - that part is important at any distance - and then cut down as much as possible everywhere else.

Lesson 7 - Getting physical

Creating LoD models, case study 2, Lesson 5

 

Tutorials: Creating LoD models, case study 2, Lesson 5

Creating LoD models

Case study 2: Lesson 5 - Going low

I hate to make compromices but sometimes they can't be avoided. The chain of my sign isn't really noticeable at low LoD so I didn't really need it at all there. It is noticeable at the switch between low and lowest, when it suddenly pops up or vanishes, though, and because of that, I really wanted to keep it. However, simplified chain links wouldn't work since sudden shape changes between LoD models would be just as noticeable and since the low LoD model was so significant to the LI, a working chain representation would require far too many triangles. In the end I removed the whole thing and here's how the low LoD model turned out:




I couldn't remove the chain link face though and a single triangle there did more harm than good to the appearance so I hid it. Here's the bracket reduced to a single triangle:




What you don't see in this picture is that i's actually two triangles, facing in opposite directions, one assigned to the chain bracket face, the other to the chain face. Here I've moved one of them slightly upwards:





This trick has two functions, first, unlike what GLOD believes, it's usually better with no triangle at all than a single "eyesore triangle". The other function is to reduce the LI a little bit. With the vertices for the two triangles aligned perfectly with each other, the file becomes a little bit more compressable, reducing the download weight a little bit. Align your vertices consistently whenever possible and you can easily save 20-30% LI with no visible effect at all.

Here's a top view of the low LoD model:



Yes, it's hard to see what this picture illustrates but nearly all the triangles and vertices of the model are aligned with each other along the y axis. The only exceptions are the signboard face which has to be a bit away from the base plate to avoid texture flickering and the wall mount which may occasionally be seen from the edge even at low LoD. (Looking at that picture, I see where I could have done better but oh well, it's good enough to keep.)

Lesson 6 - The faraway

Creating LoD models, case study 2, Lesson 4

 

Tutorials: Creating LoD models, case study 2, Lesson 4

Creating LoD models

Case study 2: Lesson 4 - The middle ground

This is a very important lesson:

People in Second Life do not see your carefully created mesh!

They may study it every now and then and marvel at all those lovely details but what they actually see as they go about their Second Lives, is mid and low res LoD models. That is how it should be. All those details are not necessary for a scene and there is no computer in the world powerful enough to render everything in an SL scene at speed.

People do notice distortions like the ones in all the GLOD created models though. They drop you straight into the eerie Uncanny Valley where things look almost but not quite right.

For this sign I really needed the chain to look spot on even in the mid level LoD model yet I needed to get the poly count way down since it accounted for almost 7000 of the 7358 triangles in the original. Here's the solution I came up with:




Took a bit of creativity and I could probably have reduced them down even more with no visible effect but with a little bit of reduction to the chain's fastening brackets too, I got the triangle count down to 602 and the land impact down from 13.803 to:




12.859. That doesn't sound like much, does it?

Still better than what GLOD could manage though and unlike GLOD I did it with no noticeable changes at all.

There's an important lesson there: Download weight is calculated separately for each model and then the four numbers are added together. If you really want to reduce the weight, you need to know which model is the heaviest one. In this case it's very clear to see but when I'm in doubt, I do a mock upload, zeroing out the models one by one to see how much each affects the LI.

Lesson 5 - Going low

Creating LoD models, case study 2, Lesson 3

Tutorials: Creating LoD models, case study 2, Lesson 3

Creating LoD models

Case study 2: Lesson 3 - With friends like this...

Say hello to Glod. GLOD (Geometric Level Of Detail) is the little part of the uploader that generates LoD models and he's always so eager to help. And he loved my sign so much he thought it was well worth 14 LI, that's sweet of him, isn't it? ^_^

Let's see what he can produce for that.

Here's LoD level 0, the high LoD model:




LoD level 1, Mid model:




Not bad but not good either. There are some very noticeable distortions of the chain links.

Lod level 2 - low model:




and level 3, lowest:




Overall, not ideal but I could live with this. 14 LI is not acceptable though, we have to tell Glod to be a bit more economic with the tris:




1.4 LI? Yes, that's more like it. Actually it's 2 LI but that's because of the physics - we'll deal with that later.

Here's LoD 1:




LoD 2:




LoD 3:




LoD 2 is still acceptable but 1 and 3 are disastrous. I want this sign to be seen!

(ChinRey sighs)

Oh well, Glod is really trying his best to help but in the end: with friends like this, who needs enemies?

Lesson 4 - The middle ground

Creating LoD models, case study 2, Lesson 2

 Tutorials: Creating LoD models, case study 2, Lesson 2

Creating LoD models

Case study 2: Lesson 2 - Hidden faces

This is a short lesson.

Even in the simplest mesh model you often have superfluous vertices and polys, details that add to the complexity but not to the looks at all. In this case there are several polys hidden inside other elements, like these:




and these:




Get rid of them and the triangle count drops from 7358 to:




The LI - still with default automatic LoD, drops from 14.644 to 13.803:




Not bad for a few minutes of work.

Lesson 3 - With friends like this...