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
02-09-2008 15:49
From: whyroc Slade
Congrats Domino!

;)


Thanks :) This has been holding me up a bit on the Blender scripts so at least I can get them moving again now. As might been seen by yet another release (v0.17) of the svn import scripts:

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

It's now grown from 1 script to 5 !!

The additional 4 are wrappers for menu options in Add - Mesh.. You can now add new multires sculpties directly from that menu :)

All the sculpties are scaled to 1.0 x 1.0 x 1.0 when created except plane which has a height of 0.0 (for hopefully obvious reasons) and the torus. Torus has an additional option to select a radius. This is equivalent to the Hole Size Y setting on SL standard torus prims. I set the mesh height to match the radius, so when you create a torus sculpty with radius 0.25 you get 1.0 x 1.0 x 0.25 with a hole in the middle measuring 0.5

The import and create don't automatically assign the sculptie map to the UV faces anymore. This is to leave that free for texturing, the next version of the bake script will bake straight to file. Until then you need to go to multires level 1 and create a new 64 x 64 image or select an existing one, then go to multires level 3 to bake.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-10-2008 15:03
From: Domino Marama
the next version of the bake script will bake straight to file.


Ok, I lied.. I've updated the bake script and this hasn't been implemented yet. Maybe next time :p

The changes to the bake script are a complete rewrite of the actual bake routine. As I'm sure a few of you remember, I've been saying I needed to rewrite that for awhile. The new version is more accurate and faster and the script is over 150 lines shorter now :)

As it's not dependant on having a SVN version of Blender I thought it was worth releasing before I match it's features to the SVN import script, so here you go:

http://dominodesigns.info/downloads/second_life/render_sculptie.zip
Yrrek Gran
Crackpot Inventor
Join date: 20 Oct 2006
Posts: 209
02-11-2008 08:07
Domino,

I am getting an empty zip file when I download this link:

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

:)
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-11-2008 10:43
From: Yrrek Gran
Domino,

I am getting an empty zip file when I download this link:

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

:)


Wondered why I wasn't getting much feedback!

Should be ok now :)
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-12-2008 11:03
http://dominodesigns.info/downloads/second_life/import_sculptie_svn.zip

I've merged the 4 Add-Mesh-Sculptie*** options into a single Add-Mesh-Sculpt Mesh which now has a dialog to select the sculpt type, the number of X and Y faces and the level of multires. Each multires level doubles the number of faces so the default 8 X, 8 Y and 2 Multires gives a standard sculptie. If you want a sculptie without multires then use 32 X, 32 Y, 0 multires.

You can also use any other values and still get the square UV map for a sculptie, though any settings that give more than 32 faces in either direction will lose detail when baked to a sculptie ( though are still useful for Blender's sculpt mode and texturing ).

Smaller values can be used to get different starting shapes, A fast way to get a cube is to use 4X, 4Y, 0 multires. move the poles down to make a cube shape, bake and save the sculptie map. Import that map and you have a 3 level multires cube ;)

The generated base sculpties have been altered to have the main X seam at -ve X to match SL's forward direction rather than -ve Y which matched Blenders front view.

This version of the scripts needs a recent SVN build of Blender http://www.graphicall.org/builds/index.php
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
02-12-2008 11:42
This is getting interesting!.. I need a little help understanding how to use this from a high level, can you please tell me if these assumptions about your workflow are correct?

1.import sculptie with script.. this is based on a sculpt map template .tga, for each primitive type

2.move to the high level of multires, edit objects.. using sculpt, mesh tools etc

3.drop down levels of multires, and check, align vertices

4.move to top level of multires.. bake sculpted prim with script

5.texture/bake at a higher level of multires maybe??

Thanks for your awesome efforts on this..

-whyroc
_____________________
Sculpt Maps Galore - 100's of full perm sculpt maps. Top quality sculpts - low prices.
http://slurl.com/secondlife/Poecila/50/54/92
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-12-2008 13:46
From: whyroc Slade
This is getting interesting!.. I need a little help understanding how to use this from a high level, can you please tell me if these assumptions about your workflow are correct?


I've basically tried to make the tools as flexible as possible, so the workflow really depends on the particular sculptie. For the majority it would start with Add - Mesh - Sculpt Mesh with an appropriate type and no other changes. These are generated mathematically, so there's no templates needed for the basic types.

From: whyroc Slade
1.import sculptie with script.. this is based on a sculpt map template .tga, for each primitive type


