Hi all.

I have detected a bug in the SculptifyObjects tool. This bug causes blender to rotate the sculptmap by 90 degrees and thus borks the whole sculptmap. This problem can be seen in particular when you try out my recent tutorial “Sculptify Objects”.

To the left you see the screw which i am going to sculptify in my video tutorial. You see that the screw’s topology is a cylinder with the (currently) open end caps at the top and at the bottom of the screw. I also have drawn the seem that goes along the longitudinal axis of the cylinder. So in fact this screw has the topology of a cylinder and that should convert nicely into a sculpted prim. But after applying the “Sculptify objects” tool to the screw the mapping is wrong…

 

The top loop should map to the top row of the sculptmap. But it maps to the rightmost column instead:

The bottom loop should map to the bottom most row of the sculptmap. But it maps to the leftmost column:

And the seam which should be mapped to the rightmost AND to the leftmost column of the map now is mapped to the topmost/bottommost row:

Now why is this so ?

The sculptifyObject tool was originaly invented by me but it worked only for NURBS objects. And with NURBS i faced the problem that the sculptmap was rotated by 90 degrees during the transformation to the sculptmap. Consequently i added a rotation by 90 degrees to revert this unwanted rotation in the final sculptmap.

Later Domino Marama took over my code and generalized it to “suitable mesh objects” and released that with primstar-1.0.0. “suitable” in this context exactly means:

“Having a topology conforming to the constraints of sculpted prims”

or with easier words:

“Can be transformed into a sphere/cylinder/torus/plane without modifying the mesh connections (edges between vertices)”.

But when the objects are already mesh objects, then no transformation of object type is needed. Hence Blender does no longer rotate the UV-map and thus now all mesh based sculptified objects have a wrong UV-map. Another bug occured when the sculptify tool was used on an already existing sculptie. As long as the opbject contains the uv-map named “sculptie” nothing happens at all. But when you remove this map then the sculptify objects tool yields again a wrong UV-map rotated by 90 degrees. I have redesigned the tool so that it now always generates a new “sculptie” map regardless if one was already existing or not. But in addition id the tool detects an existing “sculptie” map then it assumes that we are dealing with a sculptie and just want to regenerate the map. In that case no rotation is needed and that is now recognized by Jass-2.3.1

And what can we do against it ?

Well. I changed some code of the primstar-1.0.0 release to determine if the original object is a sculptie (no rotation needed) or an arbitrary object created by blender (without a “sculptie” uv-ap) . For the curious:

  1. in the script uv_tools.py i added a rotation flag to the function “add_map_uv(ob, doRotate)”
  2. In the script sculpty.py i calculate the flag depending of the object’s mesh type explained above and pass this flag to the above mentioned function

This code is ready available in Jass-2.3.1-PRO (released on 15.08.2010 together with a few more interesting enhancements). If you like to support us you may buy Jass-2.3-PRO. Otherwise just go to your ready installed version of Jass or blender and apply the above changes to your code and be happy.