bnolan Posted November 1, 2018 Share Posted November 1, 2018 For cryptovoxels I wrote a non-greedy mesher that creates a really nice lighting effect, but because it has so many faces, it's very slow to use as a collider. eg: https://www.cryptovoxels.com/play?coords=SE@4E,18N&mode=realism It's ok on chrome on my macbook, but on slower devices, there is a lot of time spent in javascript (I assume doing the collider or picking). I understand I can set a collider for a mesh - so I can create a greedy mesh (generate one mesh of faces to use as the collider). Can I then set that collider to be pickable so that moving the mouse cursor around (we raycast every frame so we can highlight interesting things to click on) only picks from the collider? I'm thinking the most efficient way to do this is to merge the voxels into a set of axis aligned cubes (using some kind of greedy algorithm) and use that as the collider / physics model, then greedy mesh the voxels into a non-visible but pickable mesh - is this the best solution or am I overthinking it? Quote Link to comment Share on other sites More sharing options...
Guest Posted November 1, 2018 Share Posted November 1, 2018 So the picking is a pretty easy question: You can use any kind of impostors as long as you set isPickable = true on them For a world as big as yours I would recommend using simple impostors so I do not think you are over-engineering it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.