Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Blender Sculptie Importer - Attached

BETLOG Hax
Geek
Join date: 22 May 2007
Posts: 91
12-07-2008 07:09
From: JeffCoyote Bates
is there a possibility that one day NURBS Sphere will work in your future version ???

There really isn't a lot of difference between these subsurfaced objects and NURBS.
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-07-2008 08:49
From: JeffCoyote Bates
is there a possibility that one day NURBS Sphere will work in your future version ???

it s so easy to transform a NURBS sphere ( to create a tank or a seat for motorcycle )

i know the possibility with 'add testure 1 , 2 & 3 and set RGB properties & Unwrap , etc ... ' , but i m so boring of that ! if only it could be as easy as 'blender_scripts' By Domino

( I m only dreaming ... it s chrithmas season . i can , no ? )
Maybe this tutorial can make it a bit less boring ;-)

http://blog.machinimatrix.org/2008/08/10/from-nurbs-to-sculptie/

You even can setup a blender template, so that you can create your sculpty from your NURBS even faster... Well, i was just curious to work out an alternative way to create sculpties ... ;-) The process should even be scriptable, but i don't know enough to provide such a script.

And meanwhile i got back to Domino's scripts and i am happy with them ;-)
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
12-07-2008 09:29
Quick nurbs to sculptie conversion:

Go to object mode, hit alt-c and convert to mesh

Go to edit mode, hit "a" key until all is selected then hit "u" and "Reset" the unwrap. Hit "u" again and pick "Follow active (quads)".

Go to uv editor and press "ctrl-p" to pack islands. If needed, scale to fill the uv area.
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-07-2008 11:11
Domino, you are again one step beyond ;-)
Would you mind to comment on the steps ?

1.) Go to object mode, hit alt-c and convert to mesh
2.) Go to edit mode, hit "a" key until all is selected

These two steps are obvious and clearly understandable

3.) then hit "u" and "Reset" the unwrap.

What is the net effect of resetting the UV-map ? what i can see on the UV-map is that i end up with a blue rectangular shape and to all i have learned, all faces of the NURBS are now sitting on top of each other in the UV-map. well, does this have any consequences ?

4.) Hit "u" again and pick "Follow active (quads)".

When i compare your much easier method to what i have described in the machinimatrix tutorial, i can see a significant difference: in the tutorial i needed to unwrap 3 times, and follow active quad twice. furthermore i had to select an arbitrary active quad first. In your approach both steps do not seem necessary, or they are possibly done implicitly ?

And what does "follow active quads" exactly mean ?

5.) Go to uv editor and press "ctrl-p" to pack islands.

What happens here ? What happens, if i don't do it ? Is that equivalent to scale the mesh by hand until it fits into the UV-edit area ? Or is there something different happening ?

6.) If needed, scale to fill the uv area.

Ok, thats obvious again.

thanks for any clearification ;-)
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
12-07-2008 11:49
From: Gaia Clary
Domino, you are again one step beyond ;-)
Would you mind to comment on the steps ?

3.) then hit "u" and "Reset" the unwrap.

What is the net effect of resetting the UV-map ? what i can see on the UV-map is that i end up with a blue rectangular shape and to all i have learned, all faces of the NURBS are now sitting on top of each other in the UV-map. well, does this have any consequences ?

It creates the UV faces and sets them so each face (quad) fills the UV area. This is needed for the next step so that the "followed quad" is nice and square.

From: Gaia Clary
4.) Hit "u" again and pick "Follow active (quads)".

When i compare your much easier method to what i have described in the machinimatrix tutorial, i can see a significant difference: in the tutorial i needed to unwrap 3 times, and follow active quad twice. furthermore i had to select an arbitrary active quad first. In your approach both steps do not seem necessary, or they are possibly done implicitly ?

And what does "follow active quads" exactly mean ?

http://wiki.blender.org/index.php/Scripts/Manual/UV_Calculate/Follow_active_quads

The face selection is done implicitly. The reset did the rest. I forgot to mention, pick "None" for the face area option.

From: Gaia Clary
5.) Go to uv editor and press "ctrl-p" to pack islands.

What happens here ? What happens, if i don't do it ? Is that equivalent to scale the mesh by hand until it fits into the UV-edit area ? Or is there something different happening ?

All UV islands are packed to make maximum use of the UV area. As we've only a single square UV island, we should get it filling the area perfectly for a sculptie. Each face size after the follow quads matches the active face, so without the pack the map is considerably larger than the UV image area.

From: Gaia Clary
6.) If needed, scale to fill the uv area.

Ok, thats obvious again.

I have seen it occasionally give an oblong on part of the map rather than the full square. I'm not sure why it happened, but it's easy to fix.
JeffCoyote Bates
Registered User
Join date: 21 Mar 2007
Posts: 8
12-07-2008 17:02
but i still have a bug :

at this step ( from http://blog.machinimatrix.org/2008/08/10/from-nurbs-to-sculptie/ )
Step 3: Go back to the 3D view,
switch to face select mode,
deselect all vertices,
now right click on one arbitrary face to select it.
Right click again to make it the active face.
Once you performed this activation, select all faces by pressing: a, twice.
Call the UV-unwrapper again, but now select: follow active quads.

when i select follow active quads ( choice NONE in use face area )
i have " ERROR : Active face not selected "

but i follow exactly step by step ,
a bug in my configuration of blender ???
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-07-2008 18:10
From: JeffCoyote Bates
but i still have a bug ... but i follow exactly step by step ,
a bug in my configuration of blender ???
From the discussion from some hours ago, i learned there is a much easier way to unwrap a NURBS. Just follow the steps described in

/8/60/203571/23.html#post2247005

and then "render -> Bake Secnd Life Sculpties" and you are done. The workflow described in the tutorial you mentioned is more complex and if i had known what i learned today, when i created the tutorial, i would have used this much easier process ;-)
Domino, thanks again for this insight!
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-07-2008 18:17
From: JeffCoyote Bates
when i select follow active quads ( choice NONE in use face area )
i have " ERROR : Active face not selected "
oh, i forgot to answer this: You probably do not have selected your face as active face. You can see, that it is active, when it is filled with a grid of tiny white dots. You select the active face best by switching to face select mode, deselecting all faces, then right click on one face, and right click on the same face again. blender now should render the tiny white grid on the face. If you do not see this white grid, you have no active face.

But you can avoid all this hussle if you switch to the much easier process, Domino introduced some hours ago.
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-10-2008 01:27
Is it feasible to create an API to the Sculptie scripts, so that they can be called from another script like this:

render_sculptie.create(doFill, doNorm, doExpand, singleObject, defaultSculptieType)
render_sculptie.create(doFill, doNorm, doExpand, objectList, defaultSculptieType)

Creating these API's shouldn't be a big deal for the currently released scripts.
Having these API's at hand, it would be possible to create add ons to your development and nicely integrate them with your work.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
12-10-2008 02:33
From: Gaia Clary
Is it feasible to create an API to the Sculptie scripts, so that they can be called from another script like this:

render_sculptie.create(doFill, doNorm, doExpand, singleObject, defaultSculptieType)
render_sculptie.create(doFill, doNorm, doExpand, objectList, defaultSculptieType)

Creating these API's shouldn't be a big deal for the currently released scripts.
Having these API's at hand, it would be possible to create add ons to your development and nicely integrate them with your work.


The scripts were designed to allow that, you need to read the source to see what the API calls are, but they are there..
Quade Kidd
Registered User
Join date: 18 Jul 2007
Posts: 3
Not writing files
12-15-2008 19:26
I have installed the scripts and the import and export options are there, but when I export to the directory (lsl and tga) and file name, nothing is written into the directory. What am I doing wrong?
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
12-16-2008 01:59
From: Quade Kidd
What am I doing wrong?


Check the console for any error messages. It won't export arbitrary meshes, just ones already setup as sculpties. You need to select the ones to export too.
LovedWarrior Quan
Registered User
Join date: 15 Aug 2008
Posts: 2
please help
12-17-2008 13:48
Can someone help me with the render_sculptie script? I am trying to make sculpties for sl and all the other scripts show up in my blender except the render bake sl sculltie one. No matter where I put the script it does not show up under my render tab.

What should I do???

Thanks
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-17-2008 14:50
From: LovedWarrior Quan
Can someone help me with the render_sculptie script? I am trying to make sculpties for sl and all the other scripts show up in my blender except the render bake sl sculltie one. No matter where I put the script it does not show up under my render tab.

What should I do???

Thanks
Follow this tutorial (especially in the last minute it tells you how to setup a reliable script folder)

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

BTW if you have trouble to understand the spoken word, the transcription can be found at the bottom of the tutorial page.
Ajay Fromund
Registered User
Join date: 12 Nov 2008
Posts: 1
.py Export and Import Scripts
12-19-2008 10:07
hello,

i am working on the Mac OSX platform 10.4.3

i have found the .py files i am supposed to get into the /scripts section of blender, however i can not navigate to this particular spot through my finder. the download of blender is almost of a floating program within the operating system. the only way i can access the /scripts folder is actually with blender using view files. i can see where they need to go but i can not get them there.....can anybody help me?

ajay
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-19-2008 11:36
How can i reliably find out, which sculpty image belongs to which Mesh object when i am working with multiple Sculpties in one .blend file ? erm.. i often loose this association.

Domino, is there a way to find this association somewhere inside blender ?

And i would also like to associate an image of my choice to the sculptie map. For instance when i want to rebake a sculptie, but do not want to loose the previous sculptie image i would like to create a new image and rebake my active object to that image...
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
12-19-2008 13:26
From: Gaia Clary
How can i reliably find out, which sculpty image belongs to which Mesh object when i am working with multiple Sculpties in one .blend file ?

Domino, is there a way to find this association somewhere inside blender ?


It's the image assigned to the "sculptie" uv layer. Just change it as you would any other image.
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-19-2008 16:28
From: Domino Marama
It's the image assigned to the "sculptie" uv layer. Just change it as you would any other image.
arghhh... Stupid /me . It has to be done in edit mode !!! So obvious, so easy ... So overlookable
Drifter Dreamscape
Registered User
Join date: 30 Mar 2008
Posts: 182
12-19-2008 18:01
Stop getting technical you guys!
I have to read these threads from the start every time to try and keep up! lol
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
RC-scripts: Exception thrown for flat sculpties
12-28-2008 03:50
The RC throws an exception when baking fresh Sculptie planes:

- I add a new sculptie mesh
- then bake immediately the sculptie.

This works for all mesh types except plane.

Plane type sculpties throw a divide by zero exception. I was curious enough to follow the exception message and digged in the sources. I found the problem and a workaround.

The problem is, that for fresh planes the z-dimension is ZERO, hence the scaling is infinite, hence the division by ZERO exception. I double checked by sculpting the plane in the z-direction. Now bake works again. Then i created another sculptie type 1 and scaled down one axis to zero (e.g.: s z 0) Again the bake throws a divide by zero exception.

My workaround is simple. Look at render_sculptie.py around line 530:

= original (indentation sucked up by forum renderer ) =================
if scaleRGB:
sf = ( scale.r / 255.0, scale.g / 255.0, scale.b / 255.0 )
else:
sf = ( 1.0, 1.0, 1.0 )

sculptimage.properties['scale_x'] = scale.x / (( bb[1][0] - bb[0][0] ) * sf[0])
sculptimage.properties['scale_y'] = scale.y / (( bb[1][1] - bb[0][1] ) * sf[1])
sculptimage.properties['scale_z'] = scale.z / (( bb[1][2] - bb[0][2] ) * sf[2])

= end ==================================================

The exception is thrown as soon as i scale one dimension of the sculptie down to zero. This is my workaround:

= patch =================================================
if scaleRGB:
sf = ( scale.r / 255.0, scale.g / 255.0, scale.b / 255.0 )
else:
sf = ( 1.0, 1.0, 1.0 )

if bb[1][0] - bb[0][0] != 0:
sculptimage.properties['scale_x'] = scale.x / (( bb[1][0] - bb[0][0] ) * sf[0])
else:
sculptimage.properties['scale_x'] = scale.x / sf[0]

if bb[1][1] - bb[0][1] != 0:
sculptimage.properties['scale_y'] = scale.y / (( bb[1][1] - bb[0][1] ) * sf[1])
else:
sculptimage.properties['scale_y'] = scale.y / sf[1]

if bb[1][2] - bb[0][2] != 0:
sculptimage.properties['scale_z'] = scale.z / (( bb[1][2] - bb[0][2] ) * sf[2])
else:
sculptimage.properties['scale_z'] = scale.z / sf[2]
= end ==================================================

Domino, i am not sure about the else case. And i don't know the implications of my workaround. I am sure, you will find a better solution ;-)
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
enhancement request: Name setting during sculpt-map creation
12-28-2008 04:03
When creating a new sculptie, its name (and also its sculpt-map name) is extrapolated from the mesh type. When i later want to do a consistent renaming, i must rename the object, the mesh and the sculpt map independently...

It would be great to have a text input field in the add -> Mesh -> Sculpt mesh Gui, which is preset by the default name...

If this input field where available, i could give a reasonable name to my object on creation time and later i can find my sculpt_map without any problems and renaming hussle...

What do you think ?
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
12-28-2008 04:41
From: Gaia Clary
The RC throws an exception when baking fresh Sculptie planes:

- I add a new sculptie mesh
- then bake immediately the sculptie.

This works for all mesh types except plane.

Plane type sculpties throw a divide by zero exception. I was curious enough to follow the exception message and digged in the sources. I found the problem and a workaround.
--->8---
Domino, i am not sure about the else case. And i don't know the implications of my workaround. I am sure, you will find a better solution ;-)


I'd already fixed this in the git repository. The change hasn't been moved to the rc scripts bundle yet as I've merged my linkset branch into the master and haven't finished testing and coding it.

Basically your change was right, the only thing I did differently was using try: except: instead of testing for a zero dimension.

From: Gaia Clary
When creating a new sculptie, its name (and also its sculpt-map name) is extrapolated from the mesh type. When i later want to do a consistent renaming, i must rename the object, the mesh and the sculpt map independently...

It would be great to have a text input field in the add -> Mesh -> Sculpt mesh Gui, which is preset by the default name...


I'm really not happy with the way naming works at the moment, I merged the linkset branch early (before it was finished) as the export_lsl script is the main problem area with names and it made sense to have the latest code base before fixing the name issues once and for all. Having a name input when creating a sculptie does make sense so I'll add it when I work on this next.
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
12-29-2008 11:00
Hi, Domino;

While working with the RC scripts some more "nice to have features" came into my mind:

1.) When importing i sometimes like to have similar options as i do have when i create a sculptie from scratch (subdivision level, use subsurf). for instance, when i import a 32*32 UV-map and i tell, that i want 2 subdivision levels and "subsurf off", then i get an 8*8 face sculptie with 3 levels of Multires. Is something like that usefull and practical ?

2.) When creating a new sculptie with multires, i sometimes want to define the type of subdivision algorythm beforehand.

Is there any chance to see something alike soon ?

btw: thank you for your patience and thank you for answering all these questions! From all i have ever seen, this thread has got by far the fastest turn around time and by far the most precise answers in any aspect ;-) Thank you Domino!!!
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
12-29-2008 12:47
From: Gaia Clary
Hi, Domino;

While working with the RC scripts some more "nice to have features" came into my mind:

1.) When importing i sometimes like to have similar options as i do have when i create a sculptie from scratch (subdivision level, use subsurf). for instance, when i import a 32*32 UV-map and i tell, that i want 2 subdivision levels and "subsurf off", then i get an 8*8 face sculptie with 3 levels of Multires. Is something like that usefull and practical ?


Subsurf isn't that useful on an import as basically it would be skipping the higher LODs baked into the map. The import should automatically calculate how many faces and LODs can be shown for that ratio size ( 3 for a 64 x 64 image) and have those as multires levels.

Any changes desired should be done by editing in Blender. eg if you wanted subsurf instead, then apply level 1 multires and add a subsurf modifier. About the only option I can think would be useful is to import as triangles instead of quads and that's already on my todo list :)

Remember you can always create a new sculptie with the specifications you want, then use Mesh - Scripts - Up date from Sculptie to set the vertex positions to an existing sculptie map.

From: Gaia Clary
2.) When creating a new sculptie with multires, i sometimes want to define the type of subdivision algorythm beforehand.


The subdivision algorithm type is only used when adding new multires levels so it isn't actually used by my scripts. They add the levels then set all vertex positions mathematically, so changing it would have no effect. Subsurf is the way to go if you really want the simple subdivision type (with a bake and reimport to get multires).

From: Gaia Clary
btw: thank you for your patience and thank you for answering all these questions! From all i have ever seen, this thread has got by far the fastest turn around time and by far the most precise answers in any aspect ;-) Thank you Domino!!!


You're welcome. I appreciate my users asking questions nearly as much as I appreciate donations ;) It lets me know how they are using the scripts and helps focus my development on what will aid them the most.

/me is beginning to get awfully tired of having to reread his posts looking for sql keywords that trigger that stupid filter. "Up date" grrrr
Mathis Zabelin
Registered User
Join date: 29 May 2008
Posts: 22
12-29-2008 15:19
Hello,

What is the use of Color range adjustment, please ?

Thank you
1 ... 19 20 21 22 23 24 25 26 27 ... 36