cnr-isti-vclab / 3DHOP

3D Heritage Online Presenter
http://www.3dhop.net
GNU General Public License v3.0
154 stars 42 forks source link

Generate a Scale bar? #7

Closed ekansa closed 5 years ago

ekansa commented 6 years ago

First, I love 3DHOP it is amazing and congrats on a great approach to making 3D a part of the Web!

I'd like to request a useful feature. Often times, one would want to have a more immediate idea of scale when first viewing a model. It would be nice to have an option to add a scale bar (one that can be toggled on and off) that is automatically generated as a simple rectangular volume that appears near by the model(s) loaded from Nexus meshes.

This would be a good supplement to the measuring tool, since the measuring tool takes some more interaction effort and returns abstract numeric values. A scale bar provides similar information in a clear visualization.

mcallieri commented 6 years ago

Hi there, thanks for reaching out. It is certainly an interesting idea. However, it is difficult to implement it in an automatic way :( It would be a mess to decide automatically which size should be the bar, which kind of subdivision (every 1-5-10-100 units), and where to place it into the scene such that it is useful/visible/unoccluding. We have done it, case by case, creating custom geometries by hand, tailored to the specific scene. For orthographic camera it might be easier, as we can superimpose a ruler on the canvas, and could easier to guess the correct parameters.