PlayMaker Help & Tips > VR Help

Camera Fade Out / Fade In works but not in VR (Vive) Help!

(1/2) > >>

iain2:
I have a scene which has four ordinary static cameras. An empty object has a playmaker script attached which moves the viewpoint between the cameras. Its quite simple. You start at camera 1 and looking through the Vive HMD can look around as normal. Then using Camera Fade Out action after 30 seconds you fade up to white over 2 seconds, switch to camera 2 and Fade In from white to the scene over 2 seconds, again viewing from that new camera 2 position for 30 seconds. Same then for cameras 3 and 4 and then it loops back to camera 1. This works fine when viewed on the monitor but in VR the fades are ignored and its just a sharp camera cut. There are solutions of course but its very inconvenient and wondered if there is a fix coming or a very simple solution I am missing as I am new to Playmaker and not a programmer. (A bit much that VR Tools are out but no update in the manual for actions saying where relevant something like: "***Note: Does not work in VR***" Makes me wonder what else I will come a cropper with) Help!

jeanfabre:
Hi,

 Fading is done using the old GUI, you should move away from this and use your own fading solution using a plane or a UI element and animate the alpha with it.

 Bye,

 Jean

iain2:
Thanks. I am new to Playmaker so apologies if this is a simplistic question. Can I control the Image Effects Vignette level using a Playmaker FSM? This would do the same as a fade in and out if if could be and extreme full vignette from zero vignette? I was also thinking of using this in a similar way to Google EarthVRs solution to solving motion sickness when moving ?? (Maybe point me to a tutorial that lets you control Components parameters over time as I can't see one ?) Thanks

tcmeric:
You can use an asset like Beautify. It is 35$, but it does work with single pass rendering and I have personally tested it with steam VR. Its performance hit is fairly low (depending on which filter you are using). It also seems to not have any issues with the lab renderer. It has vignette with various options that can be set and changed during run time.

Put the script on the main camera eye of the VR rig. Create a new FSM on an object. Create a new state. Drag and drop the script FROM the main camera eye (not from the project browser), onto the state (where you normally have all your actions setup). You will then get a get/set option for the script. Choose set. Look for vignette. Set the bool to true or false as necessary to turn on and off the vignette.

Create a mask for the vignette (has one by default but you can change it from the inspector easy). Turn up and down the alpha of the black color to make it cover more and more of the screen and eventually fade completely to black.

I also use playmaker to disable the script when not in use to save resources.

As for the playmaker action to use over time. You could create a look with a wait state. Ie, -5 alpha, wait .1 seconds, repeat. Then do a int check to see when it reaches -100 and finish. Or look into a int lerp or float lerp.

https://www.assetstore.unity3d.com/en/#!/content/61730

tcmeric:
PS, if you just want a fade to black.

Make a black cube. Make it the child of the eye in the VR rig. Set its location to 0,0,0 and it will be right on your head. Deactivate it and set the alpha to 0 until its needed.

Use playmaker to activate the object when you are ready. Use playmaker to lerp an int on the alpha channel of the black object till it reaches 100. (The screen will be black).

Put the FSM directly on the cube to make it easy. Duplicate cube as necessary and put it over all necessary cameras.

Navigation

[0] Message Index

[#] Next page

Go to full version