Adding atmosphere and a mini-map

posted in The Berg for project The Berg
Published September 15, 2018
Advertisement

After some extensive refactoring of my messy code (it's still a mess but at least it's refactored mess now) I decided to add a bit of atmosphere to the game by adding some fog... which also, quite conveniently, hides the edge of the terrain geometry so you don't see it 'popping' in.  ?

I also built a mini-map class to display in the top-left corner of the screen.  Again, easier said than done.  I had no idea how to go about creating HUD elements with ThreeJS... no... idea!  I mean, I've literally only just picked up ThreeJS so I have very little idea what I'm doing with it (disclaimer: I did once upon a time spend considerable time with XNA and the Sunburn rendering engine so I'm not a total noob to 3D rendering).  I eventually decided to create a separate ThreeJS renderer, scene and all that gubbins just to render the mini-map... possible overkill?  Yeah well, so what... it works.

19832201_Mini-mapandfog.PNG.c94fcc2053fece84c8ee257ccf151246.PNG

Next I need to make the player/camera follow the terrain.... aww what?... how does that work when using a displacement shader (??!?)... the terrain vertices ain't baked in man!  Next blog....

1 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement