Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Blender Sculptie Importer - Attached

Raz Welles
Registered User
Join date: 18 Jun 2007
Posts: 49
02-21-2008 09:59
From: Domino Marama
Yes they do. I just got the patch merged in time as trunk is now at blencon 3 which means no more features will be added as they move towards a 2.46 release. So any of the latest binary builds from graphicall.org will work or just compile trunk and it will work :)

Ahhh sweet, thanks!
Caylord Theas
Registered User
Join date: 15 Aug 2007
Posts: 24
02-22-2008 10:26
Domingo:

This is just a thought. Have you considered moving this script and any documentation and the forum to its own web site? I know there would be some cost involved such as domain name(if you wanted to do that) and hosting(but you can get free hosting just about anywhere these days)
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-22-2008 11:16
From: Caylord Theas
Domingo:


Domino looks around.. Sees no-one else vaguely resembling that name.. Thinks 'must mean me'

From: Caylord Theas
This is just a thought. Have you considered moving this script and any documentation and the forum to its own web site? I know there would be some cost involved such as domain name(if you wanted to do that) and hosting(but you can get free hosting just about anywhere these days)


Yeah. The main downloads are actually from my server, they are as an attachment here too for convenience. When there's a site to go with the downloads I'll probably remove the attachment.

Real life has been a little crazy here the past few months and I'm behind on pretty much everything. I've not even got my computers properly setup at the moment due to the reorganization that had to happen. Setting up the site properly is on my todo list, just not high on it at the moment.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-28-2008 15:37
http://dominodesigns.info/downloads/second_life/import_sculptie_svn.zip

Ok, switching to multires level 1 to create the image to bake the map to was starting to annoy me. So I've updated the bake script to 0.11 and it now creates a new image automatically if the mesh doesn't have one assigned.

Also added to this release is a readme.txt which explains things a little ;)
Abraham Attenborough
Registered User
Join date: 4 Feb 2007
Posts: 96
02-29-2008 13:38
Awesome idea like all of your work, but i get an error Message in Blender 2.45 with Python 2.5:

ptie.py". line 217, in new_sculptie
mesh.addMultiresLevel<multires>
Attribue Error: "Blender mesh" object has no attribute 'addMultiresLevel"

*edit: btw it comes when i started with shift->add->mesh->xculpt
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-29-2008 13:43
From: Abraham Attenborough
Awesome idea like all of your work, but i get an error Message in Blender 2.45 with Python 2.5:

ptie.py". line 217, in new_sculptie
mesh.addMultiresLevel<multires>
Attribue Error: "Blender mesh" object has no attribute 'addMultiresLevel"


The _svn.zip package only works with versions of Blender built from the current SVN trunk. (though bake should still work on 2.44+). For import and the add mesh you need one of the builds from http://www.graphicall.org
Abraham Attenborough
Registered User
Join date: 4 Feb 2007
Posts: 96
02-29-2008 13:50
From: Domino Marama
The _svn.zip package only works with versions of Blender built from the current SVN trunk. (though bake should still work on 2.44+). For import and the add mesh you need one of the builds from http://www.graphicall.org


ahh ok , didnt know that.
thx
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-29-2008 14:08
From: Abraham Attenborough
ahh ok , didnt know that.
thx


Multires is way too handy for seeing LODs to ignore, that's why I wrote the Blender patch to enable it from Python scripts :)

Though as Blender doesn't check the minor version (245.14) (hence why script fails rather than telling you to update), you could actually use the add mesh script by setting multires to 0. It won't hit the line causing the error then. The import definately needs a SVN build though as it always does multires. Hmmm... maybe I should check the subversion in the script and make it work either way...

But there's a lot of other cool things in the SVN builds (which should become Blender 2.46 in April or May) so I'd recommend grabbing one anyway. The approximate AO is a great timesaver and generally looks better than the raytraced one too.

Edit: Done the update so the _svn.zip should now work on 2.45 or later but with reduced functionality if you don't have an svn build. See how long before someone complains they don't get multires on an import like the readme says they should ;)
Feynt Mistral
Registered User
Join date: 24 Sep 2005
Posts: 551
02-29-2008 23:44
Domino, is there a way to export a sculptie without it distorting to fill the size of a cube? For instance I made a vertical column that is suppose to be thin, but when I import it into SL it takes up a full 0.5m^3 (but is fairly cylindrical). I ask because I'd like to do some work with mega prims, but if the stuff I export keeps growing wider than I expect I'll never be able to get some of the pieces big enough.
_____________________
I dream of a better tomorrow in SL!
You should too. Visit, vote, voice opinions.
Support CSG! Tell LL how much it would mean to subtract one prim from another!
Prim Animation! Stop by and say something about it, show your support!
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
03-01-2008 01:40
From: Feynt Mistral
Domino, is there a way to export a sculptie without it distorting to fill the size of a cube? For instance I made a vertical column that is suppose to be thin, but when I import it into SL it takes up a full 0.5m^3 (but is fairly cylindrical). I ask because I'd like to do some work with mega prims, but if the stuff I export keeps growing wider than I expect I'll never be able to get some of the pieces big enough.


Yes it is possible. If you have multiple objects selected, the ranges are calculated across all of them. So if you scale a sculptie sphere to 10 x 10 x 10, and your sculptie is 1 x 1 x 1, select both before doing the render, your sculptie will be calculated using 10 x 10 x 10 as the range. There's a special sculptie type for this, if you go to the Logic panel (F4) and set LL_SCULPT_TYPE to 0 on the sphere, then it will still count in the range calculation but will be skipped during the bake.

Because this method reduces the color range used on a particular sculptie, it reduces the number of vertice positions available. In this example it would only use 1/10th of the range so only 25 or 26 distinct vertice positions per direction would be used.

You can also use this for offsetting sculpties, So if the sphere was -3 to +3 on x, and your sculptie was 0.0 to +3.0 it would have it's centre down one edge, handy for doors ;)

Remember to set the object centre after modelling as the local co-ordinates are used by the sculptie baker.
Feynt Mistral
Registered User
Join date: 24 Sep 2005
Posts: 551
03-01-2008 08:16
From: Domino Marama

Because this method reduces the color range used on a particular sculptie, it reduces the number of vertice positions available. In this example it would only use 1/10th of the range so only 25 or 26 distinct vertice positions per direction would be used.

So if I were to make branches from a cylinder sculpt, they'd have less detail at the ends? Is it possible to use another shape besides a sphere and the sphere render?
From: Domino Marama

Remember to set the object centre after modelling as the local co-ordinates are used by the sculptie baker.

I'm not sure how to do that, but I'll look through the blender sites. Something should tell me. >;)

Addendum:
As a 3ds max user, the camera rolling as well as pitch and yaw (the latter being all I need) while I move it is annoying the hell out of me. Is there a way to keep its roll value from changing? Thanks.

Also, I seem to be able to bake the textures on multiple objects at once as you prescribed, but the texture isn't showing up in the UV image window, and I don't notice it being exported to a file anywhere. There's no errors in the console, so am I missing something? If it helps, for some reason re-baking from Render->Bake Sculpties doesn't update the texture shown on the objects in texture mode, as it did initially render both a cylinder and my cylinder based work, but I baked conventionally (silly me) once as a test to see what would happen, and now that the outside cylinder is whiteish, no amount of re-baking will make it rainbow hued again.
_____________________
I dream of a better tomorrow in SL!
You should too. Visit, vote, voice opinions.
Support CSG! Tell LL how much it would mean to subtract one prim from another!
Prim Animation! Stop by and say something about it, show your support!
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
03-01-2008 10:21
From: Feynt Mistral
So if I were to make branches from a cylinder sculpt, they'd have less detail at the ends? Is it possible to use another shape besides a sphere and the sphere render?


Each direction has 256 discreet steps, so if you don't use the full colour range, it decreases how many different positions are available for your vertice. This is the same for all sculpt types. With sculpt type set to 0, that sculptie essentially becomes a bounding box. The actual shape doesn't matter, just the min and max values in each direction.

To set the centre, use Centre New or Centre Cursor in object mode.

From: Feynt Mistral
As a 3ds max user, the camera rolling as well as pitch and yaw (the latter being all I need) while I move it is annoying the hell out of me. Is there a way to keep its roll value from changing? Thanks.