This is to allow non standard mesh topologies to be converted to sculpties and for importing sculpties made in other applications. Typically I'd use it after UV mapping an existing model to a square and baking that. Say I wanted a triangular column, I could use Add - Mesh - Sculpt Mesh with Cylinder 3 X, 1 Y, 0 multires, bake that, save and import. Cleaning up the result from that is far quicker than trying to push verts around to get 3 flat sides :)

From: whyroc Slade
2.move to the high level of multires, edit objects.. using sculpt, mesh tools etc


I tend to do an exaggerated version at the lowest multires level, then move up adding detail as I go. Working at the highest means you don't have to exaggerate, but working low to high lets you get the LOD right from the start. At the lower levels it's a little like working with a nurbs cage, the actual mesh doesn't follow exactly but curves inside the points. It'll update when you switch levels.

From: whyroc Slade
3.drop down levels of multires, and check, align vertices


I tend to jump between multires levels while working, I prefer to check as I go, particularly if I'm using sculpt mode in Blender.

From: whyroc Slade
4.move to top level of multires.. bake sculpted prim with script


If it's an organic form I'll add an extra multires layer and bake the sculptie map on that, otherwise I use layer 3.

From: whyroc Slade
5.texture/bake at a higher level of multires maybe??


Yeah maybe :) Again it would depend on the sculptie and also the texturing. If I'm using a displacement map then definately a few levels higher. I'll also set some or all the faces to smooth for a texture bake.

From: whyroc Slade
Thanks for your awesome efforts on this..


And thank you for learning how to use this stuff and spreading the knowledge. Musta saved me having to answer a whole bunch of questions ;)

Added video:

http://dominodesigns.info/downloads/tutorials/blender/wierd.avi

Which is a very quick demo of making this useless sculptie: http://dominodesigns.info/downloads/tutorials/blender/wierd.tga

I'm sure you can put the technique to better use ;)
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
02-13-2008 07:19
I am trying a build from the site you mentionned in your post..

I place the .py files in the appropriate directory, and see the scripts on the add mesh dialog and can add the primitive no problem.

Now the problem I have is that the 'UV Face select mode' is gone.. and although there appears to be a uv map for the object I cannot access it.. tried at all level s of multires.

It could be the builds I tried.. not sure.

A kick in the right direction would be appreciated :)

-whyroc
_____________________
Sculpt Maps Galore - 100's of full perm sculpt maps. Top quality sculpts - low prices.
http://slurl.com/secondlife/Poecila/50/54/92
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-13-2008 07:40
From: whyroc Slade
Now the problem I have is that the 'UV Face select mode' is gone.. and although there appears to be a uv map for the object I cannot access it.. tried at all level s of multires.


Yeah it is gone in the SVN version, you just use the edit mode window now and any full faces you select will show up in the UV Image Editor window. So A key to select all is generally all you need when working with these sculpties :)

Just remember to assign an image you have to do it at multires level 1, otherwise it won't stick :)
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
02-13-2008 07:56
From: Domino Marama
Yeah it is gone in the SVN version, you just use the edit mode window now and any full faces you select will show up in the UV Image Editor window. So A key to select all is generally all you need when working with these sculpties :)

Just remember to assign an image you have to do it at multires level 1, otherwise it won't stick :)



Yes.. Got it! thanks.
_____________________
Sculpt Maps Galore - 100's of full perm sculpt maps. Top quality sculpts - low prices.
http://slurl.com/secondlife/Poecila/50/54/92
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-13-2008 08:16
From: whyroc Slade
Yes.. Got it! thanks.


:) You can find out what else has changed here: http://www.blender.org/development/current-projects/changes-since-244/
Caylord Theas
Registered User
Join date: 15 Aug 2007
Posts: 24
02-13-2008 10:24
Domino.

I think i got the basic workings of these scripts from a video someone posted a few pages back in this thread. But here is a question from a beginners point of view.

When you say "start with the basic types" are you saying that no matter what your scupltie eventually will look like after you move around faces and verts that you MUST start off with one of the blender or Second Life basic primative types. Such as Sphere,Cube,Cone, Torus e.t.c?

I know it may seem and obvious point but it had mystified me since I first heard of sculpted primatives.
Aminom Marvin
Registered User
Join date: 31 Dec 2006
Posts: 520
02-13-2008 10:35
I'd just like to say thanks. Domino's importer and exporter are exactly what I need, and the extra features they have are musts! :D I've been able to do all the stuff I did before quicker, and some things that would have been impossible.

