Generalized threejs model Viewer

What are the optimal parameter values of threejs Perspective camera so that models of any default size is visible when loaded?
fov
aspect
near
far

It’s not possible to define such values. Model viewers compute optimal camera parameters at runtime when the model is loaded.

2 Likes
  1. There’s no default size - if you download models from Sketchfab / CGTrader, they range from 1x1x1 to 100x100x100, depending on authors preference.
  2. Changing FOV will not affect how much is seen in general. High FOV will make scene feel more open and without focus - same as a wide-angle camera does with photos (for very high FOV you can also achieve a “fish-eye” effect.) Low FOV makes the camera focus on the details in the center of the view. Staying between 60-90degrees gives the most natural feel.
  3. If you’re building a model viewer, it’s probably easier to fit the loaded objects to the camera, than fit the camera to the loaded objects. There’s tons of topics about that around, just search a bit :mag:
2 Likes

Okay great​:+1::+1:
Thanks for the detailed explanation