In user preferences under View & Controls, you can choose between Trackball and Turntable modes, and set to rotate around selection rather than viewpoint.

From: Feynt Mistral
Also, I seem to be able to bake the textures on multiple objects at once as you prescribed, but the texture isn't showing up in the UV image window, and I don't notice it being exported to a file anywhere. There's no errors in the console, so am I missing something? If it helps, for some reason re-baking from Render->Bake Sculpties doesn't update the texture shown on the objects in texture mode, as it did initially render both a cylinder and my cylinder based work, but I baked conventionally (silly me) once as a test to see what would happen, and now that the outside cylinder is whiteish, no amount of re-baking will make it rainbow hued again.


By default, the view is set to shaded, not textured so check that if it stays white. You can select the particular texture shown by going to multires level 0 in edit mode, select all faces. In UV Image Editor the current texture will now be shown, to change it use the combo box to pick a texture or add a new high resolution texture if you are going to be baking materials rather than the scupt map. You can also use the combo box just to select and show/save a texture with no objects selected.
Feynt Mistral
Registered User
Join date: 24 Sep 2005
Posts: 551
03-01-2008 11:05
From: Domino Marama
Each direction has 256 discreet steps, so if you don't use the full colour range, it decreases how many different positions are available for your vertice. This is the same for all sculpt types. With sculpt type set to 0, that sculptie essentially becomes a bounding box. The actual shape doesn't matter, just the min and max values in each direction.

Ah, ok, I was setting the sculpt type wrong. >;)
I get the programmatic aspect of sculpted prims, were I more endowed with OpenGL knowledge I might try to improve upon the system thanks to the client's open source nature, but what I had thought you meant was that the vertex complexity of the sculptie would somehow degrade producing a worse looking object, rather than limiting the distance within which the vertices can move. Since I plan on not resizing the prims, as long as they show up as the sizes I want with (almost) the same quality as is seen in Blender, I'm happy.
From: Domino Marama

In user preferences under View & Controls, you can choose between Trackball and Turntable modes, and set to rotate around selection rather than viewpoint.

My sanity is saved! I honestly can't see a use for the other camera movement style unless you're doing animation.
From: Domino Marama

By default, the view is set to shaded, not textured so check that if it stays white. You can select the particular texture shown by going to multires level 0 in edit mode, select all faces. In UV Image Editor the current texture will now be shown, to change it use the combo box to pick a texture or add a new high resolution texture if you are going to be baking materials rather than the scupt map. You can also use the combo box just to select and show/save a texture with no objects selected.

Yes the view was set to textured, and my sculpted prim still had its rainbow hue. I should clarify though that I had used a template cylinder made by whyroc to do my work well before I decided to suck it up and go for an SVN build and use your most recent scripts. I'm happy to report it wasn't hard to give the model the cylinder status assigned to your meshes.

I've been trying, after reloading the scene, to do this again, but every time I bake it seems to ignore the sphere entirely and just render the sculpted prim despite having both selected in object mode (sphere selected last, if that matters). I do realize that the objective is not to render the sphere, and that since it has no sculpt type your renderer will not produce a texture for it, but it seems like it's being completely ignored even for scaling issues. The sphere is resized such that it completely encases the sculpted prim, though just barely (by a margin of 0.01) on its widest points. I wasn't aware that the UV map didn't display in the UV image window unless you completely selected an object in edit mode (kind of an oversight I would say), but the sculpt map produced will still create the squashed, stretched out form from before rather than the svelte shape I want.

Addendum:
If you're interested, you can download the scene I'm using from http://feynt.kicks-ass.net/Branch%20Base2.blend
The model is on layer 2.
_____________________
I dream of a better tomorrow in SL!
You should too. Visit, vote, voice opinions.
Support CSG! Tell LL how much it would mean to subtract one prim from another!
Prim Animation! Stop by and say something about it, show your support!
Abraham Attenborough
Registered User
Join date: 4 Feb 2007
Posts: 96
03-01-2008 13:01
From: Domino Marama
The _svn.zip package only works with versions of Blender built from the current SVN trunk. (though bake should still work on 2.44+). For import and the add mesh you need one of the builds from http://www.graphicall.org


