Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

LoD enhancement of sculpts

Naiman Broome
Registered User
Join date: 4 Aug 2007
Posts: 246
04-25-2008 12:13
Hello I have read this in a building tips tutorial I took in a shop .....
"
LoD is influenced by two factors. One is a client-side setting. Go to preferences->Graphics Detail. The Object Mesh Detail slider affects how far away the LoD levels switch; if the slider is all the way to the left, it is very close; if to the right, it is maximum. Most users in Second Life set this slider to maximum and give it high priority, however some use the default middle value. When building, switch between maximum and default to get an idea for how your sculpts will look for different people. The second factor is the largest axis value of the prim. Examples: a 10x10x10 prim will have twice the LoD distances as 5x5x5; a 10x1x1 prim will have the same LoD levels as a 10x10x10.

Because one have complete control over sculpts, one can use the correlation between prim size and LoD to adjusting the LoD level of sculpts. This is done by scaling the entire sculpt mesh down, so that in-world the sculpt prim's size can be scaled up accordingly."

by Aminom Marvin


but I t actually dont tells how to make effectively , I tried it to scale in wings 3d or in max but the result was always the same bbox....

I alsso tried to scale down brightness or saturation in ps but brightness caused some weird vertex merging occour while the desaturation reduced but distorted the prim shape ....
Naiman Broome
Registered User
Join date: 4 Aug 2007
Posts: 246
04-26-2008 07:31
No one knows?
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
04-26-2008 11:01
Sorry, I'm not a user of Max or of Wings. If it were Maya, I'd say scale the object up or down, then freeze & reset transformations, and delete history. I don't know what the right answer is for the two programs you're using.

For scaling in Photoshop, I've never actually done it, but I would imagine the thing to change is lightness, not brightness. Image -> Adjustments -> Hue/Saturation -> Lightness slider. As I said, I haven't tested this, so I can't guarantee it will work. It just seems like it should in theory.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
04-26-2008 11:28
I think Chosen is pretty much correct. I wrote a quick-and-dirty program to "scale" the *sculpt map* itself before I upload it. When it's uploaded and turned into a sculpty, you can see that it is much smaller than the bounding box, so you have to resize it larger to make it the right size.

Coincidentally, scaling the sculpt map is also a way to create extremely small prims, for whatever that is worth.
_____________________
Naiman Broome
Registered User
Join date: 4 Aug 2007
Posts: 246
04-26-2008 14:24
Hi thanks that is very interesting so where can I find this program u made?
Naiman Broome
Registered User
Join date: 4 Aug 2007
Posts: 246
04-26-2008 15:32
Btw I tired to downlevel the lightness but ends up making some distorsion in the prim .....

Any way to prevent this?
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
04-26-2008 16:19
From: Naiman Broome
Any way to prevent this?
Not in general. One of the biggest constraints on scultpies is that there are only 8 bits pf precision per dimension, which limits how precisely you can place a vertex. As you scale it down, you are using even fewer bits, so you have even less precision.

Keep in mind that Aminom is a very unusual sculpty creator. He actually creates his sculpties in Photoshop, by specifying the color value of each pixel in the bitmap. Thus, from the very start, he is very aware of the grid he is designing to. I suspect he rarely, if ever, builds to one scale and then scales down to another, because he would have the same problem you are.
Abu Nasu
Code Monkey
Join date: 17 Jun 2006
Posts: 476
04-26-2008 17:32
To make the sculptie smaller in the bounding box, there are several ways of doing this in Photosop. The basic idea is to 'suck' the values closer to 128.

- Brightness/Contrast and lower Contrast
- New Layer, fill with 50% grey, and lower opacity
- Curves
- Levels

This is best left to RGB methods instead of trying to get fancy with tools that work in other spaces.

If you know your blending modes, you can do a myriad of other things.
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
04-26-2008 18:32
From: Naiman Broome
Hi thanks that is very interesting so where can I find this program u made?


It's currently hard-coded to embed my watermark in the resulting sculpty texture, so it's not generally useful for others, but I'll try to find some time tomorrow to remove that part and place a download link here.

