Sculpt is smaller then the prim it's in - Why?
|
Layla Honi
Registered User
Join date: 1 Nov 2007
Posts: 171
|
08-24-2009 23:09
I made a foot rest for my bike in Blender. I baked keeping scale at 64x64 and uploaded to SL...for some reason it's far smaller then the .5x.5x.5 sphere or cube I put the sculpt map in. Because of this I when I positioned the foot rest rezised it and put it on the bike, when I get on it tilts the bike up at the front. It's the only sculpt on the bike that is like that, I can't figure out why.
Does anyone who why this is happening and how to fix it?
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
08-24-2009 23:32
Keep scale works by first determining the longest axis of the bounding box. This axis will be translated into the full color range. The other 2 axes are scaled down to fit the proportions by reducing their color range.
Hence the resulting sculpty does span over the unit cube only on the largest axis. The other 2 axes will be only partially filled. And this is what you see with your foot. And not only this. You also loose precision due to the reduced color range.
Your better bet is to just bake the sculpty and resize it in world. Or use the SL exporter which generates an SL-script. If you apply this SL script to your sculpty, it will be rescaled approprioately.
have fun, Gaia
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
08-25-2009 03:07
Also bake it on it's own. If you select multiple sculpties then the bounding box is the largest it can be to contain each individual sculptie. You'd use this on say two body panels that needed to align with each other. eg a 0.8, 0.2, 0.9 sculptie and a 0.1, 0.5, 0.1 sculptie would both be baked with a 0.8, 0.5, 0.9 bounding box. By baking them separately each uses a box that fits perfectly. Those same two selected and baked with "Keep Scale" enabled would use a 0.9, 0.9, 0.9 bounding box. Hmmm.. this is cropping up a lot at the moment, maybe I should rename "Keep Scale" to something that sounds like it should be off as default. I've done a more detailed explanation here now: http://dominodesigns.info/node/88
_____________________
Visit http://dominodesigns.info for the latest Primstar info
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
08-25-2009 04:09
Scaling modes of the Blender sculpty baker
1.) bake with keep scale off:
1.1) one sculpty:
essentials:
- bounding box (bbox) fully used - color space fully used -> highest spatial resolution (precision)
details:
The bbox of the primitive and the bounding box of the sculpty match in all axes. Since a primitive is rezzed with a standard bbox of <0.5,0.5,0.5> the proportions of the sculpty must be adjusted in world either manualy or by script.
1.2) multiple sculpties:
essentials:
- smallest possible bbox that fits all parts - keep precise alignments (seam vertices can be aligned) - color space reduction possible on all axes (typically, but not necessarily) - loss of resolution
details:
A bbox will be calculated from the maximum dimension value of all involved objects. In other words: the biggest object in the x-dimension determines the x-value of the bbox. And similar to this the y- and z- values of the bounding box are calculated. The so determined BoundingBox is used by all generated sculpties. Hence the baker preserves the grid alignement, but does NOT preserve the proportions in world. As a consequence, each Sculpty must be resized individually either manually or by script.
In world the visual sculpty bboxes deviate from the technical primitive bboxes. The net effect is: for each sculpty it's primitive BBox is typically bigger compared to its mesh bbox. As a consequence, all sculpties suffer more or less from resolution degradation.
2.) bake with keep scale on:
2.1) one sculpty:
essentials:
- bounding box is a cube, edge length == longest bbox axis length - relative scales preserved, - color space reduced in all but the longest axis - loss of resolution
details:
The bbox of the primitive and the bounding box of the sculpty match only on the longest axis. Nevertheless the proportions of the sculpty are preserved. Since a primitive is rezzed with a standard bbox of <0.5,0.5,0.5> the sculpty typically is shown much "smaller" compared to its primitive bbox. But the sculpty is a bit like a "ready made". It does not need any proportion adjustments in world.
2.2 multiple sculpties:
essentials:
- smallest possible bounding box that fits all parts, but - bounding box is a cube, edge length == longest bbox axis length - relative scales preserved - color space reduction possible on all axes (typically, but not necessarily) - loss of resolution
details:
The same rules as in 1.2 (multi bake without keep scale) apply here too with one essential difference: instead of preserving grid alignment, now the baker preserves the relative proportions of the involved sculpties. So when rezzed in world, all parts have the correct proportions without need to modify the scales. There are 2 caveats here:
* Since the grid alignment is not preserved, you can no longer align your sculpties precisely. You will typically see the seems.
* Since the baker optimises for scaling, it typically creates smaller meshes, hence the used color range is more reduced compared to the multi bake without "keep scale".
conclusion:
- If you need perfect alignment, use multi bake without scale - If you need highest precision, bake all sculpts one by one without scale - If you want to create a "ready to use" sculptmap, bake it with keep scale
Final Question: What would be a good use case for baking multiple objects with keep scale ?
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
08-25-2009 04:56
It's not as straight forward as "color space reduced in 2 axis" with multiple sculpties. With multiples, say you have A) 1.0, 0.8, 1.0 and B) 0.5, 0.5, 0.5 - A) isn't reduced at all, unless Keep Scale in on, in which case it's one axis. B) is reduced on 3 axis with the amount on one axis changing depending on the settings of Keep Scale.
I'd also use "proportions" rather than "relative scales" so as not to raise the question of "relative to what?"
_____________________
Visit http://dominodesigns.info for the latest Primstar info
|
Layla Honi
Registered User
Join date: 1 Nov 2007
Posts: 171
|
08-25-2009 10:46
I understand what you both are saying, but this is not case from what I can see. Since I did bake all the sculpts of that session in the same way and they all used a cylinder mesh and all were fine, but the one, I do not understand why just this one would act like this.
So heres what I did: 1. I always bake only one sculpt at a time 2. I baked several sculpts during that session(seperately), all with keep scale on.
Now, when I uploaded into SL and applied the sculpt maps, I did not look at the bounding boxes and I did not notice the prim rescale tab dimensions. I resized the parts slightly to fit my existing build, which parts were baked without keep scale. (I didn't not know about it at that time)
When I got on the bike, which uses a physics script, I noticed the front end would tilt up.
Ok so now here is what I discovered after taking each part off and putting it back on one at a time to test. 1. All the sculpts I baked with keep scale on during that session were fine except the one foot rest. When in edit mode in SL you see the resize box tabs for rescaling(red,blue,green and white). These tabs conformed to the outer edges of those actual sculpts. The bounding boxes also conformed to the outer edges of the actual sculpts. This was as if the prim dimensions conformed to fit the sculpt.
2. The foot rest prim tab dimensions did not conform to the edge of the sculpt remaining the actual dimensions of the actual cube or sphere prim the maps were put in (I tried putting the map in both). However the bounding box for this sculpt conforms to the actual sculpt, not the prim dimensions as you would expect by the behavior of it on the bike. I tried rebaking this map several times with keepscale on which made no difference. (I noticed something like this happening with a large torus(non sculpt) which was cut, profiled and tapered. It acted like the full size torus, even tho the bounding box conformed to the size of the visible prim.) These behaviors might only be notice with builds using a physics script or physics box checked.
3. As advised, I baked without keep scale and it behaved as the previous sculpts which were all fine with both prim dimensions and bounding box conforming to the actual sculpt.
Sadly, if better resolution is achieved by keep scale off, I will use this method.
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
08-25-2009 11:29
From: Layla Honi 3. As advised, I baked without keep scale and it behaved as the previous sculpts which were all fine with both prim dimensions and bounding box conforming to the actual sculpt.
Sadly, if better resolution is achieved by keep scale off, I will use this method. Why sadly? That's how the scripts are supposed to work. It's why "Keep Center" and "Keep Scale" are off by default, that's where you'd usually leave them. Be happy that I've saved you another mouse click 
_____________________
Visit http://dominodesigns.info for the latest Primstar info
|
Layla Honi
Registered User
Join date: 1 Nov 2007
Posts: 171
|
08-25-2009 15:24
I'm sorry Domino,
I noticed my build was out when I tried to put the keep scale parts onto the build with the previous parts not keep scale.
It's just that I prefer prescion building. I'm a perfectionist...Keep scale would make that build exactly as it was built in Blender. I would prefer keep scale if it didn't lose resolution.
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
08-25-2009 16:09
From: Layla Honi I'm sorry Domino,
I noticed my build was out when I tried to put the keep scale parts onto the build with the previous parts not keep scale.
It's just that I prefer prescion building. I'm a perfectionist...Keep scale would make that build exactly as it was built in Blender. I would prefer keep scale if it didn't lose resolution. Don't worry, I just think there's been some confusion over what keep scale does. If it didn't lose resolution then it wouldn't keep the scale. That's an unavoidable tradeoff. There are other ways to control alignment that don't sacrifice as much resolution but obviously, the more control you need, the more you have to do manually rather than relying on the scripts. Multibake is the simple option for aligning. Just select parts that need to align and bake them together. However when there's a small part involved, it's often best to control this one manually rather than include it in the auto alignment. You can add a a normal mesh, say a cube, do a uv reset on it and call the UV Layer "sculptie". Don't add an image to this as we don't want it to actually bake. This cube will then act as a bounding box when selected with an object to bake. By scaling the cube you get precision control over the sculpties bounding box and thus it's bake size.
_____________________
Visit http://dominodesigns.info for the latest Primstar info
|
Layla Honi
Registered User
Join date: 1 Nov 2007
Posts: 171
|
08-26-2009 12:01
From: Domino Marama Multibake is the simple option for aligning. Just select parts that need to align and bake them together. However when there's a small part involved, it's often best to control this one manually rather than include it in the auto alignment. You can add a a normal mesh, say a cube, do a uv reset on it and call the UV Layer "sculptie". Don't add an image to this as we don't want it to actually bake. This cube will then act as a bounding box when selected with an object to bake. By scaling the cube you get precision control over the sculpties bounding box and thus it's bake size.
How many meshes can you bake together? My Build will have up to 31. I assume small is relative to the build. I have front forks of the bike which are not big, but are very long compared to the other parts. I'm not sure how to do the part of adding a normal cube mesh to use as a bounding box. I will have to look into it. Also in the information you provided about "keep scale" and "keep center" you state: Both "Keep Center" and "Keep Scale" will result in a bounding box for your sculptie that is larger than the actual mesh, so their use should be avoided except in cases where their benefit outweights this disadvantage. I have not used "keep center" but my results of using "keep scale" did not make the bounding box larger than the mesh. However I have noticed the bounding box larger on sculpts that needed rotating to place in the correct position. This leads me to another question. Why do some of my sculpts end up on an angle, not as I made and baked them in Blender? I noticed when I rotate them to where they need to be the bounding box increases if the demensions of each axis is different.
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
08-26-2009 13:13
From: Layla Honi How many meshes can you bake together? My Build will have up to 31. There's no limit. When I'm talking about aligning meshes using multibake, I mean for things like a cow where you might have 6 or more sculpties that need to form one continuous skin. If you don't need vertex to vertex precision, then baking each sculptie individually is usually the best option. From: Layla Honi I assume small is relative to the build. I have front forks of the bike which are not big, but are very long compared to the other parts. Yes, baking the forks with the exhaust is likely to be a bad idea for example, as each would be small and big in different directions, and they don't need to align anyway. From: Layla Honi I have not used "keep center" but my results of using "keep scale" did not make the bounding box larger than the mesh. Unless your mesh was square, it will have made the bounding box bigger. Trust me, I wrote the code that makes it do it 
_____________________
Visit http://dominodesigns.info for the latest Primstar info
|
Layla Honi
Registered User
Join date: 1 Nov 2007
Posts: 171
|
08-27-2009 11:25
From: Domino Marama Unless your mesh was square, it will have made the bounding box bigger. Trust me, I wrote the code that makes it do it  I dont' know why what I'm seeing is not what you are saying. I'm just stating what I am observing in both Blender and SL. I'm trying to understand why I am getting these little "quirks" and if they can be fixed or work around them. None of my meshes are square. For example the motor case, both Cylinders and the transmission of the bike are all longer on one axis and wider in another. I checked the bounding boxes in both Blender and SL. They do conform to the edges of the mesh for each. The motor cylinders bounding box expanded in two axes because I had to tilt the mesh to align it. These sculpts were all baked with out keep scale. I baked the intake, oil tank, foot rest and handle bars with Keep scale. The bounding boxes on the intake and oil tank conform to the mesh in Blender. For some reason as I stated before, the foot rest bounding box was very big only in SL, in Blender. There was some problem with baking the handle bars with keep scale. When I previewed them in SculptySpace they did not keep scale and rebaking did not fix this. I'll upload them without keep scale.
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
08-27-2009 12:51
From: Layla Honi I baked the intake, oil tank, foot rest and handle bars with Keep scale. The bounding boxes on the intake and oil tank conform to the mesh in Blender. For some reason as I stated before, the foot rest bounding box was very big only in SL, in Blender. There was some problem with baking the handle bars with keep scale. When I previewed them in SculptySpace they did not keep scale and rebaking did not fix this. I'll upload them without keep scale. Just a quick guess... Can it be possible, that you have unintentionally modified the color range adjustment in the sculpty-baker tool ? I once was hit by a similar problem only to find out at the end, that for a previous project i had reduced the color range to [0,32] on one axis and forgot to reset the range back to [0,255]. And i also was wondering all the time, why the SL bounding box was so much bigger than the sculpty ...
|
Layla Honi
Registered User
Join date: 1 Nov 2007
Posts: 171
|
08-28-2009 10:56
From: Gaia Clary Just a quick guess... Can it be possible, that you have unintentionally modified the color range adjustment in the sculpty-baker tool ? I once was hit by a similar problem only to find out at the end, that for a previous project i had reduced the color range to [0,32] on one axis and forgot to reset the range back to [0,255]. And i also was wondering all the time, why the SL bounding box was so much bigger than the sculpty ... I just tried another test bake on the foot rest to make sure the color range was not changed. The results are the same. I did one with with Keep scale on and one with keep scalel off. The bounding boxes on both conform to the mesh in Blender and sculpt in SL. The one with keep scale on still has the resize tabs larger than the sculpt while the the one with keep scale off has the resize tabs conforming to the edges of the sculpt. I uploaded the map for the handlebars which were baked with keep scale on. Keep scale is not working on this. The sculpt is small and flattened. The bounding box confroms to the sculpt, but the resize tabs are bigger like the foot rest. In order for the sculpt to look right the Z axis had to be stretched 5 meters will the X and Y are still 1 meter. The handle bars do not look good having deformaties. Even tho the bounding box conforms to the sculpt, the effective size of the prim is 5 x 1 x1 which causes problems on the bike with physics. I uploaded one with keep scale off which will work, having both bounding box and resize tabs conforming to the sculpt. The only thing these two sculpts have in common is they are small diameter cylinders pulled to create the required shapes. The bike frame was made the same way and has no problems, but was baked with keep scale off. I'm having another problem with making a new image in the UV image editor. On two meshes I was previously trying to make a texture layout. When I try to make the new 64x64 UV image to bake the mesh, the image does not change from the texture layout. When I select the mesh, it displays as the mesh in the UV image editor and will not change to the 64x64 UV map. Mutirez and modifiers are off and in the mesh tab I no longer have a new UV texture layout. I have not been able to back these.
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
08-28-2009 12:23
From: Layla Honi The one with keep scale on still has the resize tabs larger than the sculpt while the the one with keep scale off has the resize tabs conforming to the edges of the sculpt. Then the resize tabs are showing the bounding box that I'm talking about. When you enable "Keep Scale" it bakes the proportions of the model into the sculpt map (thus keeping it). With it off, then each axis is scaled to 1.0, so the full 256 grid positions are available and the resize tabs / bounding box are at the edges of the mesh. Either way a suitably scaled primitive is needed inworld, it's how the model is baked into the 1.0 x 1.0 x 1.0 sculpt space that is affected by the setting, nothing else.
_____________________
Visit http://dominodesigns.info for the latest Primstar info
|
Layla Honi
Registered User
Join date: 1 Nov 2007
Posts: 171
|
08-29-2009 02:32
From: Domino Marama Then the resize tabs are showing the bounding box that I'm talking about. I don't think you are understanding what I'm seeing...The bounding boxes and resize tabs on only those two sculpts are NOT the same size. All the bounding boxes of all my sculpts in both Blender and SL conform to the mesh/sculpt edge. The only thing that is larger on those two sculpts are the resize tabs, which are not the same size as the bounding box. In effect those sculpt are smaller than the .5x.5.x.5 prim they are in. There seems to be no answer to why these things are happening 
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
08-29-2009 02:58
From: Layla Honi I don't think you are understanding what I'm seeing...The bounding boxes and resize tabs on only those two sculpts are NOT the same size. That's because they are showing two different bounding boxes. The resize tabs are showing the primitive bounding box which is the one the physics engine is using and why the balance of your bike gets messed up. The other bounding box is the mesh one. It's the relationship between these two that "Keep Scale" affects. With it disabled, the mesh bounding box is stretched to fit the primitive bounding box. With "Keep Scale" enabled, only the longest axis is stretched to fit and the other two are sized to keep the mesh proportions. So the mesh bounding box ends up smaller than the primitive one on two axis. This can be a minor difference if the mesh is essentially square in ratio. I hope it's clear now because I'm not sure I can think of any more ways to describe it..
_____________________
Visit http://dominodesigns.info for the latest Primstar info
|
Layla Honi
Registered User
Join date: 1 Nov 2007
Posts: 171
|
08-30-2009 11:59
From: Domino Marama That's because they are showing two different bounding boxes. The resize tabs are showing the primitive bounding box which is the one the physics engine is using and why the balance of your bike gets messed up. The other bounding box is the mesh one. It's the relationship between these two that "Keep Scale" affects. With it disabled, the mesh bounding box is stretched to fit the primitive bounding box. With "Keep Scale" enabled, only the longest axis is stretched to fit and the other two are sized to keep the mesh proportions. So the mesh bounding box ends up smaller than the primitive one on two axis. This can be a minor difference if the mesh is essentially square in ratio.
I hope it's clear now because I'm not sure I can think of any more ways to describe it.. I thot there was only one bounding box, the one that shows when you choose to show the bounding box in the advanced menu. I think that was the confusion. What I don't understand is why only these two sculpts have this problem with the tabs larger than the sculpt, while the others I baked the same way in the same 10 minute baking session have all bounding boxes and tabs conform to the mesh/sculpt. Since keep scale seems to be causing these unexplained problems, it's probably best to not use keep scale and have better resolution any way. I hope you can help me with this other Blender problem that has happened with the sculpts I was trying to learn to texure. My image in the UV image editor is stuck in texture layout using unwrap/project from view. It will not create a new UV image to be able to bake the sculpt.
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
08-30-2009 14:30
From: Layla Honi I think that was the confusion. What I don't understand is why only these two sculpts have this problem with the tabs larger than the sculpt, while the others I baked the same way in the same 10 minute baking session have all bounding boxes and tabs conform to the mesh/sculpt. I can offer you to take a look into your .blend file and check out, what's going on ( my email adress is: [email]gaia.clary@machinimatrix.org[/email] ). It seems that there is no way to find the solution by guessing BTW.. Have you recently looked at /8/c7/336385/1.html#post2538479I started a "reference guide for the baker tool" while you where debating with Domino about what could cause your problem...
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
08-30-2009 14:40
From: Layla Honi I hope you can help me with this other Blender problem that has happened with the sculpts I was trying to learn to texure. My image in the UV image editor is stuck in texture layout using unwrap/project from view. It will not create a new UV image to be able to bake the sculpt. If you want to create a texture for your sculpty, there is one pitfall: If you create a new UV-map in edit mode, the uv-layout gets reset. You better go to Object mode, then create a "new UV Texture". This texture has already the correct UV-mapping. Just texturise and bake. If you want to texturise using images, it was a bit more complicated in the past. We have shown a working process in our video tutorial about texturising with multiple images. Recently i learned some nice alternatives (another texturising tutorial is planned  Last thing: Since i use additional levels of subsurf and possibly other modifiers in the texture creation step, i very often create a copy of my sculpty as my texturing model. There i apply whichever modifiers are needed for my texture, then bake it. The finished texture still can be used on my original sculpt. The benefit is: I did not mess around with the sculpty model and can keep it clean... maybe that helps a bit.
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
08-31-2009 00:09
From: Gaia Clary What would be a good use case for baking multiple objects with keep scale ? I'm not sure there is one. There's a part of me wants to remove "Keep Scale" completely. When it was added the majority of available megaprims were cubes, so it made sense as a shortcut. Now there's a much wider selection of megaprims, using a sculptie bounding box (any mesh with a "sculptie" uv layer with no image assigned to it) as part of a multibake gives far more control. Doing this effectively lets you control the primitive bounding box in Blender. I'll make a decision on removing "Keep Scale" when gui.py in 0.9.x is Windows ready and the baker is converted to use it.
_____________________
Visit http://dominodesigns.info for the latest Primstar info
|
Layla Honi
Registered User
Join date: 1 Nov 2007
Posts: 171
|
09-02-2009 10:19
From: Gaia Clary If you want to create a texture for your sculpty, there is one pitfall: If you create a new UV-map in edit mode, the uv-layout gets reset. You better go to Object mode, then create a "new UV Texture". This texture has already the correct UV-mapping. Just texturise and bake. I need to be able create a new image to be able to bake the sculpt. I do not want to creat a texture at this point. I have already made the texture layout, but have not baked the sculpt map. The sculpt map will not show. Every time I try to create a new image, nothing happens, it is stuck on the texture layout. If I try to bake what's there, it still shows the texture layout and about half the sculpt map together and shows parts of the RGB sculpt map on only those parts of the showing in the texture layout, the rest is all black.
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
09-02-2009 11:52
From: Layla Honi I have already made the texture layout, but have not baked the sculpt map. The sculpt map will not show. Every time I try to create a new image, nothing happens, it is stuck on the texture layout. If I try to bake what's there, it still shows the texture layout and about half the sculpt map together and shows parts of the RGB sculpt map on only those parts of the showing in the texture layout, the rest is all black. common pitfalls: - you can only assign an image to a sculptmap, when you are in edit-mode - When Multires is enabled, you can only assign new images when in lowest Multires-level. - When you have been working with textures, it can easily happen that you unintentionally destroy your UV-map and remapped your sculptmap to the wrong image. But that all are just guesses. As i offered recently, the fastest way would probably be to let us look into your .blend file. You could send it to me, if you like: mail to: [email]gaia.clary@machinimatrix.org[/email] cheers, gaia
|
Layla Honi
Registered User
Join date: 1 Nov 2007
Posts: 171
|
09-03-2009 16:35
From: Gaia Clary As i offered recently, the fastest way would probably be to let us look into your .blend file. You could send it to me, if you like: mail to:
[email]gaia.clary@machinimatrix.org[/email]
cheers, gaia I have been trying to find out how to export one mesh out of many in my scene, but have not been able to see a way to export one mesh as a .blend file. Please let me know how to do this and I will send you some samples.
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
09-03-2009 17:14
From: Layla Honi I have been trying to find out how to export one mesh out of many in my scene, but have not been able to see a way to export one mesh as a .blend file. Please let me know how to do this and I will send you some samples. - create a new .blend file where you want to place your examples. - Open the "File -> Append or Link" (after clicking, a file selection box opens) - in the file selection box navigate to your original .blend file and click on it. - Now you have navigated into the top node of the selected .blend file. - There click on "Object" - Now you can select the object which you want to copy fr0m the displayed list into your new .blend file. - Save your new .blend file and that's it. Gaia
|