Terrains.

Blitz3D Forums/Blitz3D Beginners Area/Terrains.

Kenshin Yurihara(Posted 2010) [#1]
I return with my failure of questions.

Alright so the Blitz3D terrain system is great and all, but theres no way to save it to a nice file people can hold on their drives and load it. Plus its has its own little kinks and bugs like everything does, anyway.

I've been figuring of a way to create a tile like, system. I figured using 5 Vertices and 4 Triangles to create a "plain" like effect and using the vertices to rise and lower that "piece" of the terrain would be the best way to go and use types to write and store all of this(Maybe Banks too).


Right now since I'm a failure in 3D I'm just having trouble getting the camera to work with me(darn you camera!). After I fix that later when I get a chance, I'll check out the performance of just that then go from there.

On the other hand I was wondering if you guys had any other suggestions or ideas on about how to go about this as I am currently worried about performance more then anything.


stayne(Posted 2010) [#2]
Not sure what you mean by not able to save the terrain files. The Blitz3D terrain system uses heightmaps - which are files that can be stored. It would help if you posted the rest of the issues you are having with the terrain system.


Kenshin Yurihara(Posted 2010) [#3]
Well ya see my good freind, I was refering to saving without using heightmaps, but now that I think about it, I guess I could just use height map...hmm...so many questions goin through my head.

I didn't want to use heightmaps because Multiplayer wise, those would just editable, unless I use them from the server side.

Last edited 2010


Yasha(Posted 2010) [#4]
those would just editable, unless I use them from the server side


Standard rule for multiplayer is that the client only controls art and rendering, while the server does all the real work - if the player edits the heightmap, they'll just find themselves very confused as their Y position no longer appears to match up with the floor! There's never any good reason to let clients control game logic - it not only makes cheating easier, you'll also find it's near-impossible to synchronise properly.

Take a look here for some rationale and tips:
http://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
http://developer.valvesoftware.com/wiki/Physics_Entities_on_Server_%26_Client
http://developer.valvesoftware.com/wiki/Latency_Compensating_Methods_in_Client/Server_In-game_Protocol_Design_and_Optimization


Kenshin Yurihara(Posted 2010) [#5]
Well more so I knew that, but I don't want them to be able to screw around with it at all, but then again, I guess I can just use some work arounds.

Also I love Valve's tips, but God do I hate their messy source code.


D4NM4N(Posted 2010) [#6]
You don't actually need to save as a heightmap, you can also save in a numeric table (the simplest being a CSV text file).
To be honest these days with computing power the way it is most people use a mesh for a terrain (or a whole matrix of meshes, "terrain blocks" if you like), its simple to do and offers a lot more.. possibilities than those the blitz dynamic lod terrain system does. (like multiple textures, dynamic block loading etc...)

Last edited 2010


jfk EO-11110(Posted 2010) [#7]
If you want to prevent people from editing the heightmap BMP then you probably should encrypt the heightmap. If you don't use Blitz Terrains anyway then you may load the encrypted file to a bank, then decrypt it and use the data for your Vertey Y settings in your mesh terrain. You could also use an EXE packer such as Molebox that can embed your files, including BMPs etc., in your EXE file, encrypted if you like.

A Meshbased terrain should be broken up in clusters IMHO, each one with no more than 32000 triangles and about 40000 Vertices, for max compatibility (more than 64k won't render at all). you may also use much smaller clusters, eg. 5000 Triangles only, so there is plenty space for vegetation etc. Camerarange should be as low as possible, but if you really need an open field with a view from one mountain to another, then I would suggest to imlpement a LOD system. You can easily do that while you're creating your Terrain Meshes.


Kenshin Yurihara(Posted 2010) [#8]
I was kinda thinking alone the mesh terrain idea.

I know computing power can handle a lot these days, but I'm still worried about lag. More so because, I'm a perfectionist most of the time(which is why I don't finish a LOT)

So since I'm new to this whole area.

Is there any articles or information on how mesh terrains and/or LOD works?

Alright, I think I got the concept now, I just gotta do it.

Thanks guys.

Last edited 2010

Last edited 2010


Kenshin Yurihara(Posted 2010) [#9]
Oh wow, I'm so lame, I got this figure out.

Thanks again for the ideas guys.

Last edited 2010