Blender LSL Export
|
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
|
05-08-2009 15:51
Hello, again!
I know I made a thread on this before, but essentially didn't learn much... that it was wonky, which I already thought to myself. ANYWAY.. I'm trying to work with it, and have had some mixed results, so some more specific questions/comments:
1. More of a comment/bug report for Domino/Gaia, really, but I just switched to the RC scripts recently, and my default scene uses sculpt meshes from the non-RC scripts. I discovered that when I use both those 'old' ones and RC-era sculpt meshes, the old meshes bake maps fine, but the new ones end up pure black. This is only true when using the Second Life LSL Export (Multi-part export with scripting). Normal baking works fine, and if I bake a sculpt map before trying the LSL export, that sculpt map is used. 'Old' sculpt meshes bake fine without pre-baking. If this is a known problem, is there anyway around it?
2. After taking a look at the scripts produced, it seems that the LSL Export only 'truly' supports 2 objects easily. It accounts for situations where the object is either the root prim, or NOT the root prim, but not a specific link number. This means that with 3+ objects, you need to get the object order right, or else they aren't going to line up properly. How does Blender determine which is the root prim, and is there any way to 'set' that? I tried parenting, but when I do, the objects change location when I use the LSL export function.
3. Is there anything that I'm missing that would help me out here? My current method is just sculpt, export LSL, create a linkset in SL, and fill each prim with all the maps involved, then script each prim individually. Anything I'm missing on either end?
_____________________
Tutorials for Sculpties using Blender! Http://www.youtube.com/user/BlenderSL
|
Kornscope Komachi
Transitional human
Join date: 30 Aug 2006
Posts: 1,041
|
05-08-2009 17:15
The way I did it was to finish everything in blender first. Maps, baking, positions etc. Ensure every object has it's own texture and map settings. Name everything so you know what's what.
Run the export lsl. It will take all the pre-baked and mapped textures and just copies them to your specified folder and writes an lsl for each object.
Over on the grid: make a root prim and one for each sculpt/prim needed. Root stays empty without scripts. Everything is positioned according to the root.
Edit each script. I add a touch_start, clean up the code a bit, there may be formatting problems. Place map and texture along with associated script in each prim placed roughly in position. Then I click each prim. My results were perfect.
Good luck.
_____________________
SCOPE Homes, Bangu -----------------------------------------------------------------
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
05-08-2009 17:15
Q1: i think there was a change in the naming convention: in the old version the uvmap name was UVTex, while there was no convention on the texture-UV map. (it was not relevant) in the rc scripts the uvmap name has changed to "sculptie" while the texturemap name is now UVTex. You can find references to these names in the export_lsl.py script. Maybe that helps you to find out where your problem exactly is ? Q2: I think, this is something you have to sort out by hand. As far as i have seen, the script generation is not fully finished. At least i had to do some small modifications to the LSL code before i could get a multi part object positioned and rotated. (And as i mentioned somewhere else i never got it to work right, but i did not put much effort into it until now)... Q3: I am not aware of anything missing, but i am truly not the expert here  Hope that helps a bit, but i am sure, Domino can give a more comprehensive answer 
|
Kornscope Komachi
Transitional human
Join date: 30 Aug 2006
Posts: 1,041
|
05-08-2009 17:23
And BTW... You've done an awesome job with those Blender tutorials. I even learnt a few things. Keep up the good work.
_____________________
SCOPE Homes, Bangu -----------------------------------------------------------------
|
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
|
05-08-2009 18:09
From: Gaia Clary Q1: i think there was a change in the naming convention:
in the old version the uvmap name was UVTex, while there was no convention on the texture-UV map. (it was not relevant)
in the rc scripts the uvmap name has changed to "sculptie" while the texturemap name is now UVTex. You can find references to these names in the export_lsl.py script.
Maybe that helps you to find out where your problem exactly is ?
Actually, both my 'old' sculpt meshes and the new have UV Textures called 'sculptie'. Neither are using UVTex as the name, though that's the default for non-sculpt primitives. I've honestly never noticed a sculpt mesh to use UVTex. However, changing the name of the UV texture of the RC sculpts to UVTex does cause them to work properly. The odd thing is that if I leave the UV texture from the old sculpt mesh alone, still called 'sculptie', they bake fine. It's only an issue with the new meshes, for some reason. From: someone Q2: I think, this is something you have to sort out by hand. As far as i have seen, the script generation is not fully finished. At least i had to do some small modifications to the LSL code before i could get a multi part object positioned and rotated. (And as i mentioned somewhere else i never got it to work right, but i did not put much effort into it until now)...
I do understand the 'not finished' bit. I feel like it should record the link number, and do it based on that, beyond just 'first' or 'other'. However, it still seems that Blender does record 'local' positions based on a specific sculpt. I could be wrong in this, though. If it does, I'd just like to know how I know which one it is working off of, be it the last selected, etc. That would make it usable so that I could at least link it so that the right prim is the root, and the others should work properly based on that. If, however, it decides root differently for each sculpt, then blah. I can still get 2-prim objects to work...perhaps I should just make more complex objects in sections of 2...that could work, actually! Method I'll be testing: 1. Create sculpts 2. Bake sculpt maps 3. Export LSL, in batches of two, keeping one prim in common between each set. 4. Upload sculpt maps, and place in prims. 5. Create linkset, with root prim being the common prim from Blender. 6. Throw the scripts in! I'm thinking this should work, since the scripts account for anything above the root prim. From: someone Q3: I am not aware of anything missing, but i am truly not the expert here  Hope that helps a bit, but i am sure, Domino can give a more comprehensive answer  Thank you for your answers, Gaia ^-^ They've shed a little light on workarounds, at least =P From: Kornscope Komachi And BTW... You've done an awesome job with those Blender tutorials. I even learnt a few things. Keep up the good work. Thank you ^-^ I'm actually trying to figure this out for a new tutorial. I'm personally fine with moving the prims by hand, but if there's a way to get this to work properly, then awesome!
_____________________
Tutorials for Sculpties using Blender! Http://www.youtube.com/user/BlenderSL
|
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
|
05-08-2009 19:01
From: Keira Wells I can still get 2-prim objects to work...perhaps I should just make more complex objects in sections of 2...that could work, actually!
Method I'll be testing: 1. Create sculpts 2. Bake sculpt maps 3. Export LSL, in batches of two, keeping one prim in common between each set. 4. Upload sculpt maps, and place in prims. 5. Create linkset, with root prim being the common prim from Blender. 6. Throw the scripts in!
I'm thinking this should work, since the scripts account for anything above the root prim. Well..the results are in...annnnddd..it works! Kinda. I ended up with this:  The pot should be holding the rest of it, if that isn't obvious. For some reason, that one prim won't script right, and I've no idea why. It was initially the root prim, the commonality between the sets of 2, but when it ended up off to the side I decided to try it as a child prim...and still didn't work. I'm hoping it's an outlier, if not, then it's easy enough to create a root prim that isn't part of the end result, so meh. Anywho, method required for my result: 1.Create Sculpts, and arrange as desired. Make sure to scale them to an appropriate size. 2.Apply scale and rotation to sculpts. (CTRL+A, Scale and Rotation) Also, 'center new'. 3. Bake and save Sculpt Maps. 4. Export LSL, in batches of two, keeping a common prim in each set. 5. Create linkset in SL of the total number of prims needed. 5. Upload maps and place in prims. Colour code prims if desired (Easier to identify which you're still doing at a glance.) 6. Throw the scripts in. The root prim should be the prim that you used as the common factor when exporting the scripts.
_____________________
Tutorials for Sculpties using Blender! Http://www.youtube.com/user/BlenderSL
|
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
|
05-09-2009 01:35
From: Keira Wells 2. After taking a look at the scripts produced, it seems that the LSL Export only 'truly' supports 2 objects easily.
3. Is there anything that I'm missing that would help me out here? My current method is just sculpt, export LSL, create a linkset in SL, and fill each prim with all the maps involved, then script each prim individually. Anything I'm missing on either end? The check for root or not is because root prims location is world co-ordinates, the others are local. So this simple check in LSL should work for any number of prims. You just need to make sure your root prim is centered on 0,0,0 in Blender.
|
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
|
05-09-2009 01:54
From: Domino Marama The check for root or not is because root prims location is world co-ordinates, the others are local. So this simple check in LSL should work for any number of prims. You just need to make sure your root prim is centered on 0,0,0 in Blender. Ahhhh...duhr! Too obvious for me XD Thank you.
_____________________
Tutorials for Sculpties using Blender! Http://www.youtube.com/user/BlenderSL
|