avonian/soundstage-vr

backstage collision

Closed this issue ยท 18 comments

I fell through somehow :)

image

Is it somewhere in the middle of the tunnel?

We'll make major model refactoring in the beginning of May.

  • Optimize geometry (split walls, roof etc for better control)
  • Reduce the number of meshes, use more instances and/or clones
  • Inspect all materials, remake needed and reduce their quantity
  • Rename all meshes for good names and put them into groups for proper control
  • Remake UV and other textures where needed
  • Any other suggestions!

I was jumping over the DJ pult in 1st person, somewhat sideways, and ended up there. So it's around tunnel entrance.
I'd recommend using invisible meshes dedicated for collision detection, let their names start with floor.
This is sure to cause trouble with collisions
image
But we want to keep the look, right?
Best cover it all with an invisible box, that should go from wall to wall, again, to make sure we can't get stuck in the tunnel.
Again, I'd put an invisible surface over stairs, then refactor movement.
Last but not least, I'd enlarge everything twice (you've done that a while ago but we scaled it back). I'd like to have it more real, i.e. 1 VR unit = 1 meter. It's just more intuitive for development. As a bonus, we'll be able to show off in VR ;) (someone is going to ask about it sooner or later)
Let's open refactoring issue?

I commented model scaling and all works "almost" fine - https://github.com/SoundStageFM/soundstage-vr/blob/main/src/world.js#L352
But all added position values should be reassigned (camera movements settings, camera animation, poster and lights positions etc).
While we have yet no so much of these values I think it is better to use model 1:1, so we would have the same coords in DCC tool and Babylon. It will be more intuitive also for later development, and VR support just will add extra benefit.

Hey guys I don't want us to get stuck in a wishy-washy state where we have other dev ongoing that's conflicting with the rescaling attempt.

I would hold on rescaling until we can plan an adequate sprint to get it done.

In the mean time, back on the original subject of this issue, we should track and try to solve the following:

  1. Ramp falling through the floor
  2. Avatars are getting stuck on the bar countertop

2, I'd again recommend invisible surfaces, so nobody can get up the bar. That can get in the way of clicking on something on the bar, I think MeshSelectionPredicate could solve that.

The only issue there is that I often feel tempted to move from one bar stool to another, and I've seen other users do it too, and an invisible mesh will feel unnatural here - forcing them to walk around the bar.

I'm not super clear on the cause for this though. Is the issue here that the elipsoid gets "stuck" between the countertop and the ceiling? If so maybe we can lower the bar height/barstools a little to make more room?

Right.
Easier to turn off collisions for selected meshes. Quick look, seems safe turn off collisions for all meshes anything like Lamp. That kind of post-processing is safely done in World.loaded().
I'll do that quickly, we can refine later.

Oh I forgot, there's even a convenience method just for that. All I had to do is override setMeshCollisions(mesh, state). Collisions with lamps is now turned off. There's also commented out piece of code we can use to debug collisions. It can be very noisy, we should probably add some way to toggle it in debug mode, i.e. to turn it on if we get stuck somewhere.

@jalmasi confirming that the bar countertop colisions is fixed, awesome! thank you

Tunnel entrance improved. Please test and tell if there are any collision problems.

Mixer geometry optimized.

The top lamp was replaced with the simple sphere, but maybe we don't need it at all.

Glass added, and it is really nice!

https://github.com/SoundStageFM/soundstage-vr/tree/model-remake1

image

I got it reproduced:

PU2Ro6T5lI.mp4

It's hard to explain why this happens, and I can't honestly say that I'm sure, might be a babylon collision detection bug. It happens with irregular shapes, and colliding with two or more surfaces simultaneously.
The only sure way out of it that I know of are invisible flat surfaces. Like here, user can get stuck in these walls and windows:
image
So I added this:
image
Without it, stuck:
image

The threshold is made bigger and caps closed (maybe they were the main reason of collision problems).
Let's test
3ecf6a2

image

That did the trick :)

Glad to hear!
Here is the next version 2f2c4ad
The top screen (WindowVideo) is made higher to have better aspect ratio for casting.
The table at the left is visually the same but has twice less polygons. Also, the upper table plane now is separated from its base, so now we can use table for posters or any other effects too.
I started to rename model meshes for better names but seems that we have already too much of them used in the code. I think we'll leave it for this model as it is from now (I renamed only 2 floor meshes, and we also lost the old top lamp but got three new lamps).
Let me know if this version is good enough to use it in the main and we'll continue to improve the model (furniture definitely needs some improvement and maybe even some restyling).

image

The latest model version, with VIP room door, is pushed into main - 1374302
If there will be any collision problems in future, let me know.
Meshes names were left as they were before (no changes).