- Home /
Moving colorizing ground/floor to work with mucic
Hi all. This is sort of two related questions that i hope you can help me with..
My interest is in using unity as the virtual arena in which to host a virtual reality (oculus rift) music video experience.
To be clear.. i am not making a game as such ... I am creating an arena in which when a user puts on their VR HMD a song will play. during that time the person can move around and interact with certain elements of the environment. other elements will trigger at certain points in the song, other objects may move in time to the music using the spectrum analizer.
if i could paint the picture of what i would ideally like to do, I would be most grateful if any of you could advise me on how i might approach such a thing....
imagine an area of potentially uneven ground... mildly rolling hills. imagine the surface is completely tiled.
objective 1.... at certain points in the song - say on a deep bass note or lingering crash sound, the sound causes the tiled ground to move into a large wave or series of waves to advance towards the user - much like a wave moving acrosss the ocean, only this time its the floor / ground area in the game. The use will see the 'ground wave' approach them and as the wave passes through the ground they are standing on, they will move up and down accordingly. ideally different ground waves could emanate from different areas of the ground as the result of different triggers. thats it .. simple really! lol
im pretty new to unity so i dont even know how i would approach this... a huge mesh layed out across the game area with cubes attached? thats about as far as i can think lol.
Objective2: if objective1 was possible, it would then be awesome to be able to change the colour of the 'wave cubes' / wave-mesh depending on how high they are on the wave. for example, if the floor is say black or dark.. as the cubes/floor object rises on the wave it begins to change colour getting brighter, changing colour etc the higher it rises on the wave, the going back to black as the wave passes. assuming the wave is as wide as the floor space the user would see a rolling undulating line of colour moving across the floor towards them along with the wave.
As a total extra bonus, if this can be done with ground / flooring, i assume it would be possible to transfer the effects to walls too?
anyhoo, there you have it. ambitious? possible even? i dont know, but it would be awesome if anyone could give me some guidance on how i might approach this.
if i manage to get it done ill of course post all up online freely so that others can use and learn from.
Regards
Michael
PS: if you have any working / half working examples for download, that could be expanded upon, that would be awesome too. :)
Answer by OusedGames · Oct 19, 2016 at 01:38 AM
About the color:
You just need to access the object material by script and change the color!
About the objects:
Create cubes on the floor
OnTriggerEnter (player entered the collider of a floor tile)
Do whatever you whant with the object
Good lucky buddy
Answer by chaeljc · Oct 19, 2016 at 06:31 PM
hi there OusedGames. Many thanks for your speedly reply. Im very new to unity and game design, could i therefore clarify a couple of points in your reply...
RE: Create cubes on the floor...
Firstly - is this a valid approach for simulating a large tiled surface that you want to move in response to musical beats?
secodly - have these cubes to be attached / anchored to anything (a mesh? i've no idea lol) to stop them moving location, for example sliding down a hill, or to ensure they return to the same spot on the ground when moved by music beats?
many thanks
kind regards
michael
Yeah, it is a good approach!
Every cube will have a script that will do something
You can change colors and move by script
Or
Create an animation
I would recommend you watching some youtube videos! - But do not go to especific like "VR Unity music tutorial" - Search for basics and then learn and move to the next point
Good luck buddy