Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Strange Blender-Primstar behaviour

Paulo Dielli
Symfurny Furniture
Join date: 19 Jan 2007
Posts: 780
11-11-2009 19:36
Blender 2.49b (32 bit version) - Python 2.6.4 - Primstar 0.5.0 - Vista 64 bit Home - Intel Quadcore @ 2.33 Ghz - 4 Gb Ram - Nvidia geforce GTS 250.

On my previous pc (Vista 32 bit Home) Blender and Domino’s scripts worked flawlessly. Now I have a Vista 64 pc and had to reinstall Blender, Python and Primstar scripts. Adding sculpts in Blender and modeling them still goes fine. But when I want to bake the sculpty, nothing happens in the UV/Image editor window. I also can’t save the sculpty map. The image stays grey/default.

I’ve tested with the default sphere sculpty: spacebar > add > mesh > sculpt mesh > default sphere, and then tried to bake it. I found out that, in the UV/Image editor window, I have to click the button ‘Browsing existing choices or adds NEW’ (right side of Image) and select ‘Sphere_map.001’ and then bake the sculpty again to get a coloured sculpty map. I can save the image and the export/import to SL works fine.

But is this workaround necessary? My Domino scripts are in the folder C:\Users\[username]\AppData\Roaming\Blender Foundation\Blender\.blender\scripts and I’ve specifically added the scripts path in Blender.

Is it just Vista 64 or have I done something wrong?
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
11-12-2009 01:30
After adding the sculpt mesh, if you open a UV Image Editor and tab into edit mode, do you see the default sculptie LOD map? Primstar hasn't displayed the sculpt map automatically for a long time. Once support for textures was added, it no longer made sense to do it as it would change the active uv layer. I suspect you had a really old version of Primstar before which still had that behaviour. Now you do have to display it manually, or as long as the bake didn't give an error, you can go straight to export as Second Life LSL to save the map and a script to build the object.
_____________________
Visit http://dominodesigns.info for the latest Primstar info
Paulo Dielli
Symfurny Furniture
Join date: 19 Jan 2007
Posts: 780
11-12-2009 17:35
Ah Domino, I see the sculpt map. Just didn't tap into edit mode. I believe in your older versions it wasn't necessary. Don't know anymore.

Yes, I used Blender 2.46 with your 'old' scripts, when it wasn't Primstar yet. They worked great for me. I used to make pretty simple sculpties, last one was a few months ago. Now I want to learn how to make complex sculpties and took up Blender again. I can see the UV sculpty map again. But still a few things puzzle me. I feel like a noob asking you these questions, but I've read the tuts on your webpage and didn't find the ansers, so here goes...

- I loved my old Blender/Domino setup because I could see the exact LOD levels behaviour in Blender with the Multires function, as described by Machinimatrix in their preciseSculpties video: You can see in that video that Apply Multires was automatically there and it had 3 LOD levels. Now I have to first click Add Multires > Add Level and it only gives me 2 LOD levels. The old lowest LOD level from the video seems to have disappeared. This easy prediction of inworld LOD levels is very important to me. Am I doing something wrong? Why is the Multires not automatically there and why are there just 2 levels?

- Second thing that I'm puzzled about is this: when I open a new document in Blender and add a sculpty sphere, and then go into Edit mode, I see a kind of yellow bounding box around the sphere which is wider (front view) than the sphere itself. I remember that I didn't see that bounding box in my old setup. Is this indeed a kind of bounding box and what should I do with it?

- Last question (sorry). I usually use Modifiers to make the basic shape that I want, Apply the modifier and work from there. In the new setup there is always by default a Subsurf modifier. What does it do? And should I Apply that too? Because when I do, and when I Add Multires after that, then the two Multires levels are suddenly showing much more vertices on the mesh.

So I don't know anymore which procedure to follow in order to foresee and switch between the SL inworld LOD levels and work with modifiers. I would really appreciate some help here, because Blender and your scripts are simply the best tools for making sculpties in SL.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
11-13-2009 00:22
Just out of interest, did you try the 0.9.x series of Primstar? That's going to be promoted to a stable version soon. I don't have access to Vista 64 and it'd be handy to know if a 32 bit Blender is the way to get it working on that platform as that and lack of Mac testers are what are holding a stable version back.

