Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Blender Sculptie Importer - Attached

Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
12-29-2008 15:57
From: Mathis Zabelin
What is the use of Color range adjustment, please ?


It's an alternative method to get the same results as using a sizing sphere, keep scale and keep center.

Normally each vertex can be in one of 256 different positions (per direction) due to the colour range of a sculptie map. By changing the range you can reduce the number of positions available. I used this when I did my folding screen


http://dominodesigns.info/images/second_life/adverts/Folding_screen.jpg

The one thats folds to the center was baked with the default settings. By setting the red and green ranges to 0 to 127 I baked a version whose center is at the back right hand corner, so the screen folds to the right and can be flush with a wall. For the left hand version its red 128 to 255 and green 0 to 127.
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-29-2008 16:58
With the RC scripts i found something:

- i create a fresh sculpty .
- i move the object center to some place outside of the sphere, for instance by clicking:

Object -> Transform -> Center Cursor

- i bake the sculptie. Now something unexpected happens:

the object jumps away from its current position. At the end the object gets aligned with its center as if i had clicked

Object -> Transform -> ObData to Center

But neither the object nor the object center keep their previous positions,
so i have to search the sculptie on the canvas ... Fortunately CTRL-z brings the object back into its previous place, so it doesn't hurt too much.

The problem does not occur, when the Object center is where it "belongs" (in the center of the object). So the only workaround for me is to ensure, that all object centers are in place before i do the bake.

Is this behaviour intentional or is this a bug ?
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
12-30-2008 01:25
From: Gaia Clary
With the RC scripts i found something:

- i create a fresh sculpty .
- i move the object center to some place outside of the sphere, for instance by clicking:

Object -> Transform -> Center Cursor

- i bake the sculptie. Now something unexpected happens:

the object jumps away from its current position.

Is this behaviour intentional or is this a bug ?


It's a bug. One that's been driving me crazy. Due to all the different factors that can affect the scale range (keep center, keep scale, number of selected sculpties, rgb range etc) it's a tough one to fix. I've tried a few times to fix it and just end up moving the problem to a different combination of options..

I think I need to move the recentering and scaling code out of the main bake loop, do one pass to update them, then another to recalculate the scale range and do the bake.
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-30-2008 16:51
Hi, Domino;

I have something else to report, but this is vague, i don't know how to reproduce that:

When baking, i occasionaly get a script error, stating something like "rgb value or alpha out of range".

The problem occurs in drawVLine() and it is caused by negative numbers in
sr, sg, or sb. It smells a bit like a rounding issue, but i don't know how i can trigger the
problem...

I could cure the immediate problem by adding this to the beginning of the function drawVLine:

def drawVLine( image, x, s, e, sr, sg, sb, er, eg, eb ):

if sr < 0:
sr = 0
if sg < 0:
sg = 0
if sb < 0:
sb = 0
if sr > 1.0:
sr = 1.0
if sg > 1.0:
sg = 1.0
if sb > 1.0:
sb = 1.0

I don't see any bake errors. But since i don't know what i am doing here, i better report it to you ;-) I do have a .blend file, which shows the error, so maybe you are interested in getting that file for further debugging ? Then let me know.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
12-31-2008 01:09
From: Gaia Clary
I don't see any bake errors. But since i don't know what i am doing here, i better report it to you ;-) I do have a .blend file, which shows the error, so maybe you are interested in getting that file for further debugging ? Then let me know.


Is this with the RC scripts bundle or a git checkout? And yes a blend file that shows the problem would be appreciated.
Zi Breen
Registered User
Join date: 25 Aug 2008
Posts: 3
Script folder in blender
01-03-2009 20:47
Hi,

Can't find the script folder in my Blender folder. Can anyone tell me where it might be?
Thanks
NOFREE Romano
Registered User
Join date: 22 May 2008
Posts: 3
01-05-2009 15:26
after creating a mesh plane of 4x64 faces, i went to render menu to bake it and i got the following error at console:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\blender-2.48a-windows\.blender\scripts\render_sculptie.py", line 703,
in <module>
main()
File "C:\blender-2.48a-windows\.blender\scripts\render_sculptie.py", line 668,
in main
sculptie_map = updateSculptieMap( ob , meshscale, doFill.val, not doScale.va
l, doExpand.val, doCentre.val, doClear.val )
File "C:\blender-2.48a-windows\.blender\scripts\render_sculptie.py", line 534,
in updateSculptieMap
sculptimage.properties['scale_z'] = scale.z / (( bb[1][2] - bb[0][2] ) * sf[
2])
ZeroDivisionError: float division

