Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Blender > Primstar > 1 Prim Chair > LOD ... Which mesh to start with?

Paulo Dielli
Symfurny Furniture
Join date: 19 Jan 2007
Posts: 780
11-20-2009 18:37
I watched a tutorial and made a 1 prim sculpty chair. Up close it looks good, but just a few meters away it looks bad (SL default settings, no messing with LOD):


The bad LOD is understandable, because the sculpty is made from a cylinder with: X faces 8, Y faces 8, Subdivision Lev 2 (Multires level 3).

Can LOD performance be improved when I use a cylinder with much more faces? For this particular chair, using Blender and Domino's Primstar: what would be the best sculpty mesh to start with?

Video tuts:

FIRST: Making a sculpty cube tutorial
http://www.youtube.com/user/BlenderSL#p/u/6/sAI_9LD3Wr0
(I know Gaia's cube is better, but has less detail)

SECOND: Making the 1 prim chair
http://www.youtube.com/user/BlenderSL#p/u/5/h2WvdHYeh_U
Kornscope Komachi
Transitional human
Join date: 30 Aug 2006
Posts: 1,041
11-20-2009 23:00
I'd probably go with X faces 4, Y faces 16.
_____________________
SCOPE Homes, Bangu
-----------------------------------------------------------------
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
11-21-2009 05:04
It looks like you need 12 elements for the wood part plus one element for the more rounded cushion. You can get this done with robust LOD:

- start with a (4-x, 64-y, 0-subdiv) cylinder.
- go to front view
- select row 0, 3,4, 7,8, 11,12, 15,16, 19,20, 23,24, 27,28, 31,32,33, 36,37, 40,41, 44,45, 48,49, 52,53 and the lowest row
- scale SHIFT - z 0 (scales along x and y only, thus creating the invisible mesh strings between 2 apparently separated parts of a sculpty)

By Now you have 12 small bricks and one big brick.

- in the UV editor change the image sizeX=8, sizeY=512
- bake
- image -> import as sculpty

Now you have 2 objects in the canvas. Fr0m here on use the just created *2nd object. It is allready in edit mode.

- select all vertices inbetween the cubes
- delete the selected vertices

now you should have 12 small and one big isolated cubic shapes (well probably they are very flat at the moment, but never mind.

- take each of the isolated objects and shape them to your needs
- use the big item for the cushion.

You should have constructed a chair which keeps LOD resistant for LOD3 and LOD2. Recently i was able to bake to a 4x,1024y imagemap which also covered LOD1. But with the newest baker this sculptmap baking does not seem to work any more. Maybe a bug? ,-(

- Bake (ensure that your sculpmat size is sizeX=8, sizeY=512 )

If you do not like the cushion, you might consider a 2-prim sculpty instead where the cushion is a separate sculpty.
Paulo Dielli
Symfurny Furniture
Join date: 19 Jan 2007
Posts: 780
11-21-2009 08:25
Wow Gaia, you are always very helpful to everybody, and so is Domino. But now I'm absolutely baffled by your detailed reply and the time you must have spent typing or even trying it. Thank you!

Now that I'm going deeper into making sculpties, my main challenge is to figure out which mesh works best to avoid major LOD problems. Of course it's not my intention to make complex sculpts with only one prim, but any prim that can be saved is good. But for me LOD is leading. So if I can understand with wihich mesh to start, then I'm already good underway. Your detailed reply helps me a lot in understanding these basic steps, and I can't wait to try it out tonight!

Thank you again!
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
11-21-2009 08:25
From: Kornscope Komachi
I'd probably go with X faces 4, Y faces 16.


Me too.. I reckon this can be made to look reasonable down to LOD1 that way.
_____________________
Visit http://dominodesigns.info for the latest Primstar info
Paulo Dielli
Symfurny Furniture
Join date: 19 Jan 2007
Posts: 780
11-21-2009 08:30
I'll also try x 4 y 16 then. Thanks to you too, Kornscope and Domino. I'm curious what works best and will post the outcome here.

One question though:

From: Gaia Clary
- start with a (4-x, 64-y, 0-subdiv) cylinder.


In order to have more control over LOD, is it always better to start with Subdiv 0 instead of the default 2? I mean: if I use a large number of faces such as Gaia suggests. Because it won't give enough faces to play with when I just use x 4 y 16. Is that correct?
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
11-21-2009 08:45
From: Paulo Dielli
In order to have more control over LOD, is it always better to start with Subdiv 0 instead of the default 2? I mean: if I use a large number of faces such as Gaia suggests. Because it won't give enough faces to play with when I just use x 4 y 16. Is that correct?


The easiest way to manage LOD is to use subsurf instead of multires. With 4 x 16 and 2 levels of subsurf, you are doing the modelling at LOD1, so you know what you make will survive 2 LOD drops. If you can hide the connecting strings in the seat, then you don't need to waste faces making them zero width.
_____________________
Visit http://dominodesigns.info for the latest Primstar info
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
11-21-2009 09:15
I've just done a quick test on this and here's the best layout I managed for LOD1. I used the blocks technique so the zero width strings don't get in the way (theres two of them) and hid the geometry going to the center part of the back in the seat. It's a 4 x 16 cylinder which starts at the bottom of the front right leg and finishes at the top of the back center.


Blocks technique: http://dominodesigns.info/node/89

If you really really want the bars under the seat at the sides too, then you'll need to work (at least in part) at LOD2 rather than LOD1.
_____________________
Visit http://dominodesigns.info for the latest Primstar info
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
11-21-2009 16:03
Hi. I have tried the idea with Subsurf and 4x,16y,2subdiv. I first did not understand at all, how to proceed, but then i realised:

1.) It is essential to use simple subdiv
2.) The resulting chair has less details compared to the "original"
3.) The chair is made out of only 3 "decoupled" parts (see red,green,yellow parts below)

And only after i did all this investigation, i understood that all this was already mentioned in Domino's previous post. I just did not "see" what you meant until i actually found it out by myself.

Here is what i created by using the technique proposed by Domino (with a slight variation):



The created chairs use essentially the same vertex topology as Domino's example with some small modifications. It is LOD1 resistant and only breaks down at LOD0.

However if i wanted to add the whole details, working as proposed would not give me enough vertices to move around. Using a 8*256 sculptmap however allows me to create a chair almost exactly as wanted. It appears to me that i can create a LOD1 resistant chair with 16 subobjects at maximum with this technique. I have to accept the additional work to do though.

I have no idea how i could start with a 4x,16y object and model the details...
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
11-21-2009 16:15
From: Gaia Clary
I have no idea how i could start with a 4x,16y object and model the details...


Now you have the LOD1 mesh, change the subsurf type to catmull. Use Edge Crease (shift e) to get the straight lines back where needed. Now you can use Loop Cut (ctrl r, move mouse to choose cut position, middle mouse click to do a single cut mid face) to add extra modeling points from LOD2. You can cut again if you need to bring LOD3 onto some faces.

After that, bake, image - import as sculptie and do the final tidy up on the multires imported version.
_____________________
Visit http://dominodesigns.info for the latest Primstar info
Paulo Dielli
Symfurny Furniture
Join date: 19 Jan 2007
Posts: 780
11-21-2009 18:47
Lol Gaia, I didn't understand Domino's 4x16 subsurf idea either. And even now I don't think I do. But... I started with your description with the 4-x, 64-y, 0-subdiv cylinder.

I still have some questions, but it worked pretty well! Look at the picture below. On the left the 'old' chair, on the right 'your' chair. Not constructed very well, but please don't look at that. Below you see that the old chair deforms very quickly. Your chair still has good LOD, and inworld it stays good for about almost 25-30 meters, which is good enough for me.

Here's the pic:

MY QUESTIONS (if I may):

1) With your method, I must use a zero subdivision. But afterwards I must bake and import the sculpt map and I get much more vertices/faces in the imported model. Why must I first use 0 subdivision (less details) and then import the map (more details)? Why not a higher subdivision to begin with?

2) Can I enter ANY value for mesh faces? For example: 3-x and 15-y or 36-x and 177-y or do they need to be certain numbers?

3) The cylinder mesh is 4-x and 64-y. The initial default baked map would be 8x128 (I believe), but you tell me to change it to 8x512. Is that the reason that the newly imported tga gives more details? And why 8x512? Why not 4x256 or 8x256 for example? How do I know what the right size must be?

4) When I've imported the 8x512 map, you tell me to delete all vertices inbetween the cubes. I've done that and it worked fine. But can you simply delete vertices? I thought a sculpty map must have a specific number of vertices for it to work.

5) Just a small question: I selected the rows as you described with the row numbers and applied scale SHIFT - z 0. It scaled the rows to 0 on the x and y axes, but it left me with 'bricks' with sharp points above and below each brick. I corrected that manually, no problem, but did I do something wrong? Should the bricks have been exactly flat/square, also at the top and bottom?

Hehe, later I'll try Domino's method. I hope I understand it. Subsurf still seems to be difficult to understand for me...

Thanks a lot again!
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
11-22-2009 03:49
This is still crudely modelled, just trying to convey the technique here.



Subsurf model at left - I just used loop cuts and edge creases to add detail to the LOD1 version.

The imported LOD1, LOD2 and LOD3 versions have an ambient occlusion bake applied (slight error in bake on the seat would need fixing).
_____________________
Visit http://dominodesigns.info for the latest Primstar info
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
11-22-2009 09:37
From: Paulo Dielli

1) With your method, I must use a zero subdivision. But afterwards I must bake and import the sculpt map and I get much more vertices/faces in the imported model. Why must I first use 0 subdivision (less details) and then import the map (more details)? Why not a higher subdivision to begin with?
See the 4x faces. If you use subdivision in first place, you will get more faces in x, hence less faces in Y, hence less vertices to separate objects, hence less LOD resistancy (to my understanding). But as i said before this technique comes with additional workload. So regarding efficiency, Domino's approach is the better one. I still believe that i can make a perfect LOD1 resistant chair with my technique although i am sure, Domino knows how to do that using his approach ;-)


From: Paulo Dielli

2) Can I enter ANY value for mesh faces? For example: 3-x and 15-y or 36-x and 177-y or do they need to be certain numbers?
I think that you can not use arbitrary numbers, but many combinations will do. I still recommend to let the primstar GUI let you tell which combinations work, which don't (numbers shown on black Background denote illegal values.)

From: Paulo Dielli
3) The cylinder mesh is 4-x and 64-y. The initial default baked map would be 8x128 (I believe), but you tell me to change it to 8x512. Is that the reason that the newly imported tga gives more details? And why 8x512? Why not 4x256 or 8x256 for example? How do I know what the right size must be?
My rule of thumb:

x*y=4096 or x*y=8192

The rules in detail:

- currently only 4096 and 8192 pixel maps are imported lossless into SL.
- 8 is the smallest accepted value. As this makes 4 faces in U and this seems to be the minumum value. Using this value i get the most possible number of separateable objects.
- 512 is used to make it a 4096 pixel map.

From: Paulo Dielli
4) When I've imported the 8x512 map, you tell me to delete all vertices inbetween the cubes. I've done that and it worked fine. But can you simply delete vertices? I thought a sculpty map must have a specific number of vertices for it to work.
The baker fills all holes automatically. So if you remove the vertices, then modell, then bake, then reimport the baked sculpty yo u will see that the connection lines are back. Removing the vertices is simply a convenient method to keep them out of sight.

From: Paulo Dielli
5) Just a small question: I selected the rows as you described with the row numbers and applied scale SHIFT - z 0. It scaled the rows to 0 on the x and y axes, but it left me with 'bricks' with sharp points above and below each brick. I corrected that manually, no problem, but did I do something wrong? Should the bricks have been exactly flat/square, also at the top and bottom?
No what you have seen is correct, you need to shift them around by hand. I typically take the in between vertices and scale them along z by a foctor of 3. That makes perfect bricks.

From: Paulo Dielli
Hehe, later I'll try Domino's method. I hope I understand it. Subsurf still seems to be difficult to understand for me...
Thanks a lot again!
Use a 4x*16y cylinder as starting point. Then in the modifier stack locate the subsurf modifier and set it to "simple subdivision". Now you have enough rows in order to create 6(?) separated objects. As Domino mentioned earlier the chair can be constructed out of 3 separated sub objects. So in principle you can get very far with this technique. And at the end it is easier to use it than to use Multires.

Please remember that the only reason why i prefer to use 0 subdiv here is in order to get a fully LOD1 compatible object.
Tiziana Catteneo
Registered User
Join date: 19 Feb 2007
Posts: 187
11-22-2009 12:00
4x256 mesh and save 2 rows of scaled zero vertex to create a bigger bounding box that can be used with huge prims.

Maybe in blender there is a better way than use scaled zero row of vertex to create a bigger bounding box but I dunno how
Kornscope Komachi
Transitional human
Join date: 30 Aug 2006
Posts: 1,041
11-22-2009 13:33
From: Tiziana Catteneo
4x256 mesh and save 2 rows of scaled zero vertex to create a bigger bounding box that can be used with huge prims.

Maybe in blender there is a better way than use scaled zero row of vertex to create a bigger bounding box but I dunno how

