Welcome Guest [Log In] [Register]






Shoot a firework rocket ~ Winners!
Make a forum zoo!

Welcome to The Round Table. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
Current Projects
Topic Started: Feb 15 2014, 07:38 AM (241,620 Views)
HENDRIX
Member Avatar
-retired-

There we go!

Posted Image
Online Profile Goto Top
 
tigris115
Member Avatar


That is some crazy voodoo
Offline Profile Goto Top
 
Posted Image Narukota
Member Avatar
blah

Fantastic job, Hendrix! Maybe you could show me how to do it sometime or make a tutorial? I'm really interested in this.


Using this, could you rescale the verts or whatever so the map can display the biome textures at a smaller size, thus creating more detail?
Edited by Narukota, Jun 22 2016, 02:46 PM.
Offline Profile Goto Top
 
HENDRIX
Member Avatar
-retired-

Maybe, yet unlikely; I don't know enough about the map format yet. Because the terrain is stored as a sequence of height values, which is then chopped up by the engine to create the mesh, the positions of the vertices are not fixed and I doubt it has UV coordinates in the traditional sense. I assume they are assigned by the engine in the same step as the X and Y positions. Maybe changing the header "resolution" values works, but so far that only yielded crashes. I have not quite understood what they all do.
Most of each vertex is undecoded. The only certain bit is the height value. And we know that at least one byte indexes the biome, but there might be more, or some sort of interpolation between several. I also assume that water and conservation areas are encoded in the DAT files.
Now decoding should be a lot easier, because the byte values can be drawn as vertex groups for visual inspection. Looking at vgroups on the mesh is much easier than staring at raw bytes.

The blend file is available in my resources > decoding folder, just change the path in the script to a DAT file on your pc and hit alt+p to run.
Online Profile Goto Top
 
HENDRIX
Member Avatar
-retired-

Decoded a lot of the bytes visually:

#0,1,2,3 = height
#4, 5, 6, 7, 8 = fail
#9,10,11 = 0
#12 = 0,1 dirt
#13 = 0,1 shore
#14,15,16=0
#17=0,1 outside zoobounds + Water? Protected areas!
#18,19 = 0
#20,21, fail
#22,23 = 0
#24,25,26 = fail
#27 = 0,1 conservation area
#28,29 fail

byte #27 visualized: the conservation area:
Posted Image
Online Profile Goto Top
 
cougarfan12
Member Avatar
Fan of cougars 2018

I have a question , what is this?
Online Profile Goto Top
 
HENDRIX
Member Avatar
-retired-

It's a way to figure out how map data is stored and eventually to be able to modify it without using ZT2, on a more advanced level.
Online Profile Goto Top
 
Reptileink
Member Avatar
(Feral Designs/DeepSix)

Posted Image

This is some magic voodoo. I don't know how you do it! Nice work!
Offline Profile Goto Top
 
Megraptor
No Avatar


How would this relate to map size? I know there's been issues with larger than what the game provided maps. Could this potentially help with those issues?
Offline Profile Goto Top
 
HENDRIX
Member Avatar
-retired-

Larger maps will always be problematic because they just contain too much data for the game to handle well. It might allow for non-quadratic maps and will definitely enable us to create and modify conservation areas.
Edited by HENDRIX, Jun 23 2016, 05:55 AM.
Online Profile Goto Top
 
HENDRIX
Member Avatar
-retired-

Changed the algorithm a bit so everything is decoded and sorted on the fly based on this format string:
["00_f_height","04_f","08_b_biome","09_b","10_b","11_b","12_b_dirt","13_b_shore","14_b","15_b","16_b","17_b_protected","18_b","19_b","20_b_intersection","21_b","22_b","23_b","24_b","25_b","26_b_cliff","27_b_conservation","28_b_tankwall"]

As you can see I figured out a few more bytes!
Also performance has improved considerably with the new algorithm.
Online Profile Goto Top
 
Celious
Member Avatar


Wow !! All of this really is impressive !! Great job !!
Offline Profile Goto Top
 
Thom
Member Avatar
Master Of Quack Fu

Wow that's amazing HENDRIX, great work! :D
Online Profile Goto Top
 
Lazardi
Member Avatar


A blender map editor... wow.

Impressive job DM, as ever. I'm looking forward to see more! :)
Edited by Lazardi, Jun 23 2016, 01:34 PM.
Offline Profile Goto Top
 
HENDRIX
Member Avatar
-retired-

Proof-of-concept map editor is done! Importer and exporter work well enough to sculpt maps in blender and manipulate all the extra data:

Posted Image

I just put the edited coastalzoojr dat into a saved game, which is why the water is gone and everything looks a little weird.
Interestingly enough, I noticed that the water in the zoo plan is stored in the dat file, while the actual water is not.
Scratch that, the original dat includes the water but so far I have ignored the end of the file. It seems like that carries the water data.
Edited by HENDRIX, Jun 23 2016, 06:01 PM.
Online Profile Goto Top
 
2 users reading this topic (2 Guests and 0 Anonymous)
Go to Next Page
« Previous Topic · Individual Projects · Next Topic »
Locked Topic