Age/Gender: 16, Male
Location: Blacksburg VA
Newgrounds Stats
Whistle Status: Normal
Exp. Points: 550 / 710
Exp. Rank #: 70,318
Voting Pow.: 4.98 votes
BBS Posts: 75 (0.12 per day)
Flash Reviews: 76
Music Reviews: 5
Trophies: 2
Stickers: 0
Entry #24
So I started messing with Unity3d today, and I wrote a nice procedural terrain generation program. It basically creates a 2D array of floats, then subdivides them in a fractal pattern with noise, and then procedurally generates a mesh based on that.
Then I made a lightmap script that will perform a specified number of raycasts on the land, finding the general slope and rendering that to a lightmap.
And lastly, I made a function and a custom shader to compute texture blending based on altitude, render a black and white map of texture transparencies, and use that to combine two different tiling textures seamlessly over the landscape.
I'm working on creating an orthographic projection system so that I can render the shadows of the terrain on objects efficiently. that would basically work by using a multiply shader and altering the vertex color of the geometry of objects in the map. There are a few problems with this however... if an object is airborne, the shadows might still appear. You can see on the top left corner of the picture some error with the lightmap. That part should'nt be shadowed, but it is. I'm still working on it =)
sorry, I just thought it was cool...

The People Have Spoken
2 Comments