Primstar-Zero

We have created a sample Blend file containing a collection of ready made Sculptie templates all created with Primstar-2. You can use the provided sculptie templates as basis for your own sculptie creations. We have also included a special material which allows to bake the templates with the Blender default Bake tool. And we have added some helper objects which will allow you to reimport sculpted Prims back into blender. For more details see below.

After downloading the Primstar-Zero sculptie_lib_1.2.blend. please unzip the file to get access to the sculptie_lib.blend. Currently this library only works with Blender 2.6 and you can open it with Blender for inspection (This readme is also included within the blend file for offline usage).

Legal note

The blend file is owned by Domino Marama & Gaia Clary. We distribute this file under the Creative commons license  CC-BY.

We encourage teachers to add the needed templates for their courses to this blend file and distribute the modified blend file as additional course material. This will allow your pupils to follow your course without need to purchase Primstar-2.

 

Version Changes

  • Now objects will always be created at location
  • Improved the Sculptie Creator Objects to have more accuracy
  • Removed Bricks and Steps from the Library, because they can not be created with a resonable quality. If you need Bricks or steps, then we recommend you switch to Primstar-2.
  • Improved Documentation
  • Added support for more accurate vertex baking
  • Added support for Sculpt-Map Import
  • Initial release

Short Instructions

Preliminaries:

  1. Copy this blend file to a convenient place (for example to your Home folder or to your Desktop) and if possible  make it read only, so that you never make unintentional changes to the templates!
  2. Critical: Blender 2.5/2.6 uses an advanced color management by default. While this is a good thing for texturing, it will break the Sculpt-Map bake. Hence you must disable color management for Sculpt-Map bakes. You do this as follows:
    • go to the render properties menu
    • locate the shading tab
    • uncheck “Color Management”

Create a Sculptie:

Create a new blend file or use your already existing project file and then proceed as follows:

  •  Navigate to  File -> Append
  • Then navigate to your sculptie_lib.blend and further down into the Object section. there you find a bunch of templates. We have used a name convention “Category-U-V-S-T” where:
    Category [plane|Cylinder|Sphere|Ring|Torus|Star|Cone|Hemisphere|Cylisphere|Steps]
    U Number of faces along U
    V Number of faces along V
    S Number of subdivisions used (if 0, then no Subsurf Modifier used)
    T “t”: optimized for uniform (homogeneous) texture.
    “v”: optimized for best vertex accuracy.
    “i” : Import template for making a sculptie object from a Sculpt-Map

    You get the default sculpties with 32*32 faces when you append one of the-8-8-2 templates. For example if you want a default sculptie cylinder, then append:

    Cylinder-8-8-2 or Cylinder-8-8-2

    Some templates use the Subsurf modifier. You can remove the modifier or change the modifier settings at any time as you like.

    Note:The templates with no modifiers (names ending with “-v” or “-t”) have got a slightly modified UV-Map. We did this by hand in order to provide better results with the bake material. The templates marked with a trailing “-t” are optimized for homogeneous texturing, while the templates ending with a trailing “-v” are optimized for highest vertex accuracy.

    In any case the finally baked sculpties are not optimal regarding their seams. However they should work almost correct when imported to OpenSim (or similar environments). Most users won’t even see the difference to an exactly constructed sculptie.

  • Now shape the template to your taste. You may use subsurf and increase or decrease the levels of subdivision. But as mentioned above do not add/remove vertices or edges by hand! This will definitely break your sculptie!

Bake a Sculptie:

Critical:  The baking only works as long as the object is attached to the included sculptie-baker material.

  • Create your final Sculpt-Map as follows:
    • Go to the Render properties section.
    • Ensure that color management is turned off (see preliminaries section above).
    • Render -> Bake -> Full Render
    • Now your ready baked Sculpt-Map should appear in the U/V Image editor.

Import a Sculpt-Map to Blender

To import a sculptie here’s what you need to do:

  1. Add the appropriate base sculptie import template from the sculptie_lib (an Object ending with “-i”).
  2. In the UV Image editor open your Sculpt-Map from File and possibly give it a convenient name.
  3. Go to textures and select the Sculptie-Constructor texture.
  4. Attach your just imported sculpt map to it.
  5. Apply the displacement modifier
  6. In the UV Layout move the top row up half a pixel (g y .5) and move the right column to the right by half a pixel (g x .5)
  7. Edit your imported sculptie
  8. Bake

Additional Hints:

  • The sculptie-baker material creates correct sculpt maps only for torus and ring objects. All other objects also work in OpenSim or your preferred online world as long as you select the correct stitching type. But they may show irregularities along the seams. This may have influence on texturing. We tried to minimize the irregularities by manual tweaking the UV-maps on those templates which do not contain a Subsurf Modifier. You will have to experiment which works best for you.
  • Take care that the final number of vertices in your Sculpt-Map is ONLY dependent of the size of your Sculpt-Map! The general rule is:Vertex count = image-Width * image-Height / 4 (width/height measured in pixels)
  • The smallest allowed sculptmap size is 8*8 pixels, resulting in 4*4=16 vertices. Any Sculpt-Map which would result in more than 1024 Quads (2048 tris) will automatically be scaled down by the image importer. You do not want this to happen, because you will loose quality.
  • Please always use “File -> Append” and avoid “File -> Link” (Link will not create a new Object but use the Object from within the sculptie_lib. And therefore linked objects are always read only in your project unless you make them “local” and this is exactly what File -> Append does automatically.
  • Do never(!) try to use the sculptie-baker tool with arbitrary objects. It will most probably create wrong results.
  • If your bake result contains black dots, then proceed as follows:
    • go to edit mode and
    • locate duplicate vertices (usually the poles).
    • select the duplicate vertices.
    • apply “smooth vertex” once.
    • Now your bake will no longer show black dots.
  • How to construct a UV map for best vertex accuracy:
    1. Select all but the right most column on the UV Layout.
    2. Move the selected points half a pixel to the right (g x 0.5)
    3. Select all but the top most row of the UV Layout
    4. Move the selected points half a pixel up (g y 0.5)
  • How to construct a UV map for best texture mapping:
    1. Select all but the right most and left most columns on the UV Layout.
    2. Move the selected points half a pixel to the right (g x 1)
    3. Select all but the top most and bottom most rows of the UV Layout
    4. Move the selected points half a pixel up (g y 1)
  • How to construct a sculptie-object from a Sculpt-Map:
    1. Add the appropriate base sculptie.
    2. Apply subsurf
    3. In edit mode select all points and scale to 0.
    4. On UV layout move top row down by one pixel (g y -1)
    5. On UV layout move right row in by one pixel (g x -1)
    6. Move the entire UV map to the right and upwards by half a pixels ( g .5 tab .5 )
    7. Add a displacement modifier and click to add a new texture
    8. Set displace Direction to ‘RGB to XYZ’ and texture co-ords to ‘UV’
    9. Go to textures and select the new texture
    10. Change the texture type to image and load the sculpt map into it
    11. Apply the displacement modifier
    12. In the UV Layout move the top row up half a pixel (g y .5)
    13. In the UV Layout move the right column to the right by half a pixel (g x .5)
    14. Edit your imported sculptie
    15. Bake (ensure color management is turned off)

Have fun

Gaia & Domino

8 Enlightened Replies

Trackback  •  Comments RSS

  1. Just a heads up. 🙂

    As of 2.64, Color Management was moved to its own section in Scene properties. This needs to be set to “None”.

    Unfortunately, saving the baked sculpt render appears to be broken in 2.64. Everything at first appears fine. But even with Color Management turned off, the sculpt map image is saved to disk with an incorrect gamma. This has been addressed in 2.65RC2.

  2. salahzar stenvaag says:

    Hi, I just tried to redo what is in the video for importing a sculpted map.
    What is NOT working is that when I import the -i object and select it and go into textures tabs I can’t edit it, it seems it is a kind of readonly.
    I checked I really did an append and not a link (I know that can make it readonly), but don’t know what to do to have it working. It was with blender 2.59, maybe a Blender bug? Which version are you exactly using to append the -i?
    I wanted to teach this night this technique but am a bit frustrated it is not working for me 🙁

    • Gaia Clary says:

      i have verified that it does not work with blender 2.59, but it does work with 2.6
      It seems to be related to the node based material, which is later used for the baking. I found a workaround for this part:

      – disable nodes for the material
      – now setting the texture works
      – reenable nodes for the material

      But the subsequent bake also seems bugy in blender 2.59, because the baked sculptmap comes out distorted. And this is currently even true for objects which are based on the sculptie templates. The problem might be solved by switcing from node based material back to “simple materials”.

      I need more time to find out if this is a bug in blender, or if we can fix this behaviour. For now: “It works with blender 2.6”

      • salahzar stenvaag says:

        Thanks.. I’ll show it with blender 2.6. Don’t want to mess around with nodes (I’m still not proficient in node editing 🙁 )

  3. salahzar stenvaag says:

    Nice work, Gaia & Domino, I was just teaching how to make sculpties without Primstar or plugin following and this library of yours will be surely far more better than the original library I used (taken from http://www.masterprim.com).
    I’m still telling people, however that primstar is more soft/convenient and can help people who want to do much complex and professional creations, since they get more sophisticated tools such as sculptify, or import images as sculpted. (This was one of the first questions they asked me, to import sculpties to modify them).

    • Gaia Clary says:

      we use basically the same technique as masterprim.com. As far as i know it is the only way to create sculpties with a material. But we have also slightly modified the UV-maps to work better with this baking technique. I have tried to find the optimal solution for texturing.

      Some of the issues mentioned in the comments on the masterprim.com site may be explained in the hints section of this page. I will try to make the documentation more complete within the next weeks depending on the questions raising.

    • Thanks. The material method of baking sculpties does have limitations due to the way baking works in Blender. Torus based shapes are the only ones that totally avoid the limitations. For other shapes you have to decide between even texturing or accuracy of vertex positions. If you want vertex accuracy then from the standard even grid UV layout (with all subsurf modifiers applied) here’s what to do:

      1) Select all but the right most column on the UV Layout.
      2) Move the selected points half a pixel to the right (g x 0.5)
      3) Select all but the top most row of the UV Layout
      4) Move the selected points half a pixel up (g y 0.5)
      5) Bake

      The result will be a reasonably accurate location bake for all the map except the top and right edges. This is because the blender bake process uses faces and not vertices, and the top and right edges come from the wrong side of the vertices. If those edges are wrapped, then the incorrect values aren’t used. This has always been an issue for material based bakers in any application – even the default SL apple sculptie shows this problem when the sculpt type is changed to plane.

      There’s no fix unless you use a script based baker like Primstar 2 that bakes vertex positions rather than faces.

    • To import a sculptie here’s what you need to do:

      1) Add the appropriate base sculptie.
      2) Apply subsurf
      3) In edit mode select all points and scale to 0.
      4) On UV layout move top row down by one pixel (g y -1)
      5) On UV layout move right row in by one pixel (g -1)
      6) On UV layout move all points across and up by half a pixel (g .5 TAB .5)
      7) Add a displacement modifier and click to add a new texture
      8 ) Set displace direction to ‘RGB to XYZ’ and texture coords to ‘UV’
      9) Go to textures and select the new texture
      10) Change the texture type to image and load the sculpt map into it
      11) Apply the displacement modifier
      12) On UV layout move top row up by half a pixel (g y .5)
      13) On UV layout move right row out by half a pixel (g .5)
      14) Edit your imported sculptie
      15) Bake

      Here’s an example that has up to step 10 done.

Post a Reply

Your email address will not be published. Required fields are marked *

Top