webaverse / app

Web metaverse client
https://app.webaverse.com
MIT License
343 stars 207 forks source link

App: geometry too large to generate physics #817

Open karunakaruna opened 3 years ago

karunakaruna commented 3 years ago

.glb with instanced geometry created in blender imports successfully, but cannot be grabbed or deleted. There might be input interference from 'x' bound to build mode.

Problem object is live in https://app.webaverse.com/?r=room-2. Sometimes also shows up in parcels.

Test objects: https://www.dropbox.com/sh/hnem1ilp32vcgcy/AACPzjSgP0yG0KbC1P-SmqpDa?dl=0

image brave!UNITO-UNDERSCORE!2021-02-09!UNITO-UNDERSCORE!17-31-36

avaer commented 3 years ago

This is because the geometry is too large to generate physics for. It is about 11MB of pure geo.

For cases like this I think it makes sense to elide geometry generation entirely, so we will need to choose a geometry complexity cutoff.

That will make selection more difficult but perhaps we can replace the geometry with a bounding box or something.

karunakaruna commented 3 years ago

Re: collision generator - ok that makes sense, I tried with a lighter file and it worked.

But should note the 11mb .glb is actually because big textures - the geo is pretty light.

Instance_test2.glb is the same mesh - 1000+ pieces of geo at 300kb - shows as 3 drawcalls in babylon.js and imports into weba - perhaps it de-instances the meshes at some point.

image

avaer commented 3 years ago

We do indeed de-instance the meshes. Physics are not instanced.

avaer commented 3 years ago

I will think about this and find a way to fix it.