Rebake Refusing to update UV Map

| Project: | Primstar - Blender Scripts for Second Life Sculpties |
| Version: | 1.0.0 |
| Component: | Bake Sculptie |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
- I have created 3 sculpties and aligned them in blender.
- I have selected the objects and made the last selected the parent of all. The dotted parent-child lines appear.
- I move the whole set of sculpties to location <0,0,0> I am not sure if i must do that ?
- I baked the 3 sculpties and i uploaded the 3 sculptmaps to SL.
- I created a new Object named "Primstar" and took it to my inventory
- I created a new Object named "builder"
- I placed the 3 sculptmaps and the Object named "Primstar" into the Object named "builder"
- I grabbed the LSL script from my disk and opened it.
- I cut/pasted the LSL content to a new script inside "builder"
Now "builder" starts working.
- The "builder" changes to a metallic box containing "dominodesigns" on its texture
- The "builder" tells me "Ready to build. Click to start"
- I close the editor popup
- I click on "builder"
- "builder" creates 3 objects, all located at position <0,0,0> relative to the "builder" itself.
I looked into the code and i found indeed, that all objects are created at poition <0,0,0> relative to Script owner. But that is not how the objects are positioned. Only the parent object is at <0,0,0>
What am i doing wrong ? Since the problem allready raises during export, i may have missed one Step in blender ?
Cheers, Gaia

Comments
#1
It's not a bug but a procedure error.
Steps Blender/SL:
Blender:
1) Select.
2) Parent.
3) Bake.
4) Export.
SL:
1) Create a cube/box, whatever that is.
2) Create an object and name it: Primstar and drag it into the cube's content folder.
3) Drag the maps you up-loaded in the cube's content folder.
4) Add: "New Script" in the cube's content folder.
5) Paste the code in the "New Script".
6) Ready to build. Click to start.
Note:
Q: "I move the whole set of sculpties to location <0,0,0> I am not sure if i must do that ?"
A: Only if you want all the objects at <0,0,0> location, otherwise it makes no sense, it's obvious the LSL will translate the coordinates from Blender to SL, so, if you set <0,0,0> the result is predictable.
My multibake test: 3 Objects.
#2
maybe a missunderstanding...
When i say "I move the whole set to <0,0,0> i mean the set, not each individual part of the set. The relative position of the parts is ok in blender but not ok in SL. Again the question: Why does LSL want to set all parts to <0,0,0> ?I can see it in the code. So the problem raises during creation of the script. So something must be wrong either when i call the export or before. I have still no clue ;-(
And where exactly is your process different from mine ?
#3
The difference is mine succeeded, that means you are doing it wrong.
Used in my test: Windows XP; Blender 2.49b; Python 2.6.4; Primstar 1.0.0 from git
In my opinion it's surely not a bug since it worked.
#4
How are you doing the bake? Are you selecting each sculptie in turn and baking it, or doing all three at once? At what point are you doing the export as LSL?
#5
i am selecting all three sculpties, make one of them the parent and then i bake them all together using the default bake settings. After baking i check that all sculptmaps are correct but i do not save the sculptmaps at this time. Then i do the export to an existing directory. I find the sculptmaps in that directory as expected and i also find one single LSL script there. The LSL script contains code to generate 3 sculptmaps as expected. But all locations are set to <0,0,0>.
I double checked this behaviour by making a new .blend file, see the attachment.
#7
Note: haha, I double post it, forgot to log in the first time! So it was quequed =\ Was wondering why I wasn't able to attach files, now I know the reason!
This is my test result:
My procedure:
1) A
2) Alt+P
3) Cntrl+P
4) Bake
5) Export
Result: (3 maps; 1 LSL .txt) I think it now generates 1 LSL per linkset, that's the way it was behaving already since a couple earlier versions.
#8
I tried what you explained (using object mode). Obviously you can create the linkset as expected but i can't. Would you mind to publish the LSL file ? I want to see the difference between what you get and what i get...
This is the part which i guess is responsible for the positioning:
changed( integer change )
{
if ( change & CHANGED_LINK )
{
tI = ~-llGetNumberOfPrims();
llOwnerSay( "Configuring Prim " + (string)tI);
if ( tI == 1 )
{
llSetLinkPrimitiveParams( 2, [ PRIM_TYPE, PRIM_TYPE_SCULPT, "middle.001", PRIM_SCULPT_TYPE_SPHERE, PRIM_SIZE, < 1.05039, 0.85191, 0.67675 >, PRIM_ROTATION, <
0.00000, 0.00000, 0.00000, 1.00000 >, PRIM_POSITION, < 0.00000, 0.00000, 0.00000 > ] );
addPrim( "Primstar" );
}
else if ( tI == 2 )
{
llSetLinkPrimitiveParams( 2, [ PRIM_TYPE, PRIM_TYPE_SCULPT, "top.001", PRIM_SCULPT_TYPE_SPHERE, PRIM_SIZE, < 1.05039, 0.85191, 0.67675 >, PRIM_ROTATION, <
0.00000, 0.00000, 0.00000, 1.00000 >, PRIM_POSITION, < 0.00000, 0.00000, 0.00000 > ] );
addPrim( "Primstar" );
}
else if (tI > 0 )
{
llSetLinkPrimitiveParams( 2, [ PRIM_TYPE, PRIM_TYPE_SCULPT, "bottom.001", PRIM_SCULPT_TYPE_SPHERE, PRIM_SIZE, < 1.05039, 0.85191, 0.67675 >, PRIM_ROTATION, <
0.00000, 0.00000, 0.00000, 1.00000 >, PRIM_POSITION, < 0.00000, 0.00000, 0.00000 > ] );
llBreakLink( 1 );
}
else
{
llOwnerSay( "Finished!" );
state ready;
}
}
}
#9
When I mentioned earlier: "Result: (3 maps; 1 LSL .txt)" forget about the part ".txt". The extensions are .tga & .lsl, that was a little mistake I wanted to point out to avoid any possible confusion, in case people is wondering: "where's the .txt Manny did mention!?" It's not there, don't worry, it was just another product of my messy imagination.
Ok, back to the LSL, here's the part you wanted to see:
if you see there's no code maybe it's because: I'm re editing the post?
#10
hmmm... invisible code ... ?
#11
Added: _.txt to its extension to up-load it.
#12
I am completely confused... I'm trying to make my own snowman from the begining. I've made 3 spheres, modified them a little bit, than tried to export by procedure as you typed above:
1) A
2) Alt+P
3) Cntrl+P
4) Bake
5) Export
And I'm getting an error:
"LSL Export error
A selected sculpt mesh
has not been baked"
What I'm doing wrong?
#13
hey #12 have you tried to select the objects you wanted to bake and bake them? Any way check this comment if you didn't find your way around it.
#14
I've just tried the multibake process for the first time on the SL Preview Grid - to save expense before doing it on the Agni grid - and appear to be getting a similar result to that which Gaia originally did - all the components are being created and linked, and appear to be the correct shapes but are all at the the same centre coordinates. Not only that but the sculptie components all have a bounding box with the same dimensions as the basic building unit - 0.5 x 0.5 x 0.5.
I've looked through the LSL file and there each of the 14 components has been specced with it's dimensions identical to each other though not the correct size of any individual component as reported in the properties panel of Blender nor even the SL prim default, and the positional values appear as though the components should turn out correctly in relation to each other but don't. Each component in the parented group has its own object centre.
I'm running 32 bit Blender 2.49b with Primstar 1.0.0 on a Windows 7 64 bit system. I've experienced no other problems (apart from still struggling to get sharp texturing detail in the surface texturin process - still getting my head round it) and individual bakes of the components import and work fine in SL though to do that I simply import the sculpt maps and resize/orientate manually without using the LSL process.
I've read through the threads on this and can't see if I'm missing something in Blender to get it working correctly.
Before and after screenshots attached.
Can anyone shed any light on where I'm going wrong, please?
#15
I am currently preparing for a tutorial about how to transfer a multiple sculptie object to second life. While preparing this tutorial i found, that (for me) sometimes the generated LSL code shows a bug. I meanwhile found following problems in particular. and they do not necessarily show up alltogether. often only one of them applies:
- all parts get the size of the parent objet
- all parts are located at the same position (rezzposition of the parent object)
- only the parent object rezzes. All other child objects do not show up.
I am testing on windows-XP, using blender-2.49b
This behaviour looks like randomly created. For instance yesterday i was chasing the first bug, where all sculpties would be created but have the same size. While i added print statements to the python script and reexporting, i realised suddenly that the bug was gone away. Now for this particular blend file everything works as exepcted.
well, i have extended my bug-hunt and will dive deeper into it. I hate to make tutorials for something that sometimes does not work as expected... So better fix it
#16
I'm getting similar errors on multiprim export. Typically what happens when I select File > Export SL Sculpties (lsl) is that I get as many scripts as I have objects in the blender scene... The scripts generated do not have any sort of llRezObject in them, but I've tried putting each corresponding script in a each linked prim. No dice :-\
When I try to bake sculpties in Render > Bake Sculpt Mesh - i get an error ... this might be because there was an error in my python installation:
Here's the error I get on trying to run install.py (Windows 7 x64. Python 2.6.4) http://www.flickr.com/photos/inacentaurdump/4474975008/
However, I can generate sculpt maps for individual sculpted prims though...
#17
I've tested your snowman Gaia, and it worked fine for me.
#16 getting single scripts means that you have created a scene of objects rather than a multiple sculptie. You need to parent the child sculpties to a parent root sculptie to create linksets that will export from Blender.
Coming back to Gaia's problems:
- all parts get the size of the parent object
This is correct behaviour for a multibake. If you select all the prims and bake, they will have a combined size. Bake each sculptie seperately for best quality, multibakes are a historical feature for doing aligned parts, this is better handled with joined meshes now.
- all parts are located at the same position (rezzposition of the parent object)
- only the parent object rezzes. All other child objects do not show up.
I've not been able to duplicate either of these problems in normal use. I can get the same position by using center cursor and keep center on the bake, but that's not something anyone is going to do by accident
It's the bake process that stores the size and position information for the LSL export, so it's likely any odd behaviour is down to the workflow leading to the bake rather than a bug in the export script.
#18
This is a very newbie question, so please forgive my lack of experience. I have only started using this program a few days ago. I've tried to learn as much as I could with tutorials and on my own, but many many things still elude me. I have made an object in Blender using Primstar, and I made several attempts at it before I ended up with a model I really liked. I've noticed, though, that there were a few times that the program refused to update, or create, a UV map for the object I made. In this case, I went to bake the UV map and nothing changed from the last bake and trial upload into Secondlife. I've tried to make a new image file, but it refuses to bake a new map. I feel almost beside myself, because, being a new creator, I know of nowhere else to find the answer to this problem... And it is certainly something I am doing wrong... But what that is, I have no idea. Thank you for whomever can answer this for me and keep a straight face at the newbness of it. :>
#19
I'm having similar problems to those above: my multipart object is built and 'sculpted' correctly inside SL, but none of the individual parts are being sized or positioned correctly. I'm fairly well-versed at LSL, and I can see that the llSetLinkPrimitiveParams code should be working, but isn't. I even tried pulling out that part and sticking it into a script of my own, and it still doesn't work.
All of the parts of the linked object end up centered relative to the root prim, and scaled at the default size.
Example: one of the linked prims has this information passed to it:
llSetLinkPrimitiveParams( 3, [ PRIM_SIZE, < 0.09234, 0.17201, 0.19730 >, PRIM_ROTATION, < 0.00000, 0.00000, 0.00000, 1.00000 >, PRIM_POSITION, < 0.42874, -0.21122, 8.37727 > ] );
According to the LSL Wiki, PRIM_POSITION should function here the same as llSetPos (or LocalPos), but after the script runs, the prim in question is still at local position <0,0,0>, and the prim is still at size < 0.50, 0.50, 0.50 >, which means it was never scaled.
Any idea what's going wrong with the LSL?
#20
My problem is similar to the last comment - everything works fine in the first go round... create sculpt, bake sculpt mesh... everything works. But - save file, close blender, open blender, open file, edit - bake again... nothing happens, the Primstar bake window hangs and the UV map never updates. Nothing seems to change this. Basically, I can't re-edit anything I've saved and closed in blender and get any new sculpt maps from it.Help?
Post new comment