Nicole Kennedy Design

Ideation, Creation & Everything In Between

Shaders, Faders & Problem Solving

Plan to work out various problems & Roadblocks – 

Today we had some help from Estrella in order to program functions and capabilities into unity and adventure creator that otherwise would cease to exist. We know what we need from the software but we are restricted by lack of knowledge and the presets that the software and plugins come with by default. Therefore we require some expertise in order to be able to proceed and interpret our custom functionality.

During the course of the week we having been researching and experimenting with various things that we would like to try and have within our virtual reality experience. There were a list of questions that we had created as the experimentation had determined what we wanted to happen but the functionality for it to happen was not yet in place.

Is it possible to fade lights in and out without a key press being required? –

During the week functionality to fade the lights in and out using a script had be added into Unity. However a key press from the user was required to prompt this action and this was a little less than ideal as we cannot ask the participant in the experience to press on “Z” on the keyboard when the lights should fade we need to have control of this not the user therefore this prompts the following question.

Lights fading in and out pressing “Z” on the keyboard. How may we do this using an action? Or is there an alternative way to prompt a light fade?

Further experimentation led us to discover that lights can actually be animated and there are several properties that can be key framed including intensity therefore we can animate the intensity to go from zero to one and vice versa so that we have a light fade.

Screen Shot 2016-03-25 at 12.32.14

Is it possible to have a colour changing light? –  Colour changing light is also possible as with the fade we discovered that as the lights are able to be animated and some more of the properties that can be edited are the Color, Which allows for colour changing/fading lights.

In the following video you can see an example of the light changing colour from red to green as it fades to be turned off. Both of these properties do not have to be animated at the same time you can keyframe just intensity for a fade and color for a colour change.

Object Send Message: Turn On/Off Action Issues – 

As various tests have led me to believe that the action Object Send message : turn on/off action will not function on game objects and object send message : visibility works to only turn off the mesh not the whole object.

At times we will require the full object to be turned off so that the other parameters such as audio source are effected too.  As we not want to turn off Colin’s mesh but for him to still be talking when he perhaps shouldn’t be. The solution to this is to use the action object: enable/disable custom adventure creator action scripted by Estrella.

Opacity Of Colin, How do we approach our Shader Issue – 

At present our shader does not support transparency or have a color property. The shader we are using on Colin is the Depth Kit shader and it does not support the properties that we need to edit in order to support a fade.

Fading the opacity of Colin is not possible as we cannot edit the depth content being created by James Georges script. Adding a transparency shows nothing all the time and adding an alpha does not have an effect. The Solution around this was using a shader on a cube which allowed for transparency.

Using the fade in out Javascript script which fades this cube in and out and when this is placed over Colin it appears to fade him in and out. This is the same technique that would be used in flash or after effects often a box is animated to fade in and out in front of the object it is rare for the object itself to be faded.

We also found out from James George who was back in contact with us that if we wanted the shader to support a fade in and out this would be need a custom shader that would have to be created as it is not possible with the script he has created.

The image below shows the best we were able to get from editing the shaders. At most we got only the shadow of Colin but this was a sudden opaque change shader and then transparent we still did not have the fade that we needed.

Screen Shot 2016-03-24 at 11.27.15

We have recorded some screen captures of what it looks like using the fade in and out script and how we appear to get Colin to fade in and out of the scene.

This video shows a fade in of Colin –

This video shows a fade out of Colin –

Creation Of Adventure Creator Actions & Control Over Fade In & Out Script – 

The fade in/out script has been edited to allow for a period of time over which the object will fade and a check box to decide whether the object is fading in or out.

Now that we have an alternative way to fade Colin in and out we will need control over this function on this script and will need to look into the following things –

How to create adventure creator actions as I will need to be able to call an action to turn this fade in/out script on and off whenever I need it to fade. If not creating an adventure creator action then how do I use a default action to call a custom script and parameters of that script.

Screen Shot 2016-03-25 at 13.07.16

Menu Elements not being displayed within the Oculus – 

Menu elements from adventure creator are not showing and will require testing within the Oculus to see as we make changes if the menu becomes apparent. One thing to check is if there an actionlist maybe being called that is not making use of menus perhaps.

A way around the need for menu’s is to use triggers around doorways that allow the user to enter and exit the experience which will be an alternative to need a menu to navigate back to the intro screen. We have already done research and experiments to determine that triggers function within the experience so this alternative is feasible.

Gaze Integration & Adventure Creator – 

Gaze requires integration with adventure creator. At present Gaze uses a button listener script to call an event of what happens next depending on which button is selected text will be displayed showing “you have selected….” I want to integrate an action/interaction into this script if possible that will also allow an actionlist that will call the relevant scene to be opened based on the users choice with Gaze.

I will require assistance to code this function if possible into the script but I am still looking into alternatives that may make this possible. You can see in the image below that there is an on click event taking place but I would like this event to call an Adventure creator interaction or a custom script were I can change the scene here.

Screen Shot 2016-03-25 at 13.03.09.png

Next Stages – 

In the meantime I need to figure out a few things to let Estrella know if the option to run a custom script in adventure creator still exists and if it does how do we go about adding our own script. The reason we need to figure this out is once we know if adventure creator will support the use of a third party script this then allows us to make our own action that will control the fade in and out of the object in question. Once we have an action like this in place we will have full control over the fading in and out of Colin whenever we need to make these transitions occur.

Reflection & Impact – 

Today I feel totally satisfied that a good amount of progress has been made from all around the team we have all been making breakthroughs and the things we are figuring out is in reflection of our research that we have been maintaining along the way. I feel a sense of relief that we have been able to figure out a lot of the things that have been putting an intense amount of pressure on us. I am glad to feel like we are moving forward and that all of this pain is starting to pay off a little. There is still much more to work out but were getting there and things will start to come together over the next week.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Information

This entry was posted on March 24, 2016 by in Final Year - Major Project and tagged .
%d bloggers like this: