Where to go from here.
by Bill Vee · 07/10/2013 (9:35 am) · 2 comments
I still am not sure what the future of my project will be.
I thought it would be nice to release a kinda tech demo of what I have so far.
There is a lot not finished with the terrain system.
Here is a list of things it can do.
It will load a 640 X 640 X 160 terrain "voxel" generated from a user defined seed that can be edited in real time. The only way to change the terrain is to use the terraformer "gun" or the grenade launcher.
The terraformer will allow you to make fine adjustments while the grenade launcher will blast a very large hole in the terrain.
To make changes to how the terraformer adjusts the terrain do a search in the cs files for AdjustPointInVolume and you should get an idea of what it is doing.
Basically there are 3 parameters for AdjustPointInVolume.
The first is the point where the adjustment will be. It is a X Y Z position of the point in the terrain.
The second is the amount. This should be a number between 255 and -255.
Positive values add to the terrain and negative values will remove terrain.
The last is the radius of the adjustment. As an example if you set the radius to 2 the adjustment will be a 5 X 5 X 5 adjustment with the xyz position you entered as its center.
The terrain uses a tri-planar shader to paint the terrain.
There is still a lot of work I would like to do to this shader.
Rigth now it just uses 3 textures to paint the terrain.
1 for the top and bottom textures and 2 for the sides.
You can search the cs files for VoxelTerrainMat to locate the CustomMaterial definition to change the textures to use.
I have the renderable area limited to just the area around where you will spawn.
I have been working on the update code for this and it is not up to par just yet so just the spawn area will render for now.
The collision system will work beyond what is rendered. What this means is the server side collision is calculated on the fly and is not limited to what any client can see.
As chunks are generated for either rendering or collision they are saved to a compressed file. One set for the client and one set for the server.
This allows for faster loading the next time a chunk is needed for processing.
One thing to note is the first time you load a level it will take a minute or two to load.
This is due to T3D generating the needed dts files for the models.
After this first time load the demo should load a lot quicker from then on.
There are a few issues I am aware of like raycasting can fail to hit the terrain when you can clearly see it should have.
And there are times when 2 connected clients voxel data will be out of sync. To fix this simply exit the level and reload it to have it resync the data.
I haven't coded a gui to reload a level that you have changed the world name or the seed on yet.
If you need to reload a level you changed the name on, simply re-enter the name and the seed you used in the level options gui and it will reload it correctly.
I am sure there are a lot of things I forgot to mention so if you have a question just ask me.
Demo
As for the future of this project I simply don't know yet.
I really enjoy coding this project and won't quit it all together.
I thought it would be nice to release a kinda tech demo of what I have so far.
There is a lot not finished with the terrain system.
Here is a list of things it can do.
It will load a 640 X 640 X 160 terrain "voxel" generated from a user defined seed that can be edited in real time. The only way to change the terrain is to use the terraformer "gun" or the grenade launcher.
The terraformer will allow you to make fine adjustments while the grenade launcher will blast a very large hole in the terrain.
To make changes to how the terraformer adjusts the terrain do a search in the cs files for AdjustPointInVolume and you should get an idea of what it is doing.
Basically there are 3 parameters for AdjustPointInVolume.
The first is the point where the adjustment will be. It is a X Y Z position of the point in the terrain.
The second is the amount. This should be a number between 255 and -255.
Positive values add to the terrain and negative values will remove terrain.
The last is the radius of the adjustment. As an example if you set the radius to 2 the adjustment will be a 5 X 5 X 5 adjustment with the xyz position you entered as its center.
The terrain uses a tri-planar shader to paint the terrain.
There is still a lot of work I would like to do to this shader.
Rigth now it just uses 3 textures to paint the terrain.
1 for the top and bottom textures and 2 for the sides.
You can search the cs files for VoxelTerrainMat to locate the CustomMaterial definition to change the textures to use.
I have the renderable area limited to just the area around where you will spawn.
I have been working on the update code for this and it is not up to par just yet so just the spawn area will render for now.
The collision system will work beyond what is rendered. What this means is the server side collision is calculated on the fly and is not limited to what any client can see.
As chunks are generated for either rendering or collision they are saved to a compressed file. One set for the client and one set for the server.
This allows for faster loading the next time a chunk is needed for processing.
One thing to note is the first time you load a level it will take a minute or two to load.
This is due to T3D generating the needed dts files for the models.
After this first time load the demo should load a lot quicker from then on.
There are a few issues I am aware of like raycasting can fail to hit the terrain when you can clearly see it should have.
And there are times when 2 connected clients voxel data will be out of sync. To fix this simply exit the level and reload it to have it resync the data.
I haven't coded a gui to reload a level that you have changed the world name or the seed on yet.
If you need to reload a level you changed the name on, simply re-enter the name and the seed you used in the level options gui and it will reload it correctly.
I am sure there are a lot of things I forgot to mention so if you have a question just ask me.
Demo
As for the future of this project I simply don't know yet.
I really enjoy coding this project and won't quit it all together.

Torque Owner Demolishun
DemolishunConsulting Rocks!
Whatever you decide let me know if I can help. You have really inspired me with some new possibilities with T3D. Thanks for that.