In 0.5.0 there should be a Use Subsurf button, unselect it to get a multires version instead of one with a subsurf modifier. You can also replace subsurf with multires while modelling, for each multires level you add, remove a subsurf one to keep the face count the same.

In subsurf mode, the yellow is just the selected modelling edges. You'd use edge creases to change the influence on the subdivision surface that gives the actual final shape of the mesh. http://dominodesigns.info/node/163#comment-515 has an example blend file of working this way. See later comments in that thread for an explanation of the file and workflow.

On 0.9.x there's a much better interface, it has a radio button selection for subsurf / multires for example, so it's a lot clearer how to use it.

Besides the generated sculpt meshes, Primstar 0.9.x also has a Sculptify Objects command, this lets you start with normal Blender objects and adds support for nurbs and curves as well as meshes. So it's worth getting this latest version if it will run on your system.
_____________________
Visit http://dominodesigns.info for the latest Primstar info
Carbon Philter
Registered User
Join date: 4 Apr 2008
Posts: 165
11-13-2009 03:30
Dom - just loaded Primstar 0.9.25 with Win7 64 bit and it looks ok. I've been using rel.23 until this morning without problem since I upgraded to 64 bit Win7 from 32 bit XP.

Having said that, I occasionally come up against a problem where the image refuses to load when I'm trying to texture the sculptie. In the UV map window I sometimes don't get the filename box loading. I get the up/down arrows and other bits. The 'project from view' object mesh just sits there against a blank one square gray background and no matter how many times I try to load an image nothing happens. Of course that may well be me just not doing it right.
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
11-13-2009 08:38
From: Carbon Philter
. The 'project from view' object mesh just sits there against a blank one square gray background and no matter how many times I try to load an image nothing happens. Of course that may well be me just not doing it right.
That sounds like you have not selected any vertices while you try to assign a new image to the sculpty. Try:

- go to edit mode
- press "a" to select all vertices
- create/assign image

now it should work.

I am not sure, why one must select vertices in order to be able to assign a new image, but at the end i got acustomized to this behaviour guessing there is some hidden reason behind all this :rolleyes:
Carbon Philter
Registered User
Join date: 4 Apr 2008
Posts: 165
11-13-2009 09:55
Thanks Gaia.
So I need to select all vertices and assign the texture I'm going to use before I do the selecting/unwrapping the bit of mesh I want to apply the texture to?

It had to be something simple! I usually get so annoyed and just press buttons indiscriminately until it works and then of course I have no idea why it worked!

/me adds another line to my step by step idiot's guide

:D
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
11-13-2009 12:08
From: Carbon Philter
So I need to select all vertices and assign the texture I'm going to use before I do the selecting/unwrapping the bit of mesh I want to apply the texture to?
That is what i found out by experimenting. And i do not know why that is so as it appears reasonable to me to (for instance) assign an image to the currently selected faces. But that apparently does not happen. Furthermore it is not clear to me how many vertices must be selected in order to be able to associate an image to a sculpty. But selecting all vertices allways works for me.
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
11-13-2009 12:23
From: Domino Marama
On 0.9.x there's a much better interface, it has a radio button selection for subsurf / multires for example, so it's a lot clearer how to use it.
And here is a preliminary reference manual for the primstar-0.9.23 features:

http://blog.machinimatrix.org/2009/10/25/primstar-gui-add-mesh/
http://blog.machinimatrix.org/2009/10/30/primstar-bake-mesh/

It is neither complete nor do i give ensurance for correctness ;-) But it may serve as starter kit ...
Paulo Dielli
Symfurny Furniture
Join date: 19 Jan 2007
Posts: 780
11-13-2009 19:31
From: Domino Marama
Just out of interest, did you try the 0.9.x series of Primstar? That's going to be promoted to a stable version soon.
Hi Domino. Thanks again. For testing Primstar 0.9.x series I've deinstalled Blender 2.49b first, including the scripts folder, then ran CCleaner to make sure register and folders were cleared. Then I rebooted my pc and installed Blender 2.49b again, 32 version. Then I downloaded primstar 0.9.9-git (primstar 0.9.9.zip) and extracted it.

It wasn't good. The readme.txt file was chaotic, text text text. I saw the install.py in the folder, didn't know what to do with it so I searched for the words 'install.py' in the readme. I found it, but the How To explanation was too difficult to understand, especially since English is not my native language. I understood though that install.py is a kind of automatic installer, but the way how to do it was too difficult for me.

Then I went into the primstar folder and saw all the .py scripts. Also a Library folder with sculpt maps, but I didn't know what to do with it either. So I just focussed on the .py scripts and copied them in my folder: C:\Users\[username]\AppData\Roaming\Blender Foundation\Blender\.blender\scripts

Then I fired up Blender: spacebar > add > mesh > sculpt mesh > default sphere. Then an error appeared: 'Python script error: check console'. I'm not an experieced Blender user (anymore, see below), so I don't know how to check the console. But bottom line: it was all way too difficult, confusing, I didn't understand the readme and in the end it didn't work. I'm sorry to say this, and I've probably done something wrong, but with my long description I hope at least you understand why it doesn't work: Vista 64, Blender 2.49b 32, Python 2.6.4 and Primstar 0.9.9-git.

From: Domino Marama
In 0.5.0 there should be a Use Subsurf button, unselect it to get a multires version instead of one with a subsurf modifier. You can also replace subsurf with multires while modelling, for each multires level you add, remove a subsurf one to keep the face count the same.
Ohhh this is a GOLDEN tip. I've tested it with Blender 2.49b and Primstar 0.5.0 and this is EXACTLY what I want in order to handle/predict LODs as in Gaia's video tut! Thank you very much!

About Subsurf. I'm simply too inexperienced to understand it. I'll just leave it and use Multires. That gives me everything I want for now.

By the way, hehe maybe nice to know: Blender was developed many years ago (in 2000? don't know anymore) in actually my home town Eindhoven, The Netherlands, Europe (later Amsterdam). At that time I was very interested in learning 3D modeling. Just a hobby, not my profession. Ton Roosendaal (also a Dutchman) was the founder of Blender and the Blender community was buzzing because of the amazing possibilities and the open source idea. Then funds ran out and Blender (company name was: Not A Number) was almost bancrupt. I was one of the people that donated money to Not A Number. I remember in four weeks all users raised around 80.000 euros. I was so happy and proud that we helped Blender survive. After that my RL job got too busy and I didn't have the time to learn Blender any further. I only got to the basics of mesh modeling. Subsurf etcetera I didn't use or understand. Only when I came in SL and sculpties were introduced I started up learning Blender all over again. Hehe, I was again a noob and now I still am, but oh boy... I was SO proud when I saw how popular Blender had become :)

Thanks for your help Domino. And thanks Gaia!
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
11-14-2009 00:59
From: Paulo Dielli
Then I went into the primstar folder and saw all the .py scripts. Also a Library folder with sculpt maps, but I didn't know what to do with it either. So I just focussed on the .py scripts and copied them in my folder: C:\Users\[username]\AppData\Roaming\Blender Foundation\Blender\.blender\scripts


With primstar the way of installation has changed slightly: Instead of moving the .py scripts to the scripts folder, move the folder (which contains the scripts!) into the scripts directory. Thats all, really! And it makes your life so much easier because you no longer have to think about which scripts you need to remove when you do an update ;-) Just replace the primstar folder...

From: Paulo Dielli

About Subsurf. I'm simply too inexperienced to understand it. I'll just leave it and use Multires. That gives me everything I want for now.
If you follow the documentation i have posted above (the preliminary primstar reference) you will get to know how you can create a multires object with primstar which behaves exactly as how i show you in the tutorials. Simply select "Multires" in the add mesh popup menu and there you are. Here you find a small tutorial about Subsurf (watch the cylinder tutorial):

http://blog.machinimatrix.org/2009/04/

Just a hint: With Subsurf nothing really changes technically for you: You just need to push around far less vertices. Think of them as control points. And you will see that the underlining mesh moves nicely along with your moves. The biggest advantage of subsurf is that you automatically(!) get a nice LOD behaviour in many cases. Only when you start pushing the control vertices to the extreme you get bad LOD effects in world. Subsurf is very good for organic shapes and i use it more often nowadays than Multires. You even can create sharp edges in that mode when you take a few minutes and investigate into the Crease-option (select some edges, typically a loop, then pres "E" and move the mouse. you see that sharp edges build up along the selected edges)

Multires on the other hand is good for precision sculpting.

BTW: We are preparing a fresh JASS-distribution which will come with the new primstar-scripts and is ready to use (a binary distribution including blender-2.49b or whatever is the newest release) and i am about to redo all the tutorials for primstar (hard work though).
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
11-14-2009 01:40
From: Paulo Dielli
Hi Domino. Thanks again. For testing Primstar 0.9.x series I've deinstalled Blender 2.49b first, including the scripts folder, then ran CCleaner to make sure register and folders were cleared. Then I rebooted my pc and installed Blender 2.49b again, 32 version. Then I downloaded primstar 0.9.9-git (primstar 0.9.9.zip) and extracted it.

It wasn't good.


OK, thanks for trying. I wouldn't have expected that version to work, it was 0.9.21 before the last of the Windows specific GUI issues was fixed. If anyone else is testing, please use the latest in the 0.9.x series, which is currently 0.9.25 - that's the version that will be promoted to a stable release if no problems are found.

From: Paulo Dielli
The readme.txt file was chaotic, text text text. I saw the install.py in the folder, didn't know what to do with it so I searched for the words 'install.py' in the readme. I found it, but the How To explanation was too difficult to understand, especially since English is not my native language. I understood though that install.py is a kind of automatic installer, but the way how to do it was too difficult for me.


The later versions have an improved install instructions in the readme. The website manual is currently being updated from 0.5.0 to 0.9.x but I've not done the install section yet. Hopefully when there's pictures to go with the words, it'll be easier to follow for you.

From: Paulo Dielli
Then I went into the primstar folder and saw all the .py scripts. Also a Library folder with sculpt maps, but I didn't know what to do with it either. So I just focussed on the .py scripts and copied them in my folder: C:\Users\[username]\AppData\Roaming\Blender Foundation\Blender\.blender\scripts


You just need to copy the entire primstar directory out of the zip and into your user scripts directory in Blender. This isn't the system scripts directory you mention above, but is a directory you create yourself for additional scripts in Blender. Gaia's installation tutorial covers creating this directory. http://blog.machinimatrix.org/2008/07/12/the-blender-installation-guide/ - this is a 0.5.0 specific tutorial, so you are just interested in the part at the end about setting up a user scripts directory.

From: Paulo Dielli
About Subsurf. I'm simply too inexperienced to understand it. I'll just leave it and use Multires. That gives me everything I want for now.


No problem. I've designed Primstar to be flexible and there are many different ways of working with it. Once the manual is complete and I do a few tutorials on the subsurf workflow I think more people will use it.

Great to hear about Blender's history from your perspective. Thanks for helping set it free. Multires couldn't be added from a Python script when I first started work on Primstar, it's only because Blender was open source and I could add that feature that I was able to use it.
_____________________
Visit http://dominodesigns.info for the latest Primstar info
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
11-14-2009 02:57
From: Domino Marama
You just need to copy the entire primstar directory out of the zip and into your user scripts directory in Blender. This isn't the system scripts directory you mention above, but is a directory you create yourself for additional scripts in Blender.
To put it to the point: If you absolutely insist on doing so you can(!) place the primstar folder right into the blender scripts directory. That would work. In fact our JASS-distribution comes with the primstar scripts installed in the scripts folder as this makes sense for a bundled distribution. For a user installation i also would follow Domino's advice and create a separate user scripts folder.

Hey, recently i managed to guide 2 blender noobs through the whole installation process within 30 minutes in an online session. So if you need a hand, IM me in world.
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
11-14-2009 04:24
From: Gaia Clary
To put it to the point: If you absolutely insist on doing so you can(!) place the primstar folder right into the blender scripts directory. That would work.


Primstar won't find the library sculpt maps if you do that. You need to put it in the user scripts directory to get full functionality.

Edit: the next release will support this installation type. I've also allowed for moving the library to the default textures directory.
_____________________
Visit http://dominodesigns.info for the latest Primstar info
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
11-14-2009 05:36
From: Domino Marama
Primstar won't find the library sculpt maps if you do that. You need to put it in the user scripts directory to get full functionality.

Edit: the next release will support this installation type. I've also allowed for moving the library to the default textures directory.
Thank you for supporting this option!
Domino, you Rock ;-)
Paulo Dielli
Symfurny Furniture
Join date: 19 Jan 2007
Posts: 780
11-14-2009 18:25
From: Domino Marama
OK, thanks for trying. I wouldn't have expected that version to work, it was 0.9.21 before the last of the Windows specific GUI issues was fixed.
Oh Domino, it DOES work on my system! I just did it all wrong by copying only the scripts in the system folder C:\Users\[username]\AppData\Roaming\Blender Foundation\Blender\.blender\scripts

Okay, later I understood that I could simply copy the entire Primstar folder in that same system folder (which was wrong too, but anyway...). So I used Blender 2.49b 32-bit and Primstar 0.9.25 (didn't know before that this is the latest version) on my Vista 64-bit machine. And it worked! Sort of... Creating sculpties etcetera all worked well. But there was a prob BAKING the sculpt maps.

I tried to make the i-beam (Gaia's tutorial, thanks for all your work too Gaia!), but then something strange happened. The mesh was all good, buit immediately after baking the sculpt map, the original map got deformed. Look at the 2 pics before and after:

Before baking:

After baking:

So you are absolutely right! I created a new user scripts folder as described in Gaia's install tut, and tried the exact i-beam tutorial all over again. Now, after baking, the mesh didn't deform and the sculpt map was perfect! I'm sorry that I didn't do it well the first time. Bottom line: Blender 32-bit and Primstar work flawlessly on Vista 64-bit systems!

From: Gaia Clary
Just a hint: With Subsurf nothing really changes technically for you: You just need to push around far less vertices. Think of them as control points. And you will see that the underlining mesh moves nicely along with your moves. The biggest advantage of subsurf is that you automatically(!) get a nice LOD behaviour in many cases.
You are an absolute life saver! Oh boy, I can't thank you enough for the time and effort you've put into your tutorials. You and Domino really contribute a LOT to the SL community. If you didn't already won a prize, then you should! Your work and Domino's are simply amazing!

One last (ah well, probably not last, hehe) question: you say that with Subsurf, LOD will almost always be perfect. I'm trying to understand why that is. That also applies to the crease (shift E) you mentioned (sharp corners). What happens with Subsurf? And how does it compare to the Multires levels, which is not as easy as Subsurf, but seems to give more control?

Thanks a lot, you two! I already was excited about creating complex sculpties, but now even more :)
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
11-15-2009 04:57
From: Paulo Dielli
I tried to make the i-beam (Gaia's tutorial, thanks for all your work too Gaia!), but then something strange happened. The mesh was all good, buit immediately after baking the sculpt map, the original map got deformed.
If you work With Multires ON in the lowest LOD level, then all vertex manipulations will influence the position of the vertices of higher LOD-levels. What you see is Catmul-Clark at work ;-) Now in my tutorial i told to remove all higher LOD-Levels before doing the I-Beam. If you dont do that, you end up with what you have seen, smoothly shaped Ibeams ;-)

The only reason why i started with Multires ON was to automatically get a convenient sculptmap size. Maybe it would have been better to directly start with the 4*16 mesh and later add a 32*128 image for the sculptmap by hand ... That would have worked equally well.

About why Subsurf is almost perfect regarding LOD: (for power of 3 sculpts) i guess it is due to how the mapping between the control points and the vertices is done. It appears to me, that this is just done in the same way as how LOD is calculated. So when you move the control points, the associated moves to the vertices follow the calculations in such a way, that all vertices on a lower level are always located "inbetween" the next higher level vertices and by this their locations is optimal for LOD. It does not work allways but even with the Crease option it almost always leads to good results regarding LOD.

Compared to Multires mode: In Multires mode you can actually manipulate ALL veritces of the sculpty as you like (when you work in the highes LOD level. Hence you can easily destroy the LOD behaviour. You may have noticed that while you switch from one LOD level to the other, those LOD incompatible vertex positions get "flattened" out. Sometimes you want that, sometimes it drives you (... me..) nuts.

I am afraid, that i am not very clear here... Maybe i need to make another tutorial about that ? so you can visibly see what happens... maybe thats an idea ;-)
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
11-15-2009 05:37
From: Gaia Clary
Maybe it would have been better to directly start with the 4*16 mesh and later add a 32*128 image for the sculptmap by hand ...


Pssst: Press N over image and you can change it's size in the properties.
_____________________
Visit http://dominodesigns.info for the latest Primstar info
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
11-15-2009 06:20
From: Domino Marama
Pssst: Press N over image and you can change it's size in the properties.
Gnnnarghhh... That's too easy isn't it ? Good hint ;-)