Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sculpts - collision boundary boxes

Isablan Neva
Mystic
Join date: 27 Nov 2004
Posts: 2,907
12-29-2009 08:25
I've spent 20 minutes searching for an old thread that described a way for a sculpt creator to reduce a bounding box and thus the collision problem for items like columns.

I had one sculptor I was working with able to use this info to reduce his bounding box so I could link columns (yes, with loss of detail at a distance, I know this to be the price to pay) and I need to have another sculptor do the same thing. The bounding box is so large I have to keep it phantom (and thus can't link) for people to be able to walk around it, even though the prim itself is maybe 1m x .5m.


Can anyone help me out here?

Thanks!
_____________________

http://slurl.com/secondlife/TheBotanicalGardens/207/30/420/
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-29-2009 08:48
I am very astonished, that the bounding box gets so much bigger than the visible part of your sculpty. can it be that the sculpty uses reduced color range in one or 2 axes ? then the visible boundingbox would no longer match the technical bounding box which would be larger in that case. I am eager to study the sculptmap in detail...
Soldatino Oh
____________
Join date: 9 Jun 2008
Posts: 58
12-29-2009 09:24
my tool expands all the axes end saves in the filename the new ratio to adjust in world
http://www.imitidicthulhu.it/CoOLLISIONpage.html
_____________________
my tools : http://www.imitidicthulhu.it/2TGApage.html
DxFACE : http://www.youtube.com/watch?v=m1iWlwnDrec
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-29-2009 13:11
It was as i expected. The sculptor has created the leave with something we call "keep scale on". This translates to "reduced color range". And this translates to "the bounding box is only filled partially". And this causes your problem:



The sculptmesh only occupies a fraction of the full Boundingbox. The benefit is that the scaling is kept intact although we see a prim of size <2,2,2> here (a cubic boundingbox). The backdraw is that you loose significant amount of resolution.

I can tell you only how i fixed that in blender. Other sculpty tools might provide similar functionality though:

I just uploaded the sculptmap, smoothed the surface a bit (to compensate the lack of resolution in the original sculptmap) and then rebaked it using the standard settings (of the primstar blender add on) and stored the resulting sculptmap. The sculptmap no longer waists color ranges in order to keep the scaling. Now the bounding box fits tightly around the sculpty:



Of course the backdraw is, that you must scale the sculpty in world. You can do this either by hand or by using the LSL exporter (in blender) which generates an LSL script that creates and scales your sculpty in world.

have fun
Gaia
Soldatino Oh
____________
Join date: 9 Jun 2008
Posts: 58
12-30-2009 08:23
Reading this topic, I thought to update my old version of CoOLLISION.

The new one (vers.0.00.1a) enables the new menu item -View your sculpty in 3DLite- (if you have it), then I updated the XP look of the program (it has his windows manifest file).

http://www.imitidicthulhu.it/CoOLLISIONpage.html
_____________________
my tools : http://www.imitidicthulhu.it/2TGApage.html
DxFACE : http://www.youtube.com/watch?v=m1iWlwnDrec
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-30-2009 08:41
From: Soldatino Oh
Reading this topic, I thought to update my old version of CoOLLISION.

The new one (vers.0.00.1a) enables the new menu item -View your sculpty in 3DLite- (if you have it), then I updated the XP look of the program (it has his windows manifest file).

http://www.imitidicthulhu.it/CoOLLISIONpage.html
Hi Soldatino.
I took a quick look at your program. Can you explain in a little more detail in which cases your program will come in handy ? As far as i can see, it just rescales the dimensions of a sculpty to span over the full color range. But this is something the export tools of the various sculpty programs should allready take care off? I expect the majority of all sulpties ever produced to NOT suffer from the color range problem because most sculpty tools can't even handle reduced color range... So i expect to see your tool usage only in very rare cases...

But maybe i am missing a functionality of your tool which makes it unique ?
Soldatino Oh
____________
Join date: 9 Jun 2008
Posts: 58
12-30-2009 09:02
Well, in the Sculpty data, the range of colours (rgb) is the same of the range of points usable in the object.
So, if you see the example, my canoa uses only a part of the space, ideally a cube 255x255x255.
In the example the canoa uses exactly 32x32x248.
Each Sculpty that is not a cube or sphere lefts space around itself.
The space of the bounded box.
Well, my tool stretch the minimum and the maximum points of the sculpty, and all points proportionately, in the direction of the limits of the bounded box.
So, as you write, in world we must resize again contrariwise on x,y,z, but we in this way resize the whole bounded box, and the collision problem is partially solved ( we cannot go "into" caved parts of the sculpty).


edit
now I use your star to be more understandable (I apologize for my bad english). I think that it is not possible to sit over the star (it is only an example), because its space in Z is less of the space available.
If you stretch the sculpty then resize it in world it becames possible.

_____________________
my tools : http://www.imitidicthulhu.it/2TGApage.html
DxFACE : http://www.youtube.com/watch?v=m1iWlwnDrec
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-30-2009 10:41
From: Soldatino Oh
now I use your star to be more understandable
This star is going around the world. Thank you for referring to it. I love that ;-))

From: Soldatino Oh
Well, in the Sculpty data, the range of colours (rgb) is the same of the range of points usable in the object.
Agreed.

From: Soldatino Oh
So, if you see the example, my canoa uses only a part of the space, ideally a cube 255x255x255. In the example the canoa uses exactly 32x32x248.
This can only be so because you have decided to do it like this. Maybe your particular sculpty tool does it like this by default ? Which tool are you using ? Is it NOT capable to create full color range maps ?

From: Soldatino Oh
Each Sculpty that is not a cube or sphere lefts space around itself.
The space of the bounded box.
This is at least a missleading statement. This is true only if your sculptmap-baker supports "auto-scaling" which means it can limit the color range in order to preserve the scaling...

There is another point to take care off: If you already have a sculptmap with reduced colorspace, your tool can not increase resolution. It only can reduce the needed bounding box size.

In general it makes more sense (for me) to take care of the color range during baking and not afterwards. Hence to my understanding a good sculptmap-baker should (be capable to) bake the sculptmaps using the full color range to preserve the best possible resolution...
Soldatino Oh
____________
Join date: 9 Jun 2008
Posts: 58
12-30-2009 13:55
From: Gaia Clary
Maybe your particular sculpty tool does it like this by default ? Which tool are you using ? Is it NOT capable to create full color range maps ?


I am unable to explain, the meaning of fullcolor if that the shape uses ALL points from zero to 255 for each axis (x,y,z = r,g,b).

This happens for all the colors only if the shape is similar to a cube or a sphere.

In other cases you havent full colors, because the sculpt havent points xyz where the equivalent rgb lacks.

If this is not true, I did not understand the whole concept of the Sculpties.
But I dont think.

Linden Lab used first two sculpties as example. Apple and banana.
Apple is full color, because it is a sphere.
Banana isnt, it lacks the blue. Why? Because the Z value (elevation, in its case=blue) has minimal changes of range.

The lack is not a error, but is the way that the Sculpty uses to load itself in the full color range (255x255x255 colors OR points or RGB, like as you want).

I am unable to explain better.
You can check the sculpt banana bounded box: the shape is untouchable at the top and at the bottom, because the sculpt is at the center of the bounded box and its elevation does not touch the limits of Z (zero and 255).
Then check, if you want, the bounded box created from my tool in the same sculpty.
_____________________
my tools : http://www.imitidicthulhu.it/2TGApage.html
DxFACE : http://www.youtube.com/watch?v=m1iWlwnDrec
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
12-30-2009 15:01
From: Soldatino Oh
I am unable to explain, the meaning of fullcolor if that the shape uses ALL points from zero to 255 for each axis (x,y,z = r,g,b).

This happens for all the colors only if the shape is similar to a cube or a sphere.
No, because you can take any shape and stretch it until it touches the edge of the bounding box. Then when you rez it in world you use the < x,y,z > scale to shrink it back down to the right dimensions.
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-30-2009 15:10
From: Soldatino Oh
I am unable to explain, the meaning of fullcolor if that the shape uses ALL points from zero to 255 for each axis (x,y,z = r,g,b).

This happens for all the colors only if the shape is similar to a cube or a sphere.
How ever you look at it, the translation between color and vertex position is a mapping. And this mapping is calculated in the baking process. Hence it is (it should be) up to your sculpty baker, whether to map the true bounding box to the full color range, or not. Nothing prevents you from doing the mapping during the baking process (sculptmap bakers should do that anyways by default).

From: Soldatino Oh
In other cases you havent full colors, because the sculpt havent points xyz where the equivalent rgb lacks.
Again this is ONLY true when you want to preserve the scaling. There is no technical barrier here to remap the object to a rectangular bbox and thus use the full color range...

And to my understanding, this is exactly what your tool does. But that should be done by the baking tool. Otherwise you loose quality... That's all i want to tell.

I am still curious what sculpty tool you use. maybe that will put same light here :rolleyes:
Soldatino Oh
____________
Join date: 9 Jun 2008
Posts: 58
12-30-2009 15:12
From: Argent Stonecutter
No, because you can take any shape and stretch it until it touches the edge of the bounding box. Then when you rez it in world you use the < x,y,z > scale to shrink it back down to the right dimensions.

yes, this is exactly, only shapes similiar at cube or at sphere have full colors and do not be stretched and rescaled in world.
_____________________
my tools : http://www.imitidicthulhu.it/2TGApage.html
DxFACE : http://www.youtube.com/watch?v=m1iWlwnDrec
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-30-2009 15:22
From: Soldatino Oh
yes, this is exactly, only shapes similiar at cube or at sphere have full colors and do not be stretched and rescaled in world.
Again, what is the point??? This is a trivial recognition... What is our benefit from this recognition ? It is somehow like telling "In order to make ice, first heat the water up then cool it down." Why not directly cooling it down ??? Apologize i do not want to become rude or anything. I just found this example to get it on the nail ;-)
Soldatino Oh
____________
Join date: 9 Jun 2008
Posts: 58
12-30-2009 15:23
From: Gaia Clary

And to my understanding, this is exactly what your tool does. But that should be done by the baking tool. Otherwise you loose quality... That's all i want to tell.
I am still curious what sculpty tool you use. maybe that will put same light here :rolleyes:

I use only CAD systems and recently SketchUp. If you use tools that rescales and returns to you the xyz values to set in world you obviously do not need tools like mine.
_____________________
my tools : http://www.imitidicthulhu.it/2TGApage.html
DxFACE : http://www.youtube.com/watch?v=m1iWlwnDrec
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-30-2009 15:25
From: Soldatino Oh
I use only CAD systems and recently SketchUp. If you use tools that rescales and returns to you the xyz values to set in world you obviously do not need tools like mine.

So now that explains everything!!! Sorry, i was not aware of this. Sure in the case your sculpty baker can NOT rescale your tool makes sense!!! But didn't i mention that before ? :cool:

yes i did...
From: Gaia Clary

Hence it is (it should be) up to your sculpty baker, whether to map the true bounding box to the full color range, or not. Nothing prevents you from doing the mapping during the baking process (sculptmap bakers should do that anyways by default).

And honestly, wouldn't it be better to either create a remapping sculpty baker for your tool or if that can't be done, switch to another tool ? I mean, you waste resolution if your tool does not remap!!!
Soldatino Oh
____________
Join date: 9 Jun 2008
Posts: 58
12-30-2009 16:07
From: Gaia Clary

And honestly, wouldn't it be better to either create a remapping sculpty baker for your tool or if that can't be done, switch to another tool ? I mean, you waste resolution if your tool does not remap!!!

In my tool I use floating point values to computate the rescale, so I dont think that the lost of definition is significant. In effect I could implement directly the rescale in my TGA parser from DXF (cad files) or SketchUp, but in the drawing I usually draw over a INTEGER grid, because it is better to preserve modularity of the shapes. I wrote my tools because many people had the bounding box problem. In effect the option of to rescale immediately is a good idea. Option, because I am working also about the concept to create new sculpts clipping, mixing and morphing between existing shapes and the various rescaling can to be a limitation, the TGA loses the true size.
_____________________
my tools : http://www.imitidicthulhu.it/2TGApage.html
DxFACE : http://www.youtube.com/watch?v=m1iWlwnDrec
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-30-2009 16:19
From: Soldatino Oh
In my tool I use floating point values to computate the rescale, so I dont think that the lost of definition is significant.
Yes it is significant. and i can tell you why:

Consider you had a cylinder with z=256 cm, y=10 cm, x=10cm. Furthermore you have 32 vertices along the cylinder profile. Now when you make a sculpty with "preserve scaling" for this case, you will face this problem:

since the z-axis is the longest, this axis will be mapped to the full color range from 0-255
the other 2 axes can only be mapped from 0-10 otherwise your scaling would not be correct.

Using the numbers above, you immediately see, that the cylinder profile must be mapped to a grid of size 10*10. Now try to place the cylinderprofile on that grid. You will get quite significant distortions from the ideal spherical profile and this distortion will be baked into the sculptmap. Now how will you reconstruct the cylinder profile from such a low resolution map ? No floating point calculation in the world can redo the harm ;-(

Compare this behaviour to what happens when your baking tool does the mapping: in that case the range from 0-10 is mapped to a color range of 0-256 and that means now you have a grid of size 256*256 where you can place the cylinder profile. This is significantly more accurate, no ?

Try it out, if you do not believe me. Create a looooong sculpty-cylinder, create the sculptmap with your sculpty-tool, apply your remapping-tool and rez the result in world.

then create a short cylinder, that fits into a unit cube. Now you dont need to apply your tool, rez that in world, rescale it to make a loooong cylinder out of it and see how smooth the cylinder profile gets ;-)

So remapping during sculptmap baking obviously produces better resolution...
to be honest, as ong as you are dealing with organic sculpties with their axe-lengths differing less than 50% from each other the effect is not very significant. But it still is there...
For geometrical sculpties the effect will break your work almost immediately.
Soldatino Oh
____________
Join date: 9 Jun 2008
Posts: 58
12-30-2009 17:44
Then I stop because it seems I want to be polemical.
Yu are right. In some case is significant, of course. I know this.
In the Menu explanation of my SecondTGA, Section to get a sculpty "bas-relief" using a picture I wrote

Esporta TGA Sculpty Bassorilievo con nome...
..................
Per sfruttare al massimo la risoluzione la Sculpty viene generata al 100% della profondità disponibile, sarà quindi da ridimensionare in world sull'asse Y, diminuendolo fino a raggiungere la profondità più soddisfaciente.
Translation : (google)
To maximize the resolution Sculpty is generated at 100% of the depth available, you will then want to resize the Y axis world, declined to reach the deepest satisfactory



Usually a Sculpt has a body that requires a magnification of 1,5 or 2 maximus, along 2 of 3 axis, to achieve the 255 value. In this perspective I say that it is insignificant.
The single pipe is a particular case.
If your tube is part of a object the computation is along the size (for each axis) of the entire Sculpty. To stretch from 10 to 255 is unusual.
This stair was saved and rescaled.

7d959bbb-8a50-95f3-d083-809e0a7535d0
PioliThin_X=0.30_Y=0.04_Z=1.TGA


_____________________
my tools : http://www.imitidicthulhu.it/2TGApage.html
DxFACE : http://www.youtube.com/watch?v=m1iWlwnDrec