Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

360 degree bubbles and first level #32

Open
peterwilkinson opened this issue Mar 26, 2016 · 16 comments
Open

360 degree bubbles and first level #32

peterwilkinson opened this issue Mar 26, 2016 · 16 comments

Comments

@peterwilkinson
Copy link

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

@Zulban Zulban changed the title Establish Orientation using 360degree bubbles to fill on air and start the first level generation 360 degree bubbles and first level Mar 26, 2016
@geoffsalmon
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Collaborator

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

  • Increase the coverage by increasing the number of points in the bubble
    distribution script. This way you will have more cubes placed across the
    sphere giving you the resolution you need to get the start point. I only
    put 4 to begin with so that everyone could see how the script works, we
    can change this number via the inspector to 20 or 25 so that you have a
    good enough resolution to cover the whole sphere
  • Attach the bubbles emitter to only a selected number of cubes (every
    one in three or four) so that we are not bombarded by particles from
    everywhere.
  • Use OnGazeStart and OnGazeStay (on these cubes) to determine where the
    gaze is for a predetermined amount of time(~5s or so) (we would then
    need to calculate where that cube is placed with respect to cube the
    player is looking at in the current frame, and if they are the same it
    becomes the start position, if not we average the distance and make that
    the start position).

------ 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
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Contributor

Zulban commented Mar 29, 2016

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
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants