top of page
Search
Writer's pictureGabriel Priem

Unity Terrain Generation w/Music Pt. I

First Roadblock, woohoo!


I'm going to rubber-duck this post a bit and discuss some of the stuff that's going on. I shifted to applying some of the values acquired from my audio analysis script to the terrain generation script. Specifically, the function that updates the mesh vertices y-coordinates, giving height/depth to the terrain. Instead of using the animation curve and values set up in the tutorial, I am rotating through all of the collective band values in the frequency band array from the audio script.


There are eight frequency bands, each encompassing a certain range of frequencies organized by the power of two starting at about 20Hz (I think).


I started with a simple experiment: plugging in the values of these frequency bands into the UpdateMeshVertices method to edit the vertices' heights. I spent a while trying to get all the errors worked out, setting up the references I needed for the scripts to talk to each other without making critical compiler errors. Once I got the critical errors out of the way, I realized that for some reason when the heightMap variable goes into the UpdateMeshVertices function, it is always null for some reason. Initial values are never assigned. It took a while to reach this point so I'm going to continue debugging on Friday most likely, as I need most of tomorrow to catch up on work for my GSAS capstone project.




1 view0 comments

Recent Posts

See All

Final Reflection Post

My piece is going through the last bit of fine-tuning as I prepare the visualizer for a presentation. Today I will be organizing...

Music Composition Pt. III

With this latest edition of the musical adjunct to my music visualizer, I round out the piece with different tones and chords that are...

Music Composition Pt. II

This addition of musical material includes expansion of the ambient themes. I am trying to make it at least slightly interesting to...

Comentarios


Post: Blog2_Post
bottom of page