So I managed to complete a scene graph, create a geometry shader and pixel shader with animations.
Most of the assignment was taken up with fixing errors and things not working.
I managed to get the tree loading in but not into the real project.
There isn’t any terrain generation yet or lights. These are still to come.
For the lava I used 2 textures, 1 is the black rocks on top and under that there’s 2 of the same texture that both move in opposite directions on the Y axis and at the same time along the X axis. A time variable to move the UV along the X axis for the top lava.
At the same time I used 3 sine waves over time to morph the lava geometry to make it appear like waves.
For the GLOW I made a screen texture and researched an easy-to-use glow
filter. The geometry shader was a simple flat quad and the pixel shader used a formula to determine the brightness of the pixels around it and made it glow. For performance, the glow only applies to every 4th pixel:
The way I have it now is so the Meshes have Materials.
I did this because you can’t have a material without a mesh, and it makes more sense to have a mesh containing a material rather than have this random material flying around.
That’s right, children. Witness my tree with normal maps and specular!
Next step: generated ground.
GENERATED GROUND
I changed my mind, so now I’ll be doing the “midpoint displacement” method (maybe “Diamond-square algorithm” because Wikipedia says it’s better).
The Idea I have is to combine the perlin noise function with the diamond method to make a hill and then add the Volcano in the middle of this. Maybe add water over the middle part.
Here’s a diagram:
So if you imagine the land bumps up over the water surface, and the lava is just above the water. Hopefully, the volcano height and lava hEight will be right enough that it doesn’t stick out of the edges of the volcano.
This changes my original idea of the volcano going in under the height of the lava. Now the lava will just need to be above the water a bit and be only the radius of the volcano.
I might be just picky, or maybe I spend too much time screwing around in games trying to figure out how they made stuff.
I do notice that every time I see a bug in a game, it reveales some secrets on how it was made.
So one of my last posts was sort of about billboarding, and I found bad billboarding in Borderlands 2.
Herpaderrrrrrrrrr.
My brain (poorly) converted into words while learning game programming