That way is ok if you have vertices to spare. To minimise, you could use a few from a corner. Or...

You can simply change the centre of the object and bake using "Keep Center".

Decide how big you want the BB, place the 3D cursor in the middle, checking the 3 views, top, side and front, then choose "Center Cursor" in mesh tools panel. That sets the center of the mesh where you define it. The mesh and center will look lopsided.

Like a door, you want the center at the edge, not in the middle. Then bake the sculpt making sure "Keep center" is checked. (Or it will revert to the center of the mesh)

Very handy for making the "Sit Point" for the chair above so avvie sits where you want him without sit scripts. Or a door, of course.

The caveat is, you may lose some detail of the sculpt map because you are shifting the center. You can help here by baking to a bigger sculpt map. Testing is mandatory!

(I could well be wrong on some of this but it's worked for me)
_____________________
SCOPE Homes, Bangu
-----------------------------------------------------------------
Carbon Philter
Registered User
Join date: 4 Apr 2008
Posts: 165
11-22-2009 15:05
From: Tiziana Catteneo
4x256 mesh and save 2 rows of scaled zero vertex to create a bigger bounding box that can be used with huge prims.

Maybe in blender there is a better way than use scaled zero row of vertex to create a bigger bounding box but I dunno how


Check on Domino's Primstar website - http://dominodesigns.info/node/144#comment-334
He gave me detailed instructions on setting the position of the bounding box to let me use a specific megaprim size.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
11-23-2009 16:24
From: Tiziana Catteneo
create a bigger bounding box that can be used with huge prims


For a chair? How big is your bum?
_____________________
Visit http://dominodesigns.info for the latest Primstar info
Paulo Dielli
Symfurny Furniture
Join date: 19 Jan 2007
Posts: 780
11-26-2009 16:56
Thanks for all your help.

The last week I have been experimenting a lot with LOD, using all the techniques mentioned in this thread. To be honest, I like the multires method much more than subsurf. Multires seems to give me more control. I have made a few complex test sculpts that gave me perfect LODs in SL, so I am very happy.

But now I need your help once more with 2 issues. Btw, I use Blender 2.49b and Primstar 0.5.0.

1) I have textured my sculpt mesh in Blender and I want to bake the texture (not the sculpt map, just the texture). So in the UV Editor I click Image > New > choose the image size and select OK. But then I get the error 'Operation only available for multires level 1'. What's wrong? [EDIT:] Oh wait, just found the solution, watching one of Gaia's tutorials. I must first apply multires, then it works. Sorry :) But now a second question comes up:

Gaia, in your tutorial about multi-image texturing you are using a very precise but rather complex method. Why can't I simply select vertices, apply a texture-image on them, select another group of vertices, apply another texture-image on them, and so on... and then just bake the texture?

[EDIT: my following second question still stands:]

2) I am using Primstar 0.5.0, so not the latest version. The reason is that I can't see the mesh faces clearly in Object Mode in the newest Primstar 0.9.25 and I do like to see those faces. Is it normal that I CAN see those faces in 0.5.0 but not in 0.9.25?

My specs: Blender 2.49b (32 bit version) - Python 2.6.4 - Primstar 0.5.0 - Vista 64 bit Home - Intel Quadcore @ 2.33 Ghz - 4 Gb Ram - Nvidia geforce GTS 250.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
11-27-2009 01:05
From: Paulo Dielli
Thanks for all your help.

The last week I have been experimenting a lot with LOD, using all the techniques mentioned in this thread. To be honest, I like the multires method much more than subsurf. Multires seems to give me more control. I have made a few complex test sculpts that gave me perfect LODs in SL, so I am very happy.


http://dominodesigns.info/node/197 will help with subsurf precision issues - there's a loop cut bug affecting it.

From: Paulo Dielli
Why can't I simply select vertices, apply a texture-image on them, select another group of vertices, apply another texture-image on them, and so on... and then just bake the texture?


You can do this with UVTex as the bake target and one additional layer to assign the images to.

From: Paulo Dielli
2) I am using Primstar 0.5.0, so not the latest version. The reason is that I can't see the mesh faces clearly in Object Mode in the newest Primstar 0.9.25 and I do like to see those faces. Is it normal that I CAN see those faces in 0.5.0 but not in 0.9.25?


We're up to 0.9.29 now, you can change the number of Edges displayed by altering the Edges setting in the multires panel. Set it to 3 to see all of them.
_____________________
Visit http://dominodesigns.info for the latest Primstar info