Rotating the ClothPlane



  • I use the ClothPlane (aka Square Hi-Res) prop for backgrounds. To get it in place to use as a background I rotate the x-axis 90 degrees. Sometimes I need to angle it based on the camera angle, but once the xRotation is 90', the yRotate and zRotate just "wobble" it. It's the same thing for other combinations of rotations that bring the face of the ClothPlane to the front. The z and y rotations just wobble it.

    For the life of me, I can't wrap my head around what's going on. This has me baffled, and it should be easy.

    Can someone explain this to me like I'm five, and please start with something like, "Oh, yes, this stumped me for a while, also" so I won't feel like an idiot?



  • this is called gimble lock. I don't fully understand it, but the axises get mixed up somehow. There are 2 options. 1 is you can use the direct manipulation tool to rotate the proper axis. Or you and parent it to another prop and rotate that.



  • @ElZagna

    You're right. It's weird. Once you rotate the cloth plane so it faces the camera, the YRotate and ZRotate dials don't seem to function as expected.

    You have a workaround, though.

    1. Load in the Square Hi-Res.
    2. Rotate it 90 degrees on X Axis
    3. Scale it to whatever size you need.
    4. Drop to floor (Ctrl+D)

    Note that if you save this as a new prop to the library, it will record the changes that you already made. But you'll still have the rotation problem of the original one. So what you need to do is export the prop out in this position. Reimport the OBJ, and then save it as a new prop (for example BGPlane, for background plane). Here's how:

    1. File > Export > WaveFront OBJ
    2. Export range: Single Frame. Click OK
    3. Select the ClothPlane_1 Object. Choose OK.
    4. You can leave the Export Options set to the defaults, since you don't have any groups and such to worry about. Click OK.
    5. Name it something like BGPlane or whatever you want to call it.
    6. You can delete the original cloth plane, unless you want to leave it there for comparison's sake.

    To reimport:

    1. File > Import > WaveFront OBJ
    2. Scale 100% (so it imports the same size as the one you exported). Uncheck everything. Although if you forgot to drop the plane to the floor before you exported, it might not be a bad idea to check "Place on Floor" just in case.
    3. Choose the plane object you exported. It should load in the exact same place and in the exact same size as the one you scaled and rotated.

    Save to library:

    1. Choose the Props library folder you want to save your background plane to.
    2. Click the + icon at the bottom of the library window.
    3. Name the Prop (ie: BGPlane)
    4. Click OK.

    Now you have a background plane that you can rotate to face the camera. Easy peasy.



  • I should add one more thing.

    Let's say you want your background plane to be rectangular instead of square. Because of the way aspect ratios work on UV mapping, you will STILL need to use a square image to texture your background. That's just the way UV mapping works.

    So if you want to use a background plane that is NOT square, keep in mind that you'll have to take the background image you want to use and make a square version of it in a photo editing program. The other alternative is to create new UVs for your non-square plane, if you know how to do that.



  • @Deecey
    Group tool/select all/create prop would do the same, right?



  • @fverbaas

    Hmmm. Not sure that would account for scale differences but it might be worth a shot.



  • @fverbaas said in Rotating the ClothPlane:

    @Deecey
    Group tool/select all/create prop would do the same, right?

    As far as I know, yes.

    Gimbal lock can SOMETIMES be bypassed by using the Direct Manipulation tool. Sometimes, but not always. It's a problem that has been present in Poser since forever.



  • @trekkiegrrrl

    I was reading my iPad in bed last night when I replied. I tried it first thing when I got up this morning! LOL

    Yes, it does work. First you rotate and scale your cloth plane. Then you create a group (the cloth plane doesn't have any groups or materials assigned to it). Assign all of the polygons to the new polygon group, and then choose Create Prop. Make sure the new plane is selected before saving it to the library.

    Either way (exporting and importing an OBJ, or doing it in the group editor) accomplishes the same thing.



  • Oh, good. At least I'm not an idiot. This is something that even rocket scientists (literally) struggle with.



  • @ElZagna Yeah, but that doesn't mean you're NOT an idiot. :) jk



  • @ElZagna said in Rotating the ClothPlane:

    I use the ClothPlane (aka Square Hi-Res) prop for backgrounds.

    My first question would be 'why?'. You don't need high resolution for a background; a single polygon will do it. As a bonus, the single sided square loads in a vertical position already, so gimbal lock is rarely a problem for this application.

    Don't use the standard square, by the way, because it's double sided and will give you render artifacts (in Firefly at least, I've never tried it in Superfly).

    @Deecey said in Rotating the ClothPlane:

    I should add one more thing.

    Let's say you want your background plane to be rectangular instead of square. Because of the way aspect ratios work on UV mapping, you will STILL need to use a square image to texture your background. That's just the way UV mapping works.

    The way I do it, with the simple square prop, is to set its xScale to the horizontal pixel dimensions of my background image, and yScale to the vertical pixels. So a 1920 x 1200 image would have xScale = 1920%, yScale =1200%. Then I set the size I want with the overall scale dial. There's no need for a square image.



  • @englishbob Well, that does simplify things, doesn't it? Thanks for the tip.



  • I created a single poly prop for taking an image

    @amethystpendant said in sRGB ruining our renders?:

    Hi,

    If anyone wants to play along with @bagginsbill I've created a prop that is correctly UV mapped and has @bagginsbill's shader on it. The prop is just a plain square but has height and width properties, just set those to the value of your image and then scale to fit whilst keeping the correct dimensions, the origin is at 0,0 so it scales right and up. Just unzip to any runtime of your choice.

    BB Tone Mapping Prop



  • Here's another grouping object and cloth plane combo which eliminates gimbal lock problems by extracting the Y-rotations to the grouping object. The Picture Plane prop has a material which takes up to 4 images, which I use for pose matching, with a Transparency dial, allowing visibility of a figure through the image, and a picture selection dial which can vary from 1 to 4. The prop contains parameters to record the x and y pixel dimensions of the 4 images (make them all the same or ignore them, if you only need one), and will scale itself according to the dimensions of the selected image to maintain the correct aspect ratio.

    PicturePlane.zip will extract in :Runtime:Libraries:Props:Picture Plane
    0_1529133225966_Screen Shot 2018-06-16 at 4.35.04 pm.png