Blender Sculptie Importer - Attached
|
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
|
06-23-2008 01:14
From: Domino Marama Not yet. This will be what the next script adds feature wise. I think the initial versions will use my own builder format. Paying work is taking priority at the moment but I hope to make time for it soon. I dropped some code into the render_sculpty script to get it to output to a file.. On Vista, I had to run Blender as administrator for it to work. http://www.in2orbit.net/secondlife/render_sculptie_printfile.zipRun the scripts as normally, look in c: for a file called 'Blender_sculpties.txt' it will get appended each time you bake with the script. XP - should work as is Linux - Mac not tested will need to change the hard coded directory string. -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
|
06-23-2008 05:19
From: whyroc Slade I dropped some code into the render_sculpty script to get it to output to a file.. Umm.. ok.. Why not just run blender from a command prompt like this: C:\Program Files\Blender Foundation\Blender\blender > c:\output.txt
|
Jaguar Aya
Registered User
Join date: 7 Sep 2007
Posts: 1
|
Doh!
06-23-2008 13:27
Domino, first off - thanks for the effort of putting this together, and then sharing it, and then having the grace and the patience to answer questions on it.
Feelling dummer than a sack of hammers at the moment though. Downloaded your scripts and dumped them in the script library.
Import works a treat.
Add new mesh generates this error: [0Error: [Errno 2] No such file or directory: 'C:\\Program Files\\Blender Foundation\\Blender\\.blender\\scripts\x07dd_mesh_scultp_mesh.py'
which is true - I can't find this file either. Same for torus and for empty mesh.
Render - Bake Second Life Sculpties, generates a similar error:
[0Error: [Errno 2] No such file or directory: 'C:\\Program Files\\Blender Foundation\\Blender\\.blender\\scripts\render_sculptie.py'
This file does exist in the script directory, but then there is the wierd problem of the double \\ which has me stumped.
Any clues?
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
06-23-2008 16:52
From: Jaguar Aya Domino, first off - thanks for the effort of putting this together, and then sharing it, and then having the grace and the patience to answer questions on it.
Feelling dummer than a sack of hammers at the moment though. Downloaded your scripts and dumped them in the script library.
Import works a treat.
Add new mesh generates this error: [0Error: [Errno 2] No such file or directory: 'C:\\Program Files\\Blender Foundation\\Blender\\.blender\\scripts\x07dd_mesh_scultp_mesh.py'
which is true - I can't find this file either. Same for torus and for empty mesh.
Render - Bake Second Life Sculpties, generates a similar error:
[0Error: [Errno 2] No such file or directory: 'C:\\Program Files\\Blender Foundation\\Blender\\.blender\\scripts\render_sculptie.py'
This file does exist in the script directory, but then there is the wierd problem of the double \\ which has me stumped.
Any clues? Ignore the \\, that's just an escaped backslash so it isn't treated as a special function in Python. This will work as though it was a single \ What concerns me is the "\x07dd_mesh" part. This should be "add_mesh" so it looks like there is corruption there, which might show a memory problem on your PC. I'd run a full diagnostic on the memory and if it's ok, try reinstalling blender and the scripts.
|
Ryoko Tedeschi
Registered User
Join date: 4 Feb 2008
Posts: 9
|
problem
06-24-2008 13:31
I keep getting a "UV map is outside the image area" error... :/ i have no idea what this means. can someone help? edit: i also keep getting python script errors. :/
|
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
|
06-24-2008 14:00
From: Domino Marama Umm.. ok.. Why not just run blender from a command prompt like this:
C:\Program Files\Blender Foundation\Blender\blender > c:\output.txt Yes that works  I felt the python file IO way might be more flexible.. -w
_____________________
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
|
06-24-2008 16:54
From: Ryoko Tedeschi I keep getting a "UV map is outside the image area" error... :/ i have no idea what this means. can someone help? edit: i also keep getting python script errors. :/ Something alike happened to me some time ago and a clean reinstall helped. I was told, that either my blender was not installed correctly, or i had a broken python installation. In my case i think the problem was, that i tried to install python separately. I must have created a big mess then. So i got all this reinstalled and it works like a charm since then. I use blender 2.46 and Windows-XP, and now no separate python installation 
|
Ryoko Tedeschi
Registered User
Join date: 4 Feb 2008
Posts: 9
|
06-24-2008 17:12
From: Gaia Clary Something alike happened to me some time ago and a clean reinstall helped. I was told, that either my blender was not installed correctly, or i had a broken python installation. In my case i think the problem was, that i tried to install python separately. I must have created a big mess then. So i got all this reinstalled and it works like a charm since then. I use blender 2.46 and Windows-XP, and now no separate python installation  i dont even have this "python" thing installed... ? unless it comes with the blender install, i dont have it. also, i'm running vista. could that be causing problems?
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
06-24-2008 17:17
If you had not python installed beforehand, then blender will come with its own version of it and things should be fine. On my system, when starting up, blender also creates a secondary window, a console? There it reports behind the scenes information. In my installation it says in the first 2 lines:
Compiled with Python version 2.5. Checking for installed Python... got it!
Maybe you find something different in that window, which could help you to find out, what goes on ?
|
Ryoko Tedeschi
Registered User
Join date: 4 Feb 2008
Posts: 9
|
06-24-2008 17:25
From: Gaia Clary If you had not python installed beforehand, then blender will come with its own version of it and things should be fine. On my system, when starting up, blender also creates a secondary window, a console? There it reports behind the scenes information. In my installation it says in the first 2 lines:
Compiled with Python version 2.5. Checking for installed Python... got it!
Maybe you find something different in that window, which could help you to find out, what goes on ? Yea, it says no python installed. http://smg.photobucket.com/albums/v280/ryoko0/?action=view¤t=Capture12345646.gif
|
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
|
06-24-2008 17:37
Originally, for certain functionality, one needed to install a separate Python build in order to have "full" access to the Python API. I recall having to suggest this to people during the early releases of Prim.Blender. I do not believe this is the case anymore with Blender 2.45/2.46.
_____________________
---
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
06-24-2008 17:59
I just looked at my computer and found a python 2.51 installation there. Maybe my system was setup with a separate python install then. I thought, they only installed blender... Hmmm. then maybe installing pythion 2.51 and then restarting blender would help. In that case i think, you dont need to reinstall blender. just install python... I found this : http://www.python.org/download/ I hope, that helps you ...
|
Ryoko Tedeschi
Registered User
Join date: 4 Feb 2008
Posts: 9
|
06-24-2008 18:27
From: Gaia Clary I just looked at my computer and found a python 2.51 installation there. Maybe my system was setup with a separate python install then. I thought, they only installed blender... Hmmm. then maybe installing pythion 2.51 and then restarting blender would help. In that case i think, you dont need to reinstall blender. just install python... I found this : http://www.python.org/download/ I hope, that helps you ... Thanks, that helped. I still need a solution for the other problem i had though :/
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
06-24-2008 19:26
Did you reinstall the scripts after you installed python ? That may help. Also, did you try it with a fresh sculpty and get the same errors ?
I guess, that the sculpties, you have created before you got python installed, do not have an embedded UV-texture (Or something else is missing, that relied on having python available during sculptie creation) ...
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
06-25-2008 01:05
From: Ryoko Tedeschi I keep getting a "UV map is outside the image area" error... :/ i have no idea what this means. can someone help? edit: i also keep getting python script errors. :/ The UV map error means you have a problem with the UV Map layout. You should not get this unless you are trying to unwrap your own UV map and don't have all the UV points inside the image area. The UV maps generated when you use Add - Mesh - Sculpt Mesh are correct and should just work. You can check your UV map in the UV image editor by selecting all faces in edit mode. Move any points outside the image area back into it. Check one of the UV maps created by my scripts to see how they should look. Blender comes with a cut down version of Python. This is enough for my scripts, though some addon scripts for Blender need a full Python install. So if all you have added are the sculptie scripts, you can safely ignore the status message about Python not being installed.
|
Ryoko Tedeschi
Registered User
Join date: 4 Feb 2008
Posts: 9
|
06-25-2008 01:45
From: Domino Marama The UV map error means you have a problem with the UV Map layout. You should not get this unless you are trying to unwrap your own UV map and don't have all the UV points inside the image area. The UV maps generated when you use Add - Mesh - Sculpt Mesh are correct and should just work. You can check your UV map in the UV image editor by selecting all faces in edit mode. Move any points outside the image area back into it. Check one of the UV maps created by my scripts to see how they should look. i'm still having trouble with it. on one object i can't even go into edit mode. someone else told me it didn't have any uvs? i have no idea what that means. i tried it with a different sculpt and i could go into edit mode but i can't see it on the uv window when i move it around at all. eh. i'm good at sculpting, but i can't figure /anything/ else out which pretty much renders the talent pointless.
|
Ryoko Tedeschi
Registered User
Join date: 4 Feb 2008
Posts: 9
|
06-25-2008 01:46
From: Gaia Clary Did you reinstall the scripts after you installed python ? That may help. Also, did you try it with a fresh sculpty and get the same errors ?
I guess, that the sculpties, you have created before you got python installed, do not have an embedded UV-texture (Or something else is missing, that relied on having python available during sculptie creation) ... think so, yea. someone else took my file and told me that the uv's were missing. i dont know what that means though.
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
06-25-2008 02:22
From: Ryoko Tedeschi think so, yea. someone else took my file and told me that the uv's were missing. i dont know what that means though. If you create the mesh from scratch, rather than using one from Add - Mesh - Sculpt Mesh, then it will not have a UV Map until you create one. http://wiki.blender.org/index.php/Manual/Unwrapping_a_MeshSculpties need a very particular unwrapping where the final UV Map is an exact square. In pretty much every case for sculpties it is a lot easier to use a starting point that has the correct UV map and not to modify the mesh in a way that would break it. Due to the precision needed on the unwrap to get good results with sculpties, it's very easy to spend as much or more time on the unwrapping as you did on the modelling. Here are two older examples of manually managing the UV map from before I decided it was hard work and created the Add - Mesh - Sculpt Mesh to do it for me. With these, I planned things so it was easy to get a good unwrap. With an abitrary model it is much harder to get a good square UV map. http://dominodesigns.info/downloads/tutorials/blender/steps.swfhttp://dominodesigns.info/downloads/tutorials/blender/wheels_of_time.swfOn the second I didn't finish squaring off the UV map, but it should be obvious where I was going with it. In both cases if you compare the UV map to one from a "Sculpt Mesh", you'll see I was aiming for the same map each time. It's this square grid that you'll need to unwrap your model to. /8/60/203571/5.html#post1734310 has a description of creating a UV map for one model. There's a lot of information on this method in the early pages of this thread ( around pages 5 to 10 ) and you'll see why the scripts do it now from reading them 
|
Ryoko Tedeschi
Registered User
Join date: 4 Feb 2008
Posts: 9
|
weird clipping thing
06-26-2008 10:20
This only started happening after i installed this script. its not causing any real problem per se, but it is a bit irritating if i'm trying to edit the point its clipping out. http://www.youtube.com/watch?v=Z7EyD9dArks
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
06-26-2008 13:31
From: Ryoko Tedeschi This only started happening after i installed this script. I think that must be coincidence. The video looks like the clipping distance on the view has been increased. You can check this in View - View Properties, the one I think is causing the problem is Clip Start - it's default value is 0.1, Clip End's default is 500.0 This would only affect perspective mode, you can switch to Othographic in the View menu or Numpad 5 toggles between them.
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
06-27-2008 02:09
New scripts are available from http://www.dominodesigns.info/downloads/second_life/import_sculptie_svn.zipAll 3 scripts are updated in this release. The add-mesh script change was a minor bug fix and the other two are all about this: From: Domino Marama To keep the sculptie map visible in edit mode, I'd have to assign the sculptie map to the UV faces. Earlier versions of the scripts did that, but I removed it as now the UV faces are available for the texture. This is to pave the way for a fuller export which will bake the sculpties, save them, save the textures and a text file which a builder in Second Life will use to recreate the linkset.
It may be that I'll need to add a second UV map for more advanced texturing options, but assigning the image there still wouldn't guarantee that it would show, it would depend on which UV map you had selected. I do need to add a second UV map for adding support for SL's texture settings, so I've reverted to using UV layers to store the sculptie image name. These scripts will rename this UV layer to "sculptie" for easy reference on new or imported sculpties. You can manually do this step on older sculptie .blend for full compatibility, but the scripts will still bake older files without any renaming. I'll be using the default names for texture maps so anyone working on textures should get into the habit of adding another UV layer (UVTex). If you are using reference UV maps, then these should be renamed so the export routines will know to ignore them. A textured sculptie would have two UV maps: sculptie and UVTex. When the scripts support other prims they will use UVTex for face 0, UVTex.001 for face 1 etc. This means it's now easy to bake to different size sculpt maps again. Just create the size of image you want and assign to all faces (on multires level 1) on the "sculptie" UV map before baking. If there isn't an image setup, then the script creates a 64 x 64 image and assigns it to the "sculptie" UV map. If there is no "sculptie" UV map, then the script uses the active UV layer. If you want the UV Image Editor to display the last baked sculptie in edit mode you can Pin the image (click the little push pin icon next to image select list box) before baking.
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
06-27-2008 09:01
Scripts updated again. There's a new option File - Export - Second Life LSL This will export all selected sculpties to a pair of files: Name.tga and Name.lsl Upload the .tga to SL, rez a box and put the .tga file in it. Open the .lsl file in your local text editor and copy all. Add a new script to the box, select all with ctrl-a then paste with ctrl-v Save the script and it should run and setup the sculptie 
|
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
|
06-27-2008 09:27
Domino! i thought you said you were busy dude... lol
This looks awesome, can't wait to try it out!
-why
_____________________
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
|
06-27-2008 09:34
From: whyroc Slade Domino! i thought you said you were busy dude... lol I am. But if people are going to start hacking on the code, thought I should at least have a basic exporter they could build on  From: whyroc Slade This looks awesome, can't wait to try it out! It's a another step.. Still a long way to go  You can delete the script and tga from the sculptie's contents once the shape is set. I'm undecided whether the script should do this automatically or not.
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
06-28-2008 04:41
Hi; In our recent update of the "texturing sculpties with blender" video, i have shown a possible caveat: When baking the textures, some black triangles appear at the top and the bottom of the texture. See here (within the last 2 minutes of the video): http://blog.machinimatrix.org/2008/05/12/blender-surface-texturesI have tripple checked, that this effect is directly coupled with the mesh layout at the poles: If the poles are squeezed to zero ( s-0 ), then the black triangles appear. After selecting the poles and clicking "smooth" once, the pole vertices are drifted apart from each other, leaving a small hole. The effect is, that now all faces are true quads again and thus the texturing algorythm no more hits divisions by zero, hence it can texturize near the poles again. I checked, that a sculpt-mesh of type "Sphere" is originally created with the pole vertices squeezed together. I propose to create the spherical sculpties with a tiny hole right from the beginning, so that the effect just wont appear, except someone would squeeze the vertices together on purpose... Having this hole has no effect in world, because the in world renderer closes the poles anyways, if they are open. And somehow it gives us 64 more vertices on the sphere, at least in theory...  Domio, what do you think ? Would that be a doable and valuable patch to the scripts ?
|