Jump to content

Help resetting sculpt object axis.. what to use ?


You are about to reply to a thread that has been inactive for 3262 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

HI, 

PROBLEM:  I have purchased a house with furniture (rattan set) and have a completely different chair with animations I purchased separately, both are copy and modify.  I want to put the animations in the rattan chair from the stand alone chair.  Both chairs are sculpts.  The stand alone chair uses two prims a hidden prim and the chair the animations are in the chair and the menus and position cards in the hidden prim.    NOTE the separate chair uses animations without pose balls just sit.

When I tried just copying the animations into the rattan chair and the menus into the rattan hidden prim, to dublicated the separate chair, the orientation of the AVI was off.   I played with various ways of trying to solve this without having to reset all 112 animations poses, but no joy. 

Next, I located the sculpty for the rattan chair and loaded it into the animation chair, and the orientation of the rattan chair  axis was not the same as the animation chair, thus the AVI poses are all off.

Thus if I can reset the axis / orientation of the rattan chair to match the animation chair all or most of the animation poses would work properly saving HOUR and hours of repositioning  AVIs. note this does not use the Edit tool to move the AVIs, rather its own built in reposition controls.

I have never outside SL worked with sculpts, never used blender..  I have downloaded the latest version of blender.

 I tried to find out how to load the png. sculpty file into Blender and found NOTHING about importanting a png scupty to edit it.

I saw the list of Sculpt preview tools here:http://wiki.secondlife.com/wiki/Sculpted_Prims:_Resident-made_Tools

QUESTION:

What tool can I use to reset the axis orientation of the sculpt?   Hopefully there is a free way to do this.

 

Please note, this is for my own private use, nothing for sale or extended to others..  I have modified other furniture using hidden prims or copying animations from other sources into furniture before.. this just happens to be a total different animal.

Link to comment
Share on other sites

Lots of people use Blender, but very few still use it for sculpties. I have already forgotten how to make them. There is the Primstar addon (google it), but that's no free any more.

If the change you need is a (combination of) 90 degree rotation, you can achive this without Blender by exchanging the channels. Red=x, green=y, blue=z. So you can just use Gimp (it's free) Color>Components>Channel mixer to swap the channel data, and thus switch the axes. For example, to exchange red and green, set red channel inputs to 0,100,0 and green to 100,0,0. To flip an axis, set it to -100. Or you can use Color>Components>Decompose. Then you can manipulate each channel to your hearts content, then use Color>Components>Compose to put them back in another order.

If you need rotations other than 90 degrees, you are going to have to get into some complex (pun intended)  mathematics. I suspect you could achieve that with the decomposed image and a lot of manipultion, but I'm not going to try it myself just now. I can't reme,ber where my sculptmaps are, or what they are supposed to be.

Link to comment
Share on other sites

Well, I thought I had better try this stuff out. Turns out I got one thing wrong for the 90 degrees. After you have put the red channel map into the green channel, you have to invert it. Otherwise, you get something flipped and inside-out (inside-out can be corrected inworld) as well as rotated. I did the maths that showed me the error. In the end I did it by: decompose; invert red layer; compose putting red layer into green channel and green layer into red channel.

The 45 degree rotation is MUCH harder. The combinations of the two channels are complicated, and you have to make sure you don't get intermediate pixel values outside the range 0:255. Otherwise they get truncated. You also have to keep the whole thing scaled down because the rotated thing has to fit in the bounding box. I tried but didn't quite succeed, You can see there is a truncated bit. Still, that's enough to convince me it can be done.

The pic shaws the original on the left, the 90 degree rotated one in the middle and the 45 degree one on the right. All unrotated inworld. The 45 degree one is stretched tothe size of the others because of the shrinking done for the maths.

sculptyrot.jpg

Someone more numerate than me could probably write a script for generalised rotations using matrices. My attemp was: decompose; make three copies each of red and green layers; scale one of each to 127/255 with the colour level editor and merge the with Addition mode; scale another one of each to 22/255 and then subtracy each of those from the previously added layer; that's the new red channel; Now scale the last two copies by 149/255; make a new white layer and scale it to 106/255 and add it to the scaled green ;ayer; then subtract the scaled red layer from the result; that's the new green channel. Now just compose using these new channels and the old blue channel.

 

Link to comment
Share on other sites

An alternative to swapping RGB channels in a graphics prog would possibly be adjusting rotation of the sculpt object in Blender and making a new sculpt texture. Sculpties from scratch in Blender are way too hard - for me anyway - and if purchasing the current version Primstar/Blender solution is not possible for any reason, it is still possible to obtain the free version of JASS (pre-Primstar) which includes a legacy version of Blender (2.49) which it works with and which, once installed, you could use for simple remedial work such as you are looking to do. You can pick it up inworld at http://maps.secondlife.com/secondlife/Jass/148/185/25

The process would be to import the sculptie image of the chair into Blender 2.49, rotate its axes to whatever is needed to suit the anims - in Object mode; use the Object Clear/Apply menu to do a 'Apply Scale/Rotation to ObData'; rebake the Sculptie texture using 'Bake Sculpt Meshes' in the drop-down Render menu;, and Export that as a new Second Life sculptie LSL. The new image would then be uploaded to SL to create a new sculptie.

Getting the correct axes rotation should just be a case of matching the required chair orientation with that of the chair you're lifting the scripts/anims from, but you would be best to try using local textures to generate trial versions to save upload costs.

Maybe a roundabout way of doing it but, to me, doable.

Link to comment
Share on other sites

AWESOME THANKS SO MUCH BOTH TO : Drongle McMahon & Carbon Philter, I will try Carbon's 1st and see how it goes, then fall back on Drongle's suggestion.

BTW

as I said I am told noob on this, I said Blender because that is what I assumed most who make sculpts use.  However if you can recommend either an in - world solution or external that is free,  to solve this problem by simply importing the 3D Object png file and rotating and saving ..  Please recommend such a program or process. 

Again thanks again for all suggestions and help..  Even if not successful I learn and love the process of these kinds of challenges and where they might lead.

Link to comment
Share on other sites

YAY Success!

Carbon Philter instructions were dead on. the JASS package worked as he said, and his instructions were exactly what I needed.  

One note, that package allows me to save to other 3D object formats that the latest blender version will import *accept,..

Did this solve the animations issue.. NOT exactly its a lot better than trying to move animations a full 90 deg, instead of 10 min or more per animation, it will take about 2 min.  I can live with that.  The reason for the difference between chair A & B is the size of the animation chair is larger and there is an angle difference in the slope of the chair I didn't notice originally.

Anyhow very happy to  have learned new stuff..  thanks to all

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3262 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...