.
_____________________
Naiman Broome
Registered User
Join date: 4 Aug 2007
Posts: 246
04-27-2008 01:56
Cool thanks ..... I show u what I am doing .... I actually making sculpt parts/furnitures to replace pieces that at my opinion is "prim waste" like when u have to use 30 prims ffor a bench I made this in 2 prims but I need to raise to 3/4 at least to add multipla avatar sitting animations I guess no way to prevent this but its still a good advantage when I can have a 4 prim sit instead of a 30 prims one .....all this couse I am building my sim in a prim saving concept , so to have more room for free prims and decrease lag , hopefully ....


altought the problems arise about thelod distnce and when I get distant with the camera I get the distorsions ....


I have tried to scale in Max , wings 3d , and using ps , the only thing that worked better is the lightness decreasing in PS , but that way the pieeces do not mach anymore well couse the surface of the parts becomes more roughy .....

the bench here consist of two consequential prims of wooden bar shape that in normal mode coincide mostly well but decreasing the lightness they become less and less precise as u can see in the picture ....


looking in the ps the image r g and b , the red is made like b&w stripes from top to down , while green and blue are horizontal a bit steppy in colour tone stripes decreasing lightness from top to down
....

I tired to smooth those steps inside a mask but it messed up the image , I have also tried to uniformize them to one single colour , but resulted in mess of course ......


I would like to ber able to make the edges perfectly edgy without having to fold the vertices on themselves and have perfect flat surfaces ........

also to increase the lod distance becouse as now since the shape of the bench as I get like 10 or few meters away when the bench is still clearly visible , it gets really heavily messed ......

Any idea of how I can acheiove that?
Thansk a lot on all your answers you are all very kind and helpfull......

http://img233.imageshack.us/img233/296/sculptmi8.jpg
Abu Nasu
Code Monkey
Join date: 17 Jun 2006
Posts: 476
04-27-2008 03:21
In Photoshop:
- Add a new layer on top of the sculpty map layer
- Fill it with 50% grey
-- Edit > Fill
--- Using: 50% Grey
- Lower opacity of the 50% grey layer to 50% or so.
- Save/Export to a sculpty map friendly format.

If you set the 50% grey layer to 50% opacity, the resulting XYZ ranges will be half of what they used to be. This means that the sculpty will take up half of the space in each XYZ dimension, or 1/4 of the full bounding box.

What happens if you set the 50% grey layer to 75%?

What happens if you fill a layer with pure white and set the opacity to 50%?

How would you do the same thing using Levels or Curves?

I got some time coming. Maybe I'll take a break from my other project and work on my sculptie tutorials.
Naiman Broome
Registered User
Join date: 4 Aug 2007
Posts: 246
04-27-2008 05:38
T&hankyou I have tried that and , the result is a more precise resizing , but the roughenings that are in original sculpt get increasted at each level of % of gray overlaying ...... I made one that is at 75% looks k nw for lods but at close distance altought looks quite good overall it had the survace parts a bit misplaced in resutling a rougher surface .... here is a picture .....


those roughenings where also present in the original sculpt but they where much less visible , just a bit .... in the 3d programs the surfaces are perfectly flat ...... is there a way I can edit this in PS may be to make so that all the surface is perfectly flat?



http://img74.imageshack.us/img74/9184/benchel8.jpg
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
04-27-2008 10:28
From: Abu Nasu
In Photoshop:
- Add a new layer on top of the sculpty map layer
- Fill it with 50% grey
-- Edit > Fill
--- Using: 50% Grey
- Lower opacity of the 50% grey layer to 50% or so.
- Save/Export to a sculpty map friendly format.

If you set the 50% grey layer to 50% opacity, the resulting XYZ ranges will be half of what they used to be. This means that the sculpty will take up half of the space in each XYZ dimension, or 1/4 of the full bounding box.

What happens if you set the 50% grey layer to 75%?

What happens if you fill a layer with pure white and set the opacity to 50%?

How would you do the same thing using Levels or Curves?

I got some time coming. Maybe I'll take a break from my other project and work on my sculptie tutorials.


You know... This sounds like a great idea for a Tech Slop filter, doesn't it? <hint, hint>

.
_____________________
Abu Nasu
Code Monkey
Join date: 17 Jun 2006
Posts: 476
04-27-2008 11:08
I have given a bit of thought to such a filter. But this rather easy to do with stock tools. It gets even easier when you record your own Actions. Added bonus of having a layered PSD for further tweaking and variations.

However, I do have an old Lab filter with a bunch of little tweaks tossed together in one little spot. It's a personal filter that does some simple yet powerful things that can't be done with stock tools. I'll start giving some thought to maybe converting some of the functions for sculptie use. I already have one in RGB that twists a sculptie about the Z axis which is really cool for staffs and things.

We'll see.
Trybil Timeless
Registered User
Join date: 9 Oct 2007
Posts: 18
04-28-2008 10:24
I found that Gimp works very well. Just adjust the R/G/B color levels down. You can scale each dimension (color) independently.

In Gimp: Click Colors, Levels..., select Channel (R, G, B), then slide the Output Level to something less than 256 (e.g. 128).
Aminom Marvin
Registered User
Join date: 31 Dec 2006
Posts: 520
04-28-2008 12:17
Here's a quick tutorial on LOD and also some hints on how I work:

This is a near perfect cylinder with sharp edges. How I made it is that I used the formula for a circle to determine the RG values, which are the values for the rows. All the RG values of a column have the same values. The top and bottom rows are 127,127 in RG to specify the poles. The next two rows on the top and bottom have the same blue Z values to form sharp edges. So, top to bottom, there are 29 values (33 - 2 bottom and 2 top. 255/28 is approximately 9. So, for each of the rows I use linear dodge and paint 9 over and over to make a linear gradient. This makes a cylinder that uses 252/255 of the blue values, so there will be a slight gap. If desired, one could increase the top value by 3 to completely fill it. Also, when working I always use a grid in photoshop of 32 pixels per line with 8 subdivisions, working with a 128x128 image. The exception is the top row and right columns of pixels, which are sort of squeezed in.

Anyways, if you don't understand the above, don't worry too much :) Hopefully it'll be useful for someone. Here's the completed cylinder, which you can play around with, give away, use as a base for modeling stuff etc:



Now, scaling. There's two uses for this: LOD control, and making prims that can be smaller than 0.01m in size. For LOD, you only have to scale one axis, most likely the largest axis. This is very important for retaining detail, as you will decrease the amount of vertex space only on one axis instead of all 3.

For models derived from this cylinder, the blue (z) axis would probaly be the largest for most things, so let's scale that.

First we scale by half using the color curves tool. now, recall that we used the range 0-252 for blue, Using color curves, we use the numbers 0->64, and 252->191. If the mesh started out using the full values, we'd use 255->191 instead.
Here is how it looks in photoshop:




This scales the sculpt so that the center of the in-world axis is in the center of the cylinder. You can also use the numbers 0->0 and 252->127 to put the axis close to the top of the sculpt. I say close because the actual center of a sculpt is at 127.5, but since you can't have half RGB values, you are forced to use either 127 or 128.

Here is a visual example of this: the green cylinder is a normal prim cylinder with a dimple of 0.5 to put its top exactly at the rotational axis. The blue cylinder is a sculpt using 252->127, and the yellow is a sculpt that uses 252->128.



Here are some additional numbers for scaling:

4x as small: 0->95 and 255->159
8x as small: 0->111 and 255->143

The more you scale, the less vertex values you have to work with. 8x only has 32 pixel resolution per channel.


Finally, here's a list of most of the tools I use to make sculpts in photoshop, and what they do:

Linear Dodge: increase vert position values.
Difference: decrease ert position values.
Flip Image/Element +Invert Single Channel: mirror (very useful!)
Swap two channels: rotate 90 degrees with no loss in data. For example, swapping red and green rotates on the Z axis.
Color Curves: scale
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
04-29-2008 07:40
I don't know if it helped the OP, Aminom, but I found that very interesting. Thanks.
Pygora Acronym
User
Join date: 20 Feb 2007
Posts: 222
04-29-2008 09:11
Awesome stuff Aminom. That is saved and goes into my archives.
Naiman Broome
Registered User
Join date: 4 Aug 2007
Posts: 246
04-29-2008 10:53
Great Anonim thanks a lot, u are truly the Sculpt Master ^^ Love ur work .... I will try this as soon as I I have some free time .... ^^ ....
Naiman Broome
Registered User
Join date: 4 Aug 2007
Posts: 246
04-29-2008 11:26
Btw is possible to obtain stretight steps without having to fold on themselves the vertexes in the 3d program , directly working into ps?