Author Topic: Importing obj + setting good camera distance / lookat angle  (Read 1696 times)

0 Members and 1 Guest are viewing this topic.

Offline mikekhogan

  • Newbie
  • *
  • Posts: 4
Hi all,

I'm a novice with both keyshot and python, but I have a project that requires:
1) Creating models programmatically in Blender
2) Importing models into Keyshot, setting good camera angles
3) Rendering the models in Keyshot

I've solved 1 and 3, but I'm still having problems with 2.

In short, I import the obj then:
- Use opts[snap to ground] and opts[center geometry] as true
- lux.setStandardView as either top or isometric

The problem is that this doesn't always guarantee a good camera angle. Sometimes the distance is too short or too far, or the camera is not panned correctly to provide a good shot.

Is there any programmatic way to ensure that the center of the PROJECTED mass - i.e. the 2d projection onto the camera, not the 3d object - is centered in the camera?

If there is any more info I can provide, please do let me know.

Offline TpwUK

  • KeyShot Beta
  • Hero Member
  • *****
  • Posts: 2910
Re: Importing obj + setting good camera distance / lookat angle
« Reply #1 on: May 01, 2017, 02:43:52 am »
If you are setting up the camera view in Blender export as FBX and you can export the camera settings with the model.

Martin

Offline mikekhogan

  • Newbie
  • *
  • Posts: 4
Re: Importing obj + setting good camera distance / lookat angle
« Reply #2 on: May 02, 2017, 12:21:14 am »
Hi TpwUK - thanks so much for your suggestion, it is indeed very useful. Much easier (for me at least) to do this stuff in Blender.