Skip to content

3D Viewer. Allow for Different UP/Down axis on camera + improved culling/zoom max/min #337

@DiegoPino

Description

@DiegoPino

What?

When a blender model is exported to OBJ, sometimes (many times) people forget to reverse the default axises used by Blender, which are different from other tools. This makes some OBJ show rotated/up-side-down (the dish, some new stuff I found)

The idea here is to allow users to select the upside / camera (no mesh manipulation, we reverse the camera) vector.
By default we are using [0,0,1], works for, e.g, Maya OBJ generated geometries and of course decently exported Blender to OBJ.
A default of [0,1,0] gave me good results on this one:

Ocarina

Side note: when reversing the default I have to also make the camera look Up instead of Down (eye to center of the scene), that needs to be based on the actual vector passed (I can multiply vectors friends)

Also, I can calculate the Bounding box (max.y, max.x, max.z) of each imported Mesh and then get a full (by comparing max again over an over) bounding box. That way I can basically make the max zoom and min zoom behave based on the geometry. Of course that will give me some culling (cutting of meshes if the mesh is not rectangular) but better than now where the max zoom and min zoom are constants.

The dream here is to allow this to be a Formatter setting but also be driven, per ADO by metadata. I'm tired but since I was lucky to be X,Y,Z aware today while fixing Mime Types I will give this a try tomorrow. Thinking of Museum uses here.

Metadata

Metadata

Assignees

Labels

Field FormatterThe thing that glues the pieces and adds glitterJavascriptFavourite language of a PHP developerUXLike UI but with an XenhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions