Camera is barrel rolling past target, goes fully upside down

suffo85suffo85 Posts: 155
edited April 11 in New Users

I've seen a few posts around about this, one dated back to even 2012.  I haven't seen a solution though, outside of parenting the camera.. but my camera *is* parented..

My camera is pointing at Null 1, and my camera is parented to Null 2.

When moving Null 2 in a straight line past Null 1, my camera does a barrel roll like it's an F-14 fighter jet airplane instead of just, ya'know, turning....like a sane person would imagine it would do....

How can I stop this roll effect and get my camera to just turn when moving it past the target it's Pointing at?

 

EDIT ->  Had made a .gif of this happening and tried to attach that here but apparently it won't play on this forum.  So here's 3 stills instead.

broken-animation01.png
3840 x 2160 - 696K
broken-animation04.png
3840 x 2160 - 862K
broken-animation06.png
3840 x 2160 - 951K
Post edited by suffo85 on

Comments

  • suffo85suffo85 Posts: 155

    Sooo, I made this scene again, and now it's not doing the barrel roll anymore....

    No idea what caused it to do that the first time, literally the exact same setup with camera parented to null 2 and pointing at null 1... if someone knows I would love to know what caused this so I can avoid it in the future, but otherwise, it's working as it's supposed to now.

  • PerttiAPerttiA Posts: 9,486

    If one locks the X and Z-rotation of the camera, does it still do the barrel roll?

  • suffo85suffo85 Posts: 155
    edited April 11

    PerttiA said:

    If one locks the X and Z-rotation of the camera, does it still do the barrel roll?

    Yes.  I spoke too soon when I made my second post.  It's still barrel rolling, it's just doing it on the second third pass now instead of the first.

    Locking the rotational axises does nothing to prevent it.

     

    LOL my terrible painting.

    Edit -> Actually when I played it back much slower it starts the barrel rolling on the second pass, not the third.  It's just not very noticable.  After the tilting begins it just gets worse and worse.

    Deleted the camera, made a new one.  Locked the rotational axises as advised, and the moment I pointed it at Null 1 the axises had already been modified...so yeah, locking isn't locking....

    badpainting.png
    1280 x 720 - 39K
    Post edited by suffo85 on
  • PerttiAPerttiA Posts: 9,486

    Ok, if locking doesn't work, how about setting both the minimum and maximum values for X and Z-rotation to zero and making the rotation follow those limits?

  • suffo85suffo85 Posts: 155
    edited April 11

    PerttiA said:

    Ok, if locking doesn't work, how about setting both the minimum and maximum values for X and Z-rotation to zero and making the rotation follow those limits?

    I wasn't even aware that was possible o.O - I don't see any obvious way to do that, sooo, I'm guessing it's buried in some submenu somewhere and called something very clever.  I'll look it up and give that a try next time.  I managed to get the camera to stop barrel rolling long enough for this animation to render.  I had thought when I made my nulls that everything was on the same Z, but I realized when I had locked the camera rotational values for about the third time that if the camera was already tilting (it was tilting by like -1 or so, so negligible it couldnt be seen really), that they couldn't be on the same Z axis.

    I see barrel rolling is going to be problematic while traversing the Z axis though, DS apparently really doesn't like that.  This one was a lot longer than I normally make them for being 300 frames, mine are usually like 60 frames and loopable, so I hadn't encountered this issue yet or if I had it was so minimal that it hadn't started to become noticable yet.

    Anyway, thanks for your suggestions. :)  I'll look into min/max values as something tells me I may be needing those...

    Edit -> So looked up locking min/max values and nothing comes up.  If by locking min/max you mean typing a value into rotation in parameters, then yes, I had already tried that.  Usually min/max implies two values though.  One value for the minimum and one value for the maximum.  In parameters you can only define a single value that they share.  If there's a setting somewhere that allows me to define both the minimum and maximum with two different values I have yet to come across it, and Google doesn't know about it or the variation of keywords I used didn't trigger any relavant results to return on the subject.

    Post edited by suffo85 on
  • NinefoldNinefold Posts: 256

    Min/max values are in the settings for each parameter. Click on the little gear that is rightmost in the row of symbols you see when you hover your cursor over any parameter dial, and select "Parameter Settings". A dialogue box will come up that has a bunch of things in it, including minimum and maximum values more or less halfway down from the top. For min and max to apply, you'll also need to check the "use limits" box to the right of those settings.

  • suffo85suffo85 Posts: 155

    Ninefold said:

    Min/max values are in the settings for each parameter. Click on the little gear that is rightmost in the row of symbols you see when you hover your cursor over any parameter dial, and select "Parameter Settings". A dialogue box will come up that has a bunch of things in it, including minimum and maximum values more or less halfway down from the top. For min and max to apply, you'll also need to check the "use limits" box to the right of those settings.

    Thanks, it had never occurred to me to check there.  I've only gone into the property menu for morphs and such.  Always multiple layers of Daz Studio to peel back to find new things.

  • TimberWolfTimberWolf Posts: 238
    edited April 13

    This appears to be gimbal lock - https://en.wikipedia.org/wiki/Gimbal_lock. I've not encountered this myself with Studio but our animations in Studio are fairly basic and the camera movements are mostly more of the dolly kind so it's never going to affect us. In Unity/Unreal et.al you can use quaternion maths to avoid this but it's a little bit more tricky here.

    You may have to use slerps to fix it - sorry for the jargon but this is quite a complex subject and there is no quick explanation for the maths.

    Source code for a fix from McCasual here - https://sites.google.com/site/mcasualsdazscripts/mcjslerp-for-ds-1-2-3-4 - but you'll need to understand the problem you're facing and it's not an instant 'click this option' solution.

    The easier solution is to adjust your camera animation or fake it using a jump cut, something like that. Don't try to render it in one pass. Or... you can dive into the mathematics. Your call :)

    Post edited by TimberWolf on
Sign In or Register to comment.