wow, that link is hammering my small brain. i am a user of blender 6 years now but got no clue about coding etc..
can you give me a direct link? which one i should give a try?
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
03-01-2008 14:47
From: Abraham Attenborough
wow, that link is hammering my small brain. i am a user of blender 6 years now but got no clue about coding etc..
can you give me a direct link? which one i should give a try?


http://www.graphicall.org/builds/builds/showbuild.php?action=show&id=560

Should be fine with that..
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
03-01-2008 15:32
From: Feynt Mistral
Ah, ok, I was setting the sculpt type wrong. >;)


The branch should have LL_SCULPT_TYPE as 4 for a cylinder, the sphere should be set to 0 for None.

From: Feynt Mistral
The sphere is resized such that it completely encases the sculpted prim, though just barely (by a margin of 0.01) on its widest points.


On the branch you have done some scaling in object mode. You need to apply this as the sculptie calculations are done from the mesh sizes, not the object sizes. This is so the scale can be applied on imported sculpties without affecting the base mesh. It also mirrors the way the scaling in SL will work. As mega prims have a fixed size, we need to force the script to put the scale into the sculptie map. If you just want to use the maximum size but keep your sculpties proportions, you'd set the DimX, DimY and DimZ of the sphere to the largest of the sculpties dimensions (2.442 in this case). All scale values for both objects should be 1.0 at this point.

You then select both objects and do the Bake Second Life Sculpties. This should create a new 64 x 64 image named after the object. You should be able to select it in the UV Image Editor and save.
Vaelissa Cortes
Avatar Picture Here
Join date: 26 Apr 2007
Posts: 39
03-02-2008 15:56
Hi again! I'm just wondering if there has been any progress for an effective way to get a sculpt map for sculpts that depend on collapsed vertices without the need to alter it in a photo editing program. Blender is great, but I find I have to use Wings3D for those types of sculpts as Blender doesn't bake them well. I believe it was due to interpolation between points or something along those lines.

Wings is powerful and all, but the dependency on menus is very, very counter productive and makes me want to pull my hair out and go back to Blender, which I find much more pleasant to use.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
03-03-2008 01:20
From: Vaelissa Cortes
Hi again! I'm just wondering if there has been any progress for an effective way to get a sculpt map for sculpts that depend on collapsed vertices without the need to alter it in a photo editing program. Blender is great, but I find I have to use Wings3D for those types of sculpts as Blender doesn't bake them well. I believe it was due to interpolation between points or something along those lines.


I tightened the tolerance on my triangle fill routine as some pixels were being filled twice from both sides of an edge. This could give the slight inaccuracies that messed up collapsed vertice. So since the fill routine rewrite it should work fine :)
Vaelissa Cortes
Avatar Picture Here
Join date: 26 Apr 2007
Posts: 39
03-03-2008 21:05
It's improved, but still not quite right, I've done quite a bit of tests and can show/send you the results if you like :) (blend file, a dozen or so image maps and related sculpts in SL). It may or may not be helpful. Great work so far either way though!
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
03-04-2008 00:25
From: Vaelissa Cortes
It's improved, but still not quite right, I've done quite a bit of tests and can show/send you the results if you like :) (blend file, a dozen or so image maps and related sculpts in SL). It may or may not be helpful. Great work so far either way though!


I did a few tests and it worked for me, but I didn't do much as I prefer my sculpties to be LOD resistant and this technique eats too many vertice to do that.

Sending me a blend that demonstrates the issue is the best way. I'd send you my email when I'm inworld later today. Unless you've one you don't mind going public which you can attach here.

Update: I've had a look at Vaelissa's blend file and there were a couple of things. The base mesh wasn't a generated one but an old school UV sphere based one. This isn't a problem with my scripts but you do need to pay extra attention to the UV map to get perfect results.

With a square grid layout like this, the easiest way to do this is to create a 32 x 32 image and enable "Snap to Pixels" in the UV menu. Then select all UV points ( A key ), grab them ( G key ) don't move the mouse but just press left mouse button to commit the change. This will ensure all the UV points are correctly aligned on the grid. You can then create the 64 x 64 image for the actual bake.

This also resolves another problem which I think is a Blender bug. Sometimes faces that should be baked stay black. If this happens then grabbing and clicking the affected UV points back into position resolves the problem.

The other issue with the test blend was that there were only 15 vertical faces. This was off-setting the bake positions on the UV map (also corrected by the snap to pixels) so the actual sculptie vertice were coming from mid face rather than from the modelled positions.

It's best to stick to multiple of 2 for the faces, 8, 16, 32 as these align correctly without much fuss :)
Feynt Mistral
Registered User
Join date: 24 Sep 2005
Posts: 551
03-08-2008 16:18
Thanks Domino. It took some gentle massaging (read: beating my head against the monitor and lots of swearing) but I managed to finally get it to give me a sculpt map I wanted. >D
_____________________
I dream of a better tomorrow in SL!
You should too. Visit, vote, voice opinions.
Support CSG! Tell LL how much it would mean to subtract one prim from another!
Prim Animation! Stop by and say something about it, show your support!
Cel Edman
Registered User
Join date: 24 May 2007
Posts: 42
03-11-2008 00:15
I wrote a sculptmap to .obj saver yesterday-night, and added into sculptypaint 092 thats been released a few hours ago.
I tried to save the .obj file like how sl renders sculpties from a 64*64 texture; plane: 33*33 / torus 32*32 / cylinder: 33*32 / sphere 33*32 and added also the correct texture layout into the .obj file
I tested all the results in blender, and manage to texturepaint the model the moment after I imported the .obj file. Although I want to experiment more in blender on texturepainting, and possible texture baking.

I must say I'm not an expert in blender yet, and still wondering if I gotta rebake the whole uv map again, texturelayout or not. In the .obj file I didnt include the normals for every face this time, not sure if they are needed/usefull in blender.

Not sure if its helpfull to the blender community, just wanted to let you know.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
03-11-2008 02:57
From: Cel Edman
I wrote a sculptmap to .obj saver yesterday-night, and added into sculptypaint 092 thats been released a few hours ago.
I tried to save the .obj file like how sl renders sculpties from a 64*64 texture; plane: 33*33 / torus 32*32 / cylinder: 33*32 / sphere 33*32 and added also the correct texture layout into the .obj file
I tested all the results in blender, and manage to texturepaint the model the moment after I imported the .obj file. Although I want to experiment more in blender on texturepainting, and possible texture baking.

I must say I'm not an expert in blender yet, and still wondering if I gotta rebake the whole uv map again, texturelayout or not. In the .obj file I didnt include the normals for every face this time, not sure if they are needed/usefull in blender.

Not sure if its helpfull to the blender community, just wanted to let you know.


As sculptie maps can be imported directly into Blender with my scripts there's no real need to go via obj files. Blender does support obj on both import and export though, so maybe having obj as a standard interchange for programs that don't directly support sculpties is a useful feature.

I'm not sure of the context of your questions about rebaking the UV map, do you mean for the sculptie map or for textures? Generally texture painting is something you would do on a seperate image, which could be added into one of the texture slots on the material, or used in the node editor for mixing multiple materials. If you are baking a material then painting over it, a rebake would lose the edits.
Zeenith Paulse
Registered User
Join date: 18 Feb 2008
Posts: 97
03-12-2008 03:28
Hi. I'm trying to export a crystal into SL but when I run the script, it just says to pick a shape like a sphere or something and everyone I pick it gives me an error message that sdays the script can't do it.

The crystal is the closest to a cilander shape but that shape didn't work. Actually, the UVmap of it folds out pretty nicely by itself, but I'm also having texture problems when making the texture myself and that's wahy I wanna use these scripts... but I still can't figure out what's wrong. What shape do I use for this. It's an oblong shape.

What do I have to set it to to run the script correctly? Thanks.

-Zee-
_____________________
My second life photos.
http://s229.photobucket.com/albums/ee136/Dreamcube017/Second%20Life/?action=view&current=78111448.pbw

Please comment. :)
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
03-12-2008 09:13
From: Zeenith Paulse
Hi. I'm trying to export a crystal into SL but when I run the script, it just says to pick a shape like a sphere or something and everyone I pick it gives me an error message that says the script can't do it.


There will be a detailed error message on the console. If you post that I should be able to help. Though I'm just doing final tests on the next versions before uploading those, so you might want to hang on for the update ;)
1 ... 4 5 6 7 8 9 10 11 12 ... 36