We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Camera auto-zoom after parametric resize

Home Forums Puzzles Camera auto-zoom after parametric resize

  • This topic has 4 replies, 2 voices, and was last updated 1 year ago by omrto.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #67853
    omrto
    Participant

    I have a parametric model that you can change the size of via HTML inputs. I’m having trouble figuring out how to get the camera’s view to adjust to the size of the object after it is changed. For example, if you make it longer I want the camera to zoom out to fit the entire view.

    So far in Blender I have a camera set up with empties at the camera location and the camera target. I set the Verge3D Settings>Target Object/Point to the camera target.

    I’ve tried zooming to the scene, changing the field of view, all with some rather unexpected results. Are there any good tutorials on advanced camera handling or is there a demo with this type of auto zoom already?

    #67906

    Hi omrto,

    You can use this puzzle every time you change the size of your object.

    Chief 3D Verger | LinkedIn | Twitter

    #67908
    omrto
    Participant

    Hi omrto,

    You can use this puzzle every time you change the size of your object.

    Does this work with objects that have been modified by shape keys/morph factors? I tried the puzzle you posted above but it zooms to the base shape key only. It doesn’t zoom out when changing the length of my model.

    #67926

    Does this work with objects that have been modified by shape keys/morph factors?

    Unfortunately it doesn’t. As a workaround you could use an invisible bounding volume (e.g. a cube) the size of which is changed according to the user input, and zoom on to it instead.

    Chief 3D Verger | LinkedIn | Twitter

    #67984
    omrto
    Participant

    That works well enough, although I had to really jump through hoops figuring out the scaling because it doesn’t match up with the model’s calculated units. After some effort I was able to get it to work with a little “guess”timated math.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.