Slopes and Lighting
Blokworld :: Development :: Status
Page 1 of 1
Slopes and Lighting
Just a quick heads up on what i'm currently working on...
I decided that slopes / shaped blocks needs some attention.
I knew the basic technique was sound and it could be integrated well with the pixel light shaders.
But, i was never totally happy with three areas; lighting, collisions, and method of building.
Well, while i've been working on various bits and bobs i've had several ideas for each of the three and am currently implementing them.
The next release should have the following improvements.
Sloped terrain will be the only option.
Lighting will respect slopes. This means you can have triangular windows into your house if you want. It will also clean up the light in internal corners of buildings with the opposite external block empty.
I already have this working very well and am currently polishing it off. It also allows you to have sloped blocks in walls but not have any light bleeding through. In other words, i haven't taken the easy way out and just made sloped blocks act like windows.
There will be collision with sloped objects. I am using a sub-voxel model here so that sloped blocks act as if they are made of smaller cubes.
There will be a decent method of building sloped objects, involving 2 selections only when you need both slope and material to change. Basically, if you want to build a pyramid from sandstone, you will only have to select sandstone, go to the slope menu and then start building. A mousewheel move will change between slopes until you leave the slope menu.
I would also like an auto-build feature for slopes where the game selects the one it reckons you want, but i know this may not always be what the player actually wants.
Oh, and i've written a tool that allows me to import models and calculate which faces to draw in each situation.
I had previoulsy lashed together a tool that worked with hardcoded vertices for slopes (its output is what the current engine uses), but it was limited in what it can do.
EG, the current tree trunk blocks have a top and bottom face consisting of something like 18 triangles each.
These faces are drawn regardless if they are obscured or not. My new tool means the engine knows not to draw these faces if they are obscured.
For a five block tall tree trunk sitting on the ground this means i only now need to draw 18 triangles (for the top face of the top block), where i was drawing 180 triangles previously.
For a forest of 100 trees, this makes a hell of a difference.
I've uploaded an image of my testbed showing the slope lighting in action.
The window at the far wall is letting light through as you would expect, but the left hand wall (which has sloped blocks all the way along) is not letting light in, again, as you would expect.
https://blokworld.forumotion.co.uk/gallery/General-Images/Improved-Slope-Lighting-pic_15.htm
I decided that slopes / shaped blocks needs some attention.
I knew the basic technique was sound and it could be integrated well with the pixel light shaders.
But, i was never totally happy with three areas; lighting, collisions, and method of building.
Well, while i've been working on various bits and bobs i've had several ideas for each of the three and am currently implementing them.
The next release should have the following improvements.
Sloped terrain will be the only option.
Lighting will respect slopes. This means you can have triangular windows into your house if you want. It will also clean up the light in internal corners of buildings with the opposite external block empty.
I already have this working very well and am currently polishing it off. It also allows you to have sloped blocks in walls but not have any light bleeding through. In other words, i haven't taken the easy way out and just made sloped blocks act like windows.
There will be collision with sloped objects. I am using a sub-voxel model here so that sloped blocks act as if they are made of smaller cubes.
There will be a decent method of building sloped objects, involving 2 selections only when you need both slope and material to change. Basically, if you want to build a pyramid from sandstone, you will only have to select sandstone, go to the slope menu and then start building. A mousewheel move will change between slopes until you leave the slope menu.
I would also like an auto-build feature for slopes where the game selects the one it reckons you want, but i know this may not always be what the player actually wants.
Oh, and i've written a tool that allows me to import models and calculate which faces to draw in each situation.
I had previoulsy lashed together a tool that worked with hardcoded vertices for slopes (its output is what the current engine uses), but it was limited in what it can do.
EG, the current tree trunk blocks have a top and bottom face consisting of something like 18 triangles each.
These faces are drawn regardless if they are obscured or not. My new tool means the engine knows not to draw these faces if they are obscured.
For a five block tall tree trunk sitting on the ground this means i only now need to draw 18 triangles (for the top face of the top block), where i was drawing 180 triangles previously.
For a forest of 100 trees, this makes a hell of a difference.
I've uploaded an image of my testbed showing the slope lighting in action.
The window at the far wall is letting light through as you would expect, but the left hand wall (which has sloped blocks all the way along) is not letting light in, again, as you would expect.
https://blokworld.forumotion.co.uk/gallery/General-Images/Improved-Slope-Lighting-pic_15.htm
Slaihne- Posts : 264
Join date : 2011-03-17
Age : 56
Blokworld :: Development :: Status
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Fri Jul 01, 2016 7:25 am by croxxx
» Source?
Thu Jul 12, 2012 9:55 am by raistlinthewiz
» Version Available (Take 2)
Sat Jun 09, 2012 3:23 am by kamild1996
» Terrain Rendering Bug
Thu May 17, 2012 8:07 am by sackboy789
» Mystery Block!
Thu Mar 29, 2012 4:42 am by Corvin73
» Your procedural tree/plant seeding technique?
Sat Mar 24, 2012 3:10 am by Slaihne
» Voxeliq project
Wed Mar 07, 2012 4:25 am by raistlinthewiz
» What is a Tech-Test?
Wed Jan 18, 2012 12:32 pm by joeydmars
» Images
Fri Jan 06, 2012 6:02 am by croxxx