The fact that the best import/exporter is also for a free, OS software ap is also very nice :)
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-13-2008 10:39
From: Caylord Theas
When you say "start with the basic types" are you saying that no matter what your scupltie eventually will look like after you move around faces and verts that you MUST start off with one of the blender or Second Life basic primative types. Such as Sphere,Cube,Cone, Torus e.t.c?


From a beginner's point of view YES start with one of the standard types. These match the SL sculptie types vertex for vertex so are far and away the easiest way to make sculpties. The Blender standard types don't have the correct UV mapping, so either one of my starter sculpties or the latest scripts are the best bet.

Once you get the basics down, then it's not strictly necessary to use one of those, but you do have to be able to map the object to a square UV map. So you'll need a good grasp of marking seams and the various other UV unwrapping techniques if you start with anything other than one of the SL style primitives.
Caylord Theas
Registered User
Join date: 15 Aug 2007
Posts: 24
02-13-2008 10:54
From: Domino Marama
From a beginner's point of view YES start with one of the standard types. These match the SL sculptie types vertex for vertex so are far and away the easiest way to make sculpties. The Blender standard types don't have the correct UV mapping, so either one of my starter sculpties or the latest scripts are the best bet.

Once you get the basics down, then it's not strictly necessary to use one of those, but you do have to be able to map the object to a square UV map. So you'll need a good grasp of marking seams and the various other UV unwrapping techniques if you start with anything other than one of the SL style primitives.



Oh I have been using blender sinc 2000. So I know how to use the UV window. Well sort of. I just wondered was it absolutely necessary to start with one of the basic SL mesh types. I have a few things that I have already made that I would like to turn into sculpties and upload to SL. But it would be a trial if I had to remake them all from a basic mesh again.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-13-2008 14:27
From: Caylord Theas
Oh I have been using blender sinc 2000. So I know how to use the UV window. Well sort of. I just wondered was it absolutely necessary to start with one of the basic SL mesh types. I have a few things that I have already made that I would like to turn into sculpties and upload to SL. But it would be a trial if I had to remake them all from a basic mesh again.


In all honesty to get a quality sculptie, it's probably easier and faster to remake them. I've been experimenting a LOT with Suzanne trying to make a sculptie I'm happy with. I've a stubborn streak a mile wide that is forcing me to respect her history and use the original mesh. I can get pretty close but every attempt so far needs some cleaning up of the sculptie, the ears are the main problem area as it's tough to get enough verts there just using unwrapping techniques.

I've even tried using the Bake Selected to Active feature with the material style method of making sculpties and a roughly edited sculptie to act as a base. But getting a good UV unwrap seems like the best method. I've attached a screenshot of my work in progress, as you can tell from the number of pinned vertice (the red ones), there's a lot of manual tweaking gone into this and I'm still not 100% happy with the result.

Because the workflow is tweak, bake, save, import, repeat until happy, it takes far longer than just remodelling would. There you just start with a known good UV map and model until you are happy. Job done.

I really want to figure out this one mesh so her sculptie can host the import scripts when I add linked set support to the Blender scripts, but based on how long it takes I'd seriously advise anyone else to remodel. Though if you are happy enough to get a rough sculptie and clean that up rather than modelling from scratch, that's a pretty viable option.

It might go something like this:

1) EAC unwrap the model
2) Move points at edge of unwrap to make a perfect square outline
3) select all points on UV map and press ctrl v - wait until points mostly stop moving
4) bake the sculptie map & save
5) import sculptie
6) tidy up the sculptie
7) bake and save
Solaesta Kilian
Registered User
Join date: 26 Apr 2005
Posts: 16
02-14-2008 08:39
I'm confused, sorry if this has been answered already.

So I imported a sculpt map and started working with it. Didn't do anything with multires. Now it is as I want it. I understand I have to create an image for it to bake to? In UV Image Editor or something? What do I do before I can use Render->Bake Second Life Sculpties?

Edit:
Hmm, well I got it to bake something, but it is identical to the unaltered sculpt map -- it is the scuplt map for a sphere.
Caylord Theas
Registered User
Join date: 15 Aug 2007
Posts: 24
02-14-2008 10:24
From: Solaesta Kilian
I'm confused, sorry if this has been answered already.

So I imported a sculpt map and started working with it. Didn't do anything with multires. Now it is as I want it. I understand I have to create an image for it to bake to? In UV Image Editor or something? What do I do before I can use Render->Bake Second Life Sculpties?

Edit:
Hmm, well I got it to bake something, but it is identical to the unaltered sculpt map -- it is the scuplt map for a sphere.


Domino this post emphasizes something that I think about your excellent script. It could use and comprehensive tutorial. I never did understand it from reading the post on this thread, until I found a post that had a video tutorial. Just a thought.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-14-2008 12:11
From: Solaesta Kilian
I'm confused, sorry if this has been answered already.

So I imported a sculpt map and started working with it. Didn't do anything with multires. Now it is as I want it. I understand I have to create an image for it to bake to? In UV Image Editor or something? What do I do before I can use Render->Bake Second Life Sculpties?

Edit:
Hmm, well I got it to bake something, but it is identical to the unaltered sculpt map -- it is the scuplt map for a sphere.


Which version of the scripts are you using?

Basically if you have a multires sculptie, you need to create and assign a 64 x 64 image to the faces on the lowest multires level. You do the bake at the highest level. For imported sculpties, both the version for released and SVN Blender now assign the imported sculptie map, so you should just be able to bake and save it under a new name. I realised that the bake to file option was better done as a new export script so reinstated the old behaviour on the latest SVN scripts.

Caylord, the videos are the quickest way to learn about the scripts. While they are under development I don't see a lot of point doing an indepth tutorial as there's a fair chance it will be out dated (like the EAC video, I'd have now done 3 different versions if I'd tried to keep it current as the script changed). While some parts are getting towards their final state, others still need a lot of work. Eventually the Bake option will be for advanced sculptie creation only (it has a few tricks like supporting a bounding box for off centre scuplties), there will be a one click export to SL option which will be the normal method.

Plus the scripts are pretty flexible and I think it's more like a book than a tutorial that's needed. A book I do plan on writing, gotta have something to sell to cover the development costs ;)

But even so I do try to make sure people can use the scripts, the videos and the posts in this thread contain a wealth of information, and I'll answer any questions I can.
Caylord Theas
Registered User
Join date: 15 Aug 2007
Posts: 24
02-14-2008 13:00
Thanks Domino. Please expect several more questions that might seem obvious to you on this very nice script. :D
Solaesta Kilian
Registered User
Join date: 26 Apr 2005
Posts: 16
02-16-2008 05:44
Today I decided to start over from scratch using Add->Mesh->Sculpt Mesh. I left the options as they were (sphere, 8, 8, 2) ... but it gave a script error:

Compiled with Python version 2.5.
Checking for installed Python... got it!
Traceback (most recent call last):
File "<string>", line 33, in <module>
File "<string>", line 29, in main
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\import_sculptie.py", line 217, in new_sculptie
mesh.addMultiresLevel( multires )
AttributeError: 'Blender Mesh' object has no attribute 'addMultiresLevel'
Traceback (most recent call last):
File "<string>", line 33, in <module>
File "<string>", line 29, in main
File "C:\Program Files\Blender Foundation\Blender\.blender\scripts\import_sculptie.py", line 217, in new_sculptie
mesh.addMultiresLevel( multires )
AttributeError: 'Blender Mesh' object has no attribute 'addMultiresLevel'

I have gotten it to create a sphere before in the exact same way, so I don't know why it gave an error this time.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-16-2008 06:08
From: Solaesta Kilian
AttributeError: 'Blender Mesh' object has no attribute 'addMultiresLevel'

I have gotten it to create a sphere before in the exact same way, so I don't know why it gave an error this time.


Well, you were either using a different version of Blender or perhaps had multires at 0. That part of the error message would only come up if the version of Blender you are using didn't have my patch applied to add that feature. Any builds off the SVN trunk for the past week or so should work fine.
Raz Welles
Registered User
Join date: 18 Jun 2007
Posts: 49
02-19-2008 12:16
Sorry if I'm not reading close enough ^^;; Do the current SVN Trunk precompiled binaries support the multires now, or do we still need to apply the patch? If so, is there a page where we can learn to apply patches? =)
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-19-2008 12:39
From: Raz Welles
Do the current SVN Trunk precompiled binaries support the multires now,


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 :)
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
02-21-2008 06:02
http://dominodesigns.info/downloads/second_life/import_sculptie_svn.zip

Bake Sculpties script (render_sculptie.py) updated to 0.10, mostly code tidying but fixes bug on baking plane type sculpties where the last row could end up slightly offset.

The bake script should work with released Blender, the import and add mesh still require a SVN build and are unchanged in this release.
1 ... 3 4 5 6 7 8 9 10 11 ... 36