Comments (3)
The idea is to have bounding volumes on geometry level since that's where data which define the bounding box in local space. Logic like ray casting or culling makes sure the bounding volumes get properly transformed into other spaces for intersection tests if required.
There are two exceptions regarding this policy: Certain types of 3D objects like SkinnedMesh
have bounding volumes on object level since the geometry data alone are not sufficient to compute correct bounding volumes.
from three.js.
I get that, however its counter to the available workflow game engines provide. In other engines you can add a bounds or volume component to the root and tweak as needed. And since three has the Box3.setfromObject, it seems it would be an obvious next step.
In your explainer the only time its optimized is if you add a cube geometry in the case of multiple meshes, and then setup management logic to resize as needed.
from three.js.
I read your reason again and you note SkinnedMesh as having this concept directly already. Would you not argue then the same reasoning is true that a multi meshed imported model does not have sufficient singular geometry of reference to build an adequate bounding volume so a full encompassing bounding box at object level would be a proper location?
One could go further and say imported models should have a subclass of Group() and handle some data caching and special functions.
Looking though the code at
three.js/src/objects/SkinnedMesh.js
Line 136 in d04539a
Swapping out the digging through mesh function routine would be a proper place for it, and since all other classes rewrite their own raycast to handle current singular geometry bounds, then nothing should really suffer.
from three.js.
Related Issues (20)
- SVGLoader pointsToStroke incorrect UV mapping when texture applied HOT 2
- Use `Object.keys(…)` to iterate over "own" properties? HOT 3
- WebGPURenderer: Resize breaks post FX setup in `webgpu_rtt` example HOT 1
- Addons.js is incomplete
- Points rendering glitch in iOS Safari HOT 5
- bug in Audio.js setDetune HOT 3
- THREE.BufferGeometryUtils.mergeAttributes fails to merge LineGeometry HOT 1
- Does three.js currently provide adjustment hubs similar to babylon.js: when dragging the model, the current option is used to determine the hub position of the model. HOT 2
- Can we have a material to be transparent if it receives no light ? (From spotlight ideally) HOT 2
- MaterialX: Unlit materials (single-output nodegraphs) don't work HOT 3
- MaterialX: `viewdirection` node HOT 1
- GroundedSkybox zenit/nadir visual artifacts HOT 6
- Using a texture as `scene.background` is blurrier than it should HOT 13
- DepthTexture and CubeTexture result in errors and warnings when assigned to a wgslFn HOT 2
- WebGPURenderer: Support computing texture in TSL HOT 3
- BufferGeometryUtils.mergeGeometries() throws unclear error HOT 2
- gltf export produces validator with errors HOT 23
- In addition to #27508 a new node to readback datas from the GPU to CPU
- Math Node 'MOD' WebGPU Error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from three.js.