osmosacademy / vr-passport

Virtual Reality Campaign
GNU General Public License v3.0
17 stars 10 forks source link

360 degree bubbles and first level #32

Open peterwilkinson opened 8 years ago

peterwilkinson commented 8 years ago

Establish orientation using 360 degree bubbles to fill on air and start the first level generation.

geoffsalmon commented 8 years ago

Could use a particle system to draw the bubbles (here's an example of bubbles in a particle system https://www.youtube.com/watch?v=H5HD4n13N5M). Doubt the gaze ray cast will work with the particle system though. Seems there is a way to get a callback/event when particles hit a collider, so could create an invisible collider cylinder or similar long shape aligned with the cameras direction vector and then detect when bubbles hit that, remove the particle, and record the vector between camera and particle.

Does collecting the particle collection locations give us a rough idea of the user's centre orientation and comfortable range of movement? How will other parts of the game adapt to these settings?

SamirSangani commented 8 years ago

Added a bubble test scene.

I believe we can have the origin of the particle system distributed in a systematic way so as to cover the whole sphere (every 30 degrees or so). We can place a cube (mesh renderer disabled) at the origin of the particle system so that we can use the vision script directly with it.

I have made the life of the bubbles in such a way that some of them burst before they reach while some bounce against the camera which feels like the player is collecting them. I think we should have a predetermined amount of time for the collection (so we do not really need to have a logic of colliders hitting or actually collecting the bubbles). After that preset amount of time we determine the location based on the users current location and the average distance of the cube that had higher vision scores.

peterwilkinson commented 8 years ago

The bubbles look fantastic. Ya if they can be arranged it'll completely set up the effect and calibration. I have the gaze working alright, I can test it on the bubbles to see how they interact.

SamirSangani commented 8 years ago

I have just finished the script that distributes the bubble emitters around a sphere. For now they are all programmed to look at the position of the camera. Will send a pull request in a few minutes.

------ Original Message ------ From: "Peter Wilkinson" notifications@github.com To: "osmosacademy/vr-campaign" vr-campaign@noreply.github.com Cc: "SamirSangani" samir.sangani@gmail.com Sent: 3/26/2016 11:41:02 PM Subject: Re: [vr-campaign] 360 degree bubbles and first level (#32)

The bubbles look fantastic. Ya if they can be arranged it'll completely set up the effect and calibration. I have the gaze working alright, I can test it on the bubbles to see how they interact.

— You are receiving this because you were assigned. Reply to this email directly or view it on GitHub

SamirSangani commented 8 years ago

Update the sphere distribution code. Cubes are instantiated at evenly spaced positions in a sphere and the bubble emitters are attached to those cubes with the particle emitters looking at camera. We will have to play around with the particle system a bit based on the sphere size. This way we can now track how long the player looks at which cube(s) and assign the start position accordingly.

peterwilkinson commented 8 years ago

Its great work, and fast work! It gets the bubbles going all the way around the user. I'm going to test an idea to see if the bubbles can be pulsing in a fixed position, popped on the users view (trying with the reticle), then regenerated in place. I'll experiment on a branch with it and see how it behaves in a few ways, just to see the different ways to interact with it. Very nice! UPDATE: trying something that looks like this... screen shot 2016-03-27 at 1 00 32 am

peterwilkinson commented 8 years ago

Seems raytracing will be an issue, so the recommended workaround I saw was using prefabs and emitting it (or just spawning it into shape). I guess we can get more control that way, and can get an animation going on the prefab itself for popping, etc. Its pretty cool though with the bubble particles and we can probably use them in the tunnel (like in Finding Nemo in the 'EAC' scene) and in other places like the coral.

SamirSangani commented 8 years ago

I am a bit confused. Are you planning on doing the tracing of the bubbles itself? I think it would be more economical to trace the cubes (or any object that can be placed at the source of bubbles). This way you are only tracing a few selected objects and determining your gaze angle from them. I guess the bubbles are just a way to make it look ecological and give them a sense of collecting air.

------ Original Message ------ From: "Peter Wilkinson" notifications@github.com To: "osmosacademy/vr-campaign" vr-campaign@noreply.github.com Cc: "SamirSangani" samir.sangani@gmail.com Sent: 3/27/2016 1:12:28 AM Subject: Re: [vr-campaign] 360 degree bubbles and first level (#32)

Seems raytracing will be an issue, so the recommended workaround I saw was using prefabs and emitting it (or just spawning it into shape). I guess we can get more control that way, and can get an animation going on the prefab itself for popping, etc. Its pretty cool though with the bubble particles and we can probably use them in the tunnel (like in Finding Nemo in the 'EAC' scene) and in other places like the coral.

— You are receiving this because you were assigned. Reply to this email directly or view it on GitHub

peterwilkinson commented 8 years ago

I know what you mean. What ended up happening was the gaze script was giving me trouble on the cardboard and with the fish, so I went with cardboards own raytrace and reticle, which worked fine on the fish school and other objects. But cardboards reticle and raytrace don't have a nearby property, just on or off target. Thats why I was thinking more coverage.

SamirSangani commented 8 years ago

One way to do the orientation and start position would be to

------ Original Message ------ From: "Peter Wilkinson" notifications@github.com To: "osmosacademy/vr-campaign" vr-campaign@noreply.github.com Cc: "SamirSangani" samir.sangani@gmail.com Sent: 3/27/2016 1:44:32 AM Subject: Re: [vr-campaign] 360 degree bubbles and first level (#32)

I know what you mean. What ended up happening was the gaze script was giving me trouble on the cardboard and with the fish, so I went with cardboards own raytrace and reticle, which worked fine on the fish school and other objects. But cardboards reticle and raytrace don't have a nearby property, just on or off target. Thats why I was thinking more coverage.

— You are receiving this because you were assigned. Reply to this email directly or view it on GitHub

peterwilkinson commented 8 years ago

I was thinking about it behaving like popping balloons or bubble wrap, except it can be continually popped with same changes. I did a test scene and its working, just missing features. You can check it out on the master branch (my 'for' loops and anchors are pretty sloppy, but it did the trick). I got the cardboard code for the reticle more abstracted into the main scripts folder, and put a new reticle prefab in a created prefabs folder.

SamirSangani commented 8 years ago

Really sorry for the delay, could not work on it due to a few university commitments. I looked at the test scene and it make more sense now. You could still use the distribution code to generate these sphere bubbles around a large sphere and run the code. Is the octopus there for a reason, are they supposed to focus on it? Great job! Will try and pitch in the evenings as much as I can over next week as it is a full work week.

Zulban commented 8 years ago

Cool, I'll be able to put in some time tonight and tomorrow (on other issues).

Personally I don't think this is high priority at all. But for the long term project it looks like some great work and some cool looking bubbles :)

peterwilkinson commented 8 years ago

I understand. Without orientation though, the target users will have a hard time playing and enjoying the experience. The bubbles help with the air supply metaphor, game start, and orientation (done by not creating a preferred orientation, but going on the users preference...for example, when they are laying down and looking up at the ceiling, which is possible, even for casual players).

SamirSangani commented 8 years ago

One way to cheat this would be to collect bubbles by making a lot of them stick on the camera so that you can use the Recenter() command after a preset amount of time and start the game by disabling the bubbles. This way the user will not realize that the coral reef was moved (since their view is blocked by all the bubbles on the camera).

peterwilkinson commented 8 years ago

Yes, a little bit of magic under the bubble covers :)