Upcoming in the “New Entities Features” PR - https://github.com/highfidelity/hifi/pull/3402…
Good News: Lots of great new features. (see below)
Bad News: Old scenes/models will look funny (stretched) - until they get hand repaired (details below).
- Entities have TRUE dimensions - When you add or edit entities of any type, you now specify their true size and dimensions in world units (meters). This means you can now stretch any entity to an exact dimension. This includes boxes and spheres. So you can now make a wall or a football like shape.
- Angular Velocity - you can now give entities “angular velocity” and make them spin automatically. This can be combined with linear velocity and animations to make an entity fly across the room while tumbling and animating.
- Visibility - you can now set a visible true/false property on any entity. This will eventually become more powerful for generating “spaces” or “rooms” that have properties and behaviors but that don’t need to be rendered.
- Registration Point - previously entities were placed and rotated around their center. Now you can specify a point in the entity (0,0,0 - 1,1,1) at which the entity is “registered to”… With this you can rotate or place entities based on that spot on the model. This allows for easier editing and rotating.
- Natural Dimensions - Model type entities will have a gettable/non-settable property that indicates their “natural” dimensions as indicated in the FBX file.
- new UI for “natural dimensions” - The Edit Properties UI now supports a “reset to natural dimensions” button that will read this value and set the dimensions of the entity to that value.
fixes the crash in butterflies.js
Details on the Bad News:
The old file format didn’t have any concept of how big a model actually was. We only stored a radius of a bounding sphere, and the model would be rendered to fit in that sphere. This isn’t a long term sustainable solution, as we need to allow for models to be stretched or set to arbitrary aspect ratios. Unfortunately, there’s no way for us to know those “natural sizes” in the server for the old file format. So when the server loads an old file, it will “do the best it can” and make the dimensions of the entity be a cube that matches the previous sphere… but this means all models will be stretched and distorted.
These models can be fixed by hand, by using the new “Reset to Natural Size” feature… and then editing the properties accordingly.
Let me know if you have any questions.