some idea?
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
01-05-2009 15:48
From: NOFREE Romano
after creating a mesh plane of 4x64 faces, i went to render menu to bake it and i got the following error at console:

ZeroDivisionError: float division

some idea?


It's a known problem that is fixed in the git repository (not yet in rc). Move a vert by as little as 0.00001 so the plane isn't quite flat and the bake will work.
Rhys Goode
Registered User
Join date: 29 Jan 2007
Posts: 32
01-08-2009 03:16
I thought I was making good progress learning to use Blender, but now I am not so sure.

I worked with the default torus mesh from Domino's scripts. I fiddled with the vertices to morph it into a cylinder. Exported as a sculptie. Cleared out Blender and imported the sculpt map, it looked fine, no noticeable changes.

Then I uploaded into SL, applied it to a prim, and voila - failure! One end of the cylinder is closed off on the prim, even though the hole is open, clean ,and even in Blender. :(

Am I trying to do something unnatural? Any hints would be much appreciated.

Speaking of unnatural, I tried to attach the .tga file, but that is not allowed. After converting to .jpg, there is a little distortion but the same basic artifact: Makes an (almost) fine hollow cylinder if I import into Blender, makes a capped cylinder in SL.

Thanks in advance for any guidance.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
01-08-2009 03:53
From: Rhys Goode
Then I uploaded into SL, applied it to a prim, and voila - failure! One end of the cylinder is closed off on the prim, even though the hole is open, clean ,and even in Blender. :(


Did you change the sculpt type in SL? The default is sphere type, you'd need to change it to planar or cylinder to keep the ends open.
Carbon Philter
Registered User
Join date: 4 Apr 2008
Posts: 165
01-08-2009 04:05
From: Domino Marama
Did you change the sculpt type in SL? The default is sphere type, you'd need to change it to planar or cylinder to keep the ends open.


Out of interest, what is the underlying impact of changing the stitching type in SL edit? Is there a hidden significance? I've tried swapping them on an imported sculpty to see what happens and can't really see much difference.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
01-08-2009 04:20
From: Carbon Philter
Out of interest, what is the underlying impact of changing the stitching type in SL edit? Is there a hidden significance? I've tried swapping them on an imported sculpty to see what happens and can't really see much difference.


Nice name :D

The difference is in how the edges of the sculpt map are read. A planar sculptie has a unique pixel for every vertex. With side wrapping (sphere, cylinder and torus) the last column is read from the same pixels as the first column (column 0). With top wrapping (torus) the top row is read from the same pixels as the bottom row. And with end capping (sphere) the bottom row is read from one pixel (row 0, width / 2) and the top row is read from one pixel (top row, width / 2).
Carbon Philter
Registered User
Join date: 4 Apr 2008
Posts: 165
01-08-2009 04:40
From: Domino Marama
Nice name :D

The difference is in how the edges of the sculpt map are read. A planar sculptie has a unique pixel for every vertex. With side wrapping (sphere, cylinder and torus) the last column is read from the same pixels as the first column (column 0). With top wrapping (torus) the top row is read from the same pixels as the bottom row. And with end capping (sphere) the bottom row is read from one pixel (row 0, width / 2) and the top row is read from one pixel (top row, width / 2).


Thanks and thanks but............................. Waaaaaaaaaaaaaaah, head hurts! :D

I think I understand about the reading of map vertices to generate a closed or open object, but in layman's terms, does changing it have a serious impact on the appearance of the item - is LOD affected or similar?
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
01-08-2009 05:01
From: Carbon Philter
I think I understand about the reading of map vertices to generate a closed or open object, but in layman's terms, does changing it have a serious impact on the appearance of the item - is LOD affected or similar?


It doesn't affect LOD as all the types have LODs of 32 x 32 faces, 16 x 16 faces, 8 x 8 faces and 6 x 6 faces on a 64 x 64 sculpt map. It can have a serious effect on the appearance though so you generally want to use the same type as it was modeled with.

If we simplify to a plane with 2 x 2 faces with vertices at -0.5, 0.0 and 0.5

Then if you set that to a cylinder type, the vertices become -0.5, 0.0 and -0.5

Effectively it's now only showing half the sculptie, the other half was lost in the wrap.

On a real sculptie at the lowest LOD of 6 x 6, this would be 1/6th of the sculptie that was lost, or 1/32nd at the highest LOD. So getting the mapping wrong can make a significant difference to the intended look.
Carbon Philter
Registered User
Join date: 4 Apr 2008
Posts: 165
01-08-2009 05:52
OK, Domino. Thanks for putting it in words I can understand.

The test I did didn't show much obvious difference but I get the importance and will ensure I carry over the stitching type from the original model - your sculpty scripts do that automatically in any case so it's only when/if I progress to raw sculptyism without use of your invaluable aids that it may become a factor.
Rhys Goode
Registered User
Join date: 29 Jan 2007
Posts: 32
01-08-2009 14:16
From: Domino Marama
Did you change the sculpt type in SL? The default is sphere type, you'd need to change it to planar or cylinder to keep the ends open.


No, I did not, and changing to torus (matching the grid I used in Blender) fixed my problem.

I made a sculptie!!!!

Thanks a bunch!
Bloodsong Termagant
Manic Artist
Join date: 22 Jan 2007
Posts: 615
01-25-2009 10:49
heyas;

sphere stitching pinches the ends into single points (whether you spread your endpoints out or not in your model).

cylinder stitching welds the side vertices, but does not close the ends. (if you closed the ends of your model, they will still appear closed.)

planar stitching has NO welding. both ends and the side seam will be unwelded.

torus stitching welds the side seam closed, and then attempts to weld the top seam to the bottom seam. if the seams are at opposite ends of your model, this is gonna look REALLY crappy.


for my money, the cylindrical is best.


meanwhile, domino, i have stupid blender question #1 over here... which buttons are pressed in the sculptie baker, and which aren't? i thought 'fill holes' and 'normalize' were the default settings, but 'fill holes' is a raised button and 'normalize' is a depressed button (and so is compressible). plus, when i 'raise' normalize, i get a duller sculpty map, which seems to indicate the script is not 'puffing' the model up.

either that, or i'm reading the 'normalize' option description wrong. it looks like activating normalize inflates the sculpty to maximum proportions for the greatest detail. does 'normalize' actually mean 'make it its normal proportions'???

gah!
_____________________
Why Johnny Can't Rotate:
http://forums.secondlife.com/showthread.php?t=94705
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
01-25-2009 11:40
From: Bloodsong Termagant
#1 over here... which buttons are pressed in the sculptie baker, and which aren't? i thought 'fill holes' and 'normalize' were the default settings, but 'fill holes' is a raised button and 'normalize' is a depressed button (and so is compressible). plus, when i 'raise' normalize, i get a duller sculpty map, which seems to indicate the script is not 'puffing' the model up.

either that, or i'm reading the 'normalize' option description wrong. it looks like activating normalize inflates the sculpty to maximum proportions for the greatest detail. does 'normalize' actually mean 'make it its normal proportions'???

Let me try to answer this:

1.) Fill Holes:

try to automatically fill the sculptmap with reasonable values at places, where otherwise the map would become black (because no UV-data is available). This sort of problem should never happen when you start with a sculptie-mesh from the beginning, but when you try to bake a sculptie from your own mesh/UV creation.

Since this option is normally not necessary with the standard sculpties, it is deselected by default.

2.) Normalise:

Each object has got a "bounding box" The sizes of the x,y and z dimensions are typically different from each other. On the other hand the sculptie-map maps the RGB colors to xyz color coded coordinates. where each color is in the range [-128...127] and maps to the range [-0.5 ... 0.5] spanning up a perfect cube with an edge length of 1 meter
In order to get the most acurate results (aka use the full color range), the blender objects get scaled to the same dimension on each axis, thus the sculptie bounding box is "normalized" to a perfect cubic bounding box before mapping to the sculpt-map. Then after importing to SL you always can readjust the dimensions with the object editor.

Since normalize is the way to keep the best possible acuracy, this option is enabled by default. You might want to disable normalize, when you are working with multiple connected sculpties. In that case normalising will make your life realy complicated, when you try to readjust your sculptie collection in SL. In such cases remove the normalize option and get correctly sized represenations of your mesh in world with less resolution. You can think of creating one big cubic bounding box which encloses all selected objects. Then translate all coordinates inside the boundingbox to sculptie coordinates [-128...127] thus loosing resolution but preserving dimensions of the parts, which makes fitting them back in place much easier.

3.) Compressible:
Make the sculptmap better suited for image compression and later acurate decompression.
As far as i know, it means, that the intrinsic acuracy of the sculptmap is not destroyed when the sculptmap get s coimpressed/decompressed during the upload process.

For a detailed explanation see /327/15/256767/1.html#post1973741/327/15/256767/1.html#post1973741


So in short: The default settings are correct in almost any case. Derive from the standard only in special cases.
BETLOG Hax
Geek
Join date: 22 May 2007
Posts: 91
01-25-2009 18:21
From: Bloodsong Termagant
does 'normalize' actually mean 'make it its normal proportions'???

If I may:
Normalize means all three directions (XYZ/RGB) are render-scaled to 1:1:1 / 256:256:256
This gives the maximum detail (0 to 255) from the available gradients of Red, Green and Blue. It also means your sculptie will be effectively cubical when imported to sl, and you then need to scale it appropriately.
IMO normalized is the best way to work. Exporting slulpts at their original ratios results in sometimes severe loss of detail, and the LSL generated scripts do all the inworld work for you anyway.

That said, sometimes you WILL need to use a sculptie thats not normalized. Classic case is to fit one to a megaprim thats not quite the right size for what you want. Or to make a specific size microprim.
Mathis Zabelin
Registered User
Join date: 29 May 2008
Posts: 22
02-04-2009 08:13
Hello,

Is development version still available ? I always an error with git...

Thank you
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
02-04-2009 10:26
From: Mathis Zabelin
Hello,

Is development version still available ? I always an error with git...

Thank you
I dont know about git, but from what i know, you always can get the last development version from here:

http://dominodesigns.info/downloads/second_life/blender_scripts_rc.zip

It seems to be from 1-dec-2008. Maybe that's a bit too old already ?
Gus Twine
Registered User
Join date: 25 May 2008
Posts: 2
no file i blender called script to put sculpties scripts in.
02-04-2009 16:35
I have no location in Blender to put the downloaded script file in like the following:



C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\.blender\scripts

The dircections not clear.
Gus Twine
Registered User
Join date: 25 May 2008
Posts: 2
no file i blender called script to put sculpties scripts in.
02-04-2009 16:46
I have no location in Blender to put the downloaded script file in like the following:



C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\.blender\scripts

The dircections not clear.
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
02-04-2009 17:03
Very common problem with the windows installer, during the installation of Blender from about 2.46 onwards you get a choice of where you want to store user data files.. choose the middle option to store in same folder as executable. If you choose the default location the folder will be in your Roaming data folder in vista for example.. not usually a very convenient location.

-w

BTW.. has anyone checked out Domino's inworld group .. Area 55?? nudge wink:)
_____________________
Sculpt Maps Galore - 100's of full perm sculpt maps. Top quality sculpts - low prices.
http://slurl.com/secondlife/Poecila/50/54/92
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
02-04-2009 17:38
From: whyroc Slade
Very common problem with the windows installer, during the installation of Blender from about 2.46 onwards you get a choice of where you want to store user data files.. choose the middle option to store in same folder as executable. If you choose the default location the folder will be in your Roaming data folder in vista for example.. not usually a very convenient location.
A convenient way to install blender has been shown in our video tutorial, which is also available from Domino's website.
look at

http://blog.machinimatrix.org/2008/07/12/the-blender-installation-guide/

Everything is explained here and although we have shown the windows installer, the way, how we configure the scripts-directory works for all operating systems. Watch the last 2 minutes of the video and you aint have any more problems with script installations ;-)

good luck, Gus ;-)
1 ... 20 21 22 23 24 25 26 27 28 ... 36