Some code
Some shader code
And a video of the skybox
[youtube http://www.youtube.com/watch?v=NuD57Grh874]
]]>
Some reading in code
And a video of it in action
[youtube http://www.youtube.com/watch?v=ZWehpoXo7Pc]
Fist I implemented two new methods in ObjUtilities that created an elevation map of the terrain’s Y values and a method that actually found the needed Y value based on the inputed X and Z values. Then I added a method to camera class that sets the actual camera’s elevation based on the retrieved value.
A snippet of my new methods in ObjUtilities
A snippet of new methods in my camera class
And a video of the camera adjusting to terrain elevation in action.
[youtube http://www.youtube.com/watch?v=lgclNRKAtao&w=560&h=315]
This created an obj output file that I just read in as any other obj. I had to play with the camera coordinates to get it aligned with the terrain as well.
A picture of the algorithm code
A picture of the terrain obj file
And a video of the terrain…
[youtube http://www.youtube.com/watch?v=2cziwrWt9t0]
being video bombed.
]]>
The only thing I added was the ability to parse an obj file for the faces and vertices, as opposed to having to count them by hand.
A little code
A little star
And a video
[youtube http://www.youtube.com/watch?v=6S6JpBBtdCc]
]]>