Mon, Dec 23, 1:47 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 22 10:18 pm)



Subject: Help - Making a Rocking Chair Rock


keppel ( ) posted Sat, 23 March 2013 at 8:09 PM · edited Mon, 23 December 2024 at 1:43 AM

I've made a rocking chair that I'm now trying to set up to rock. Its not as simple as just moving the chairs pivot point to the ground contact because when the chair is rotated about the pivot point the front and rear ends of the rocking bar penetrate the ground plane. Its like a wheel that both rotates and moves forwards/backwards keeping contact with the ground at the same time.

The actions that best describe what needs to occur is a rotation about the x axis with a simultaneous translation on the y axis with the chairs pivot point at ground contact. This is easy enough to do as an animation using the graph but is there a way that a single dial can be edited to make both adjustments (rotation and translation) happen at the same time?

My Renderosity Store
Virtual Furnishing
My Portfolio



lesbentley ( ) posted Sat, 23 March 2013 at 9:21 PM

If the rails (or what ever they are called) on the bottom of the chair are segments of a circle, then is should not be too hard. You just need to find the center of the circle, and position the origin (pivot point) at the center of the circle.

If the rails are not segments of a circle, you probably could still get it to work by using ERC, but it could be tricky,  and the exact details of the ERC would depend on the chair. It would probably be easier to do it, than to explain how to do it. If you wanted to send me the files, I could try to set it up for you, but can't guarantee success.


lesbentley ( ) posted Sat, 23 March 2013 at 9:34 PM

file_492985.png

For ralis that are segments of a circle.


keppel ( ) posted Sat, 23 March 2013 at 9:35 PM

lesbentley,

Thanks for the reply.  Regarding the first point you made regarding repositioning the pivot point to the center of the circle, if you can picture how a rocking chair rocks you will see that following your solution the rocking bars would actually be sliding across the floor as the chair pivots around the stationary circle center.  Picture it like a wheel that rolls backwards and forwards.  If the chairs pivot point was at the center of the wheel then the pivot point would have to translate forwards and backwards with the rolling of the wheel.

My Renderosity Store
Virtual Furnishing
My Portfolio



lesbentley ( ) posted Sat, 23 March 2013 at 9:45 PM

Whoops! Yes you are quite right. 😊

Hang on a bit whilst I put my thinking cap on.


keppel ( ) posted Sat, 23 March 2013 at 9:49 PM

Using your diagram might help explain what I mean.

Rocking Chair

My Renderosity Store
Virtual Furnishing
My Portfolio



keppel ( ) posted Sat, 23 March 2013 at 9:49 PM

Sorry, you replied faster than I got this picture ready.

My Renderosity Store
Virtual Furnishing
My Portfolio



keppel ( ) posted Sat, 23 March 2013 at 10:02 PM

This was how I pictured the rocking action would need to work, with the pivot point in contact with the ground and a translation along the y axis.

RChair2

My Renderosity Store
Virtual Furnishing
My Portfolio



seachnasaigh ( ) posted Sun, 24 March 2013 at 3:49 AM

     This may not apply to the model in question, but a real rocking chair's rails will be not be arcs of a circle;  to prevent falling over, they are hyperbolic arcs (cam profile) - more curved at the center, flatter near the ends.

     The animated origin idea will still work, but it won't quite be a straight line.  You might also experiment with the origin fixed but keyframe the motion sequence repeatedly using drop to floor (I think you'd need to make the chair a figure?), or key several strategically chosen frames manually and let spline interpolation do the rest.

Poser 12, in feet.  

OSes:  Win7Prox64, Win7Ultx64

Silo Pro 2.5.6 64bit, Vue Infinite 2014.7, Genetica 4.0 Studio, UV Mapper Pro, UV Layout Pro, PhotoImpact X3, GIF Animator 5


seachnasaigh ( ) posted Sun, 24 March 2013 at 4:56 AM

     Ignore me.e  My morning coffee hasn't taken effect yet.e  I now realize that you said that you had made the chair (hence, the rails are arcs of a circle).  Your idea of placing the origin at the center of the radius (not on the floor) will work;  X-translate the chair back and forth, and Z-rotate it simultaneously.  With keyframes at neutral position, both extremes, and a few 'tweens,  the spline interpolation should work nicely.

Poser 12, in feet.  

OSes:  Win7Prox64, Win7Ultx64

Silo Pro 2.5.6 64bit, Vue Infinite 2014.7, Genetica 4.0 Studio, UV Mapper Pro, UV Layout Pro, PhotoImpact X3, GIF Animator 5


rokket ( ) posted Sun, 24 March 2013 at 5:15 AM

Everyone is trying to tell you how to rock the chair, but no one is telling you how to do it with one dial...

What version of Poser are you using? Poser 9 and 2012 both have dependent parameters, which you can use to set up the chair to rock by "teaching" a master dial to both pivot and translate to simulate the rock of the chair. If you are using an older version, I am not sure how that is done.

If I had a nickle for ever time a woman told me to get lost, I could buy Manhattan.


keppel ( ) posted Sun, 24 March 2013 at 6:52 AM

@seachnasaigh - Animating the chair rocking is easy enough which is why I made the chair using the arc of a circle.  I was hoping that there was a way to use a dial that would perform both the rotation and translation at the same time.

@rokket - I am a vendor here and intend to sell these models so I was hoping to make the props as backward compatible as possible.  Personally I have Poser 6 and 8 to test my models in.

My Renderosity Store
Virtual Furnishing
My Portfolio



rokket ( ) posted Sun, 24 March 2013 at 7:06 AM

Quote - @seachnasaigh - Animating the chair rocking is easy enough which is why I made the chair using the arc of a circle.  I was hoping that there was a way to use a dial that would perform both the rotation and translation at the same time.

@rokket - I am a vendor here and intend to sell these models so I was hoping to make the props as backward compatible as possible.  Personally I have Poser 6 and 8 to test my models in.

Ah, ok. Yeah, I can't be much help with older versions. I had no idea what I was doing when I purchased Poser 8, and I was well into learning 9 when I started modelling. I am pretty certain there are other venders who have done what you are trying to do and could help. I was just noticing that they were trying to explain how to make the chair rock instead of how to make it rock on one dial and said so.

If I had a nickle for ever time a woman told me to get lost, I could buy Manhattan.


ockham ( ) posted Sun, 24 March 2013 at 7:18 AM

If you want to see a working example of the ERC, look at the rocking chair in my Log Cabin set.    

 

http://www.sharecg.com/v/38335/gallery/11/Poser/Dogtrot-Cabin

My python page
My ShareCG freebies


heddheld ( ) posted Sun, 24 March 2013 at 12:04 PM

couldnt you just add an animated pose to the product?? beginner's would find that a lot easier


lesbentley ( ) posted Sun, 24 March 2013 at 2:21 PM

file_492993.TXT

Sorry for not getting back to you last night, but sleep overcame me. Here is a example of one way to do a rocking chair. You will need to loose the ".TXT" part of the file extension before you can use the zip.

This rocking chair prop should work for at least P4 and above. There is a dial named "ROCK" to implement the rocking motion, this is just a dial name slapped on to the xRotate channel. Another dial "Ratio_A" lets you set the ratio of zTran to xRotate. The default ratio of 0.444 is probably not correct, but I could not be bothered to get it exactly right.

Here is the relevant coding:

        valueParm Ratio_A
            {
            name Ratio_A
            initValue 0.445
            hidden 0
            enabled 1
            forceLimits 0
            min -100000
            max 100000
            trackingScale 0.001
            keys
                {
                static  1
                k  0  0.445
                }
            interpStyleLocked 0
            staticValue 0.445
            }

        valueParm TranMaster
            {
            name TranMaster
            initValue 0
            hidden 1
            enabled 1
            forceLimits 0
            min -100000
            max 100000
            trackingScale 0.1
            keys
                {
                static  0
                k  0  0
                }
            interpStyleLocked 0

            valueOpDeltaAdd
                NO_FIG
                RockingChair
                xRotate
            deltaAddDelta 0.010000

            valueOpTimes
                NO_FIG
                RockingChair
                Ratio_A
            }

The two valueParm channels above have been added to the top of the channel stack.  The value in the Ratio_A channel, "0.445" in the above example, is to be determined experimentally, or mathamatically based on Pi.
The zTran channel (below) has had slaving code added (showen in green).

        translateZ zTran
            {
            name ztran
            initValue 0
            hidden 0
            enabled 1
            forceLimits 0
            min -100000
            max 100000
            trackingScale 0.001
            keys
                {
                static  0
                k  0  0
                }
            interpStyleLocked 0

            valueOpDeltaAdd
                NO_FIG
                RockingChair
                TranMaster
            deltaAddDelta 1.000000

            trackingScaleMult 1.000000
            }

The "#" is just to mark interesting places in the file.

In this prop, the origin has been set at the center of the circle formed by the arc of the rails. The motion of the chair is corrected by using zTran. This is probably the simplest way to do the slaving.

I might get round to doing another version with the origin at the bottom of the chair and using yTran to correct the motion.


lesbentley ( ) posted Sun, 24 March 2013 at 2:48 PM

file_493005.gif

😄


lesbentley ( ) posted Sun, 24 March 2013 at 4:07 PM · edited Sun, 24 March 2013 at 4:20 PM

I tried the idea of varying the yTran with the xRotate, but it just does not "cut the mustard". The problem is that for a realistic motion, a point at bottom center of the chair should move slightly backwards and forwards relative to the floor as the chair rocks, but using yTran this point just moves up and down in a linear way, and this also puts the rails at the wrong altitude at some rotation values.

To put it another way, you are essentially rolling a wheel when you rock the chair, and when you roll a wheel it moves backwards or forwards.


keppel ( ) posted Mon, 25 March 2013 at 2:28 AM

@ockham - Just recieved my registration activation email from sharecg.  Downloaded you rocking chair model and will have a look at it.  Thanks for the link.

@lesbentley - Greatly appreciate the effort you have gone to to help me with my question.  It will take me some time to read and digest your coding.  I may have more questions for you once I start to implement it into my model.

Thank you to all others who have offered their suggestions.

My Renderosity Store
Virtual Furnishing
My Portfolio



Allstereo ( ) posted Mon, 25 March 2013 at 7:56 AM

Hello all,

 Just to add some extra to this discussion for other creators facing the same problem.

 The pivot approach of lesbentley is the right solution. The rocking chair motion is exactly similar to a wheel rolling without slipping. In this case, the translation (To be more precise, the pivot axis translation) should be equal to the length of the arc. Mathematically, the length is equal to:

Arc length = Length of the radius x rotation angle (radian)

Length of radius is the distance between the floor and the pivot axis when the rocking chair is on the floor.

 Rotation angle is the rocking angle given in radians. Why to use radian instead of degree (Poser unit are degree)? Simply because it is the direct way to link the arc of a circle to the radius. However, as one radians equal 57.3 degrees, the transformation is very simple:

 Radian value = Degree value / 57.3

 Working example (lesbentley model)

 The pivot is at 0.268 Poser unit from the floor.

The rocking chair rotate by 22 degrees in both direction

 Arc of circle = 0.268 x (22/57.3) = 0.1029 Poser unit

 0.1029 is the translation value to keep in mind

 

Now, we can compute directly the Delta value to insert in the translation channel

 Delta = Slave / Master = Translation / Rotation = 0.1029 / 22 = 0.004677

 Remember that Delta value calculation is with Poser Native unit.

 Note: The value of 0.004677 is near the value of lestbently which is after some transformation is 0.00445

 

For those of you that work with Poser 8 and above, you teach the rotation channel as:

 First key

          Master (rotation channel) = -22

          Slave (translation channel) = -0.1029

Second key

          Master (rotation channel) = 22

          Slave (translation channel) = 0.1029

 The translation value of the slave channel is given in Poser native unit, but can be in the unit that you set in the general preference. In this case, the arc of circle (the translation value) should be calculated with the same unit.

 The above calculations are very precise (It is math) but the location of the pivot point is not. You should be careful to set correctly this point.

Keppel: If you need more help, sent a e-mail via this site, but lesbentley is better than me for all the ERC coding.


keppel ( ) posted Fri, 29 March 2013 at 11:56 PM

Just an update to this question.  Using lesbentleys code I have successfully gotten my rocking chairs to rock.  Again thanks to all who offered help.

My Renderosity Store
Virtual Furnishing
My Portfolio



keppel ( ) posted Sun, 31 March 2013 at 7:38 AM

@lesbentley,

Just when I thought I had this worked out there is an unintended consequence occuring from the rocking code added to the prop file.

When the rocking chair is added to the scene and the ROCK dial is used the chair rocks as expected, however if the any attempt to move the chair to another location in the scene involves a rotation about the y axis then when the ROCK dial is used the chair rocks and tilts sideways and not backwards and forwards.  

I changed the joint order in the Joint Editor to ZXY and this fixed the wild tilt when the ROCK dial is used but the rocking chair now translates sideways as the ROCK dial is used.  The only way to stop the sideways movement is to zero the Ratio A dial, but doing this negates the whole effect of the rocking code.

I'm at a loss on how to fix this problem or even if it can be fixed.  With this rocking issue as it is the model is better off without the rocking code because the end user of the model will want to move the chair around their scene rather than have the model restricted to a specific axis just so the ROCK dial works correctly.

My Renderosity Store
Virtual Furnishing
My Portfolio



Allstereo ( ) posted Sun, 31 March 2013 at 2:24 PM · edited Sun, 31 March 2013 at 2:26 PM

Hello,

A typical problem related to how Poser process the rotations. In Figures, the solution is to rotate the figure using the BODY dial but linking the dependent rotation to the hip but for a prop, I don't know. On one thread in this forum, I saw recently the solution of parenting the prop chair to another prop (I will call the last one  the guiding prop) which is used to rotate the chair in space (If I remember, Lesbentley was involded in this thread) . This guiding prop should be made invisible or very small so that it will not be visible because of the translation of the rocking chair. With this approach, the rotation system of the chair is rotating with the parent prop keeping the original rotation axis of the chair . Some adjustments should be done to the visibility of rotation dials of the chair so that rotation dials of guiding prop is what the user is seeing.

The other solution is to code complex dependent parameters that will rock the chair around the right axis when the y rotate is used to orientate the chair. However, doing that in 3D is a very big challenge.

Allstereo

 


keppel ( ) posted Sun, 31 March 2013 at 8:37 PM

@Allstero - Thanks for the tip.  Following your advice this is the work around that I've come up with.

I loaded a Poser primitive sphere and scaled it down and moved it into a position inside of the rocking chair so it is hidden from rendering.  I took the sphere into the setup room and turned it into a figure.  I then parented the rocking chair to the figure and saved it as a smart prop.  The user can now either just load the rocking chair prop into a scene from the prop folder if it is going to remain a static prop in their scene or they can load the rocking chair "guide" from the figure folder and then load the rocking chair smartprop if they want to retain the rocking action after the rocking chair has been moved around their scene.  

Not a perfect solution but it works.  I think this approach would be easier, and less work, on the end user than having them load their own primitive prop guide and go through all the parenting/placement/visibility steps themselves.

My Renderosity Store
Virtual Furnishing
My Portfolio



Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.