Tutorials

How To Create Objects And Maps For Ace Of Spades

full

By Tim Wesoly, developer of Qubicle Constructor
What you need: Qubicle Constructor v1.5+ Master or Voxlap Edition

The ability to import and export file formats related to the Voxlap engine is one of the last features added to Qubicle 1.x. Those new import export routines enable you to create objects and maps for games like Ace Of Spades (AOS) which use the Voxlap engine by Ken Silverman. In this brief tutorial I will explain how to import existing AOS maps and objects and how to prepare and properly export your own works. And I will show you some tricks to keep the overall performance and usibility of Qubicle high.

Importing and exporting

To import files into Qubicle simply drag and drop the corresponding files from your explorer onto Qubicle’s workspace. Or use “File > Import” from the main menu.

To export either use “File > Export All / Selection” from the main menu or the speed buttons on top of the work area. If you use the speed buttons note that if you have selected matrices in your seen only those matrices are exported. If you haven’t select a matrix all matrices are exported.

The different file formats

Currently Qubicle imports VXL, VOX and KV6 files and exports to VXL and VOX.

The KV6 file format is used for objects like guns and player characters. Those objects can be found in your game installation folder under “kv6″.

To create KV6 files you need to use a workaround because you can’t export as KV6 with Qubicle yet. The workaround works like this: Export the object as VOX. Next convert your file from VOX to KV6. This is easily done with Slab6 one of voxlap’s editors. If you don’t have Slab6 already you can download it here. Open your VOX file in Slab6 with “File > Open” and save it as KV6 with “File > Save”. Done.

The second perpose of the VOX file format is importing data created by Poly2Vox. With Poly2Vox you can converte regular meshes into voxel models. You can learn how to do this by reading my tutorial “How To Voxelize 3D Models With Binvox And Poly2Vox”.

The last supported Voxlap file format is VXL. The VXL format is used to store maps. An AOS map is 512 voxels wide and deep and 64 voxels high. Qubicle 1.x wasn’t made to support such large models. The overall performance of Qubicle may drop in model mode and the performance in matrix mode will be very bad if you edit a single matrix of that size. In the following paragraphs I will explain how to bypass this shortcoming.

Working with large models and matrices

Voxel games like AOS or Minecraft only display a certain area around the player to keep the amount of rendered voxels low and the render performace high. Qubicle 1.x doesn’t have this feature, it always renders the complete model and may become slow when models are big. And 512x512x64 is big. Qubicle 2.0 will have no problem with such sizes or even bigger models. But until Qubicle 2.0 is released I’d like to give you the following tips:

Tip 1: Keep your matrices small

That’s the golden rule #1 for all work with Qubicle. The smaller your matrix is the easier it is to edit it in matrix mode. So if you have a very big matrix in your scene, let’s say you imported an AOS map or you created a large landscape, my tip is: divide your big matrix into smaller ones. You can do this automatically by using the divide modifier. After dividing your big matrix you may have some empty matrices, simply because the area in that part of your big model was empty. To quickly remove those matrices select them by using “Select > Select empty matrices” from the main menu and hit DEL.

Tip 2: Keep the amount of hollows low

The golden rule #2: you don’t want any hollows in your matrices. You might think that hollows mean less voxel and therefore more performance. In fact the opposite is true. I don’t want to be too technical and explain why it’s like that, just trust me: no hollows = optimal performance. To fill hollows use the fill hollow modifier. It automatically fills all hollows of selected matrices with the current foreground color.

Tip 3: Hide unused matrices

You may not have noticed this before but you can hide matrices by using “Edit > Hide”. Hidden matrices are outlined with a dashed boundingbox. Of course hidden matrices will still be exported. To unhide a selected matrix use “Edit > Show”.

Tip 4: Separate the landscape from the buildings

If you use an organic landscape in your scene I would recommend to save it in a seperate file than the buildings. I would use the following workflow: Create the landscape and save it as “landscape_original.qmo” afterwards save it again as “landscape_optimized.qmo”. Now use the modifier undermine to remove all voxels under the surface. Afterwards divide your landscape into smaller matrices with the divide modifier, select empty matrices with “Select > Select empt matrices” and delete them. Next select the remaining parts of your landscape and use the modifier “Optimize size”. Now you have a pretty optimized version of your landscape for Qubicle. Save now to “landscape_optimized.qmo” and afterwards save again as “map.qmo”. Now delete all parts of the landscape that are not necessary and keep only those where you want to create buildings on.
After you have finished your map and before exporting as VXL delete all remaining parts of the landscape and import “landscape_original.qmo” with “File > Import”.

Export as VXL

Finally I would like to explain what happens inside Qubicle when you export as VXL to understand what you have to do to create optimal maps. All voxels inside the work space (-256 to 256 on both x-axis and z-axis, and 0 to 64 on the y-axis) are combined into a single matrix 512 voxels wide and deep and 64 voxels high. All voxels outside that area are ignored.
There is only one rule to AOS maps I have discovered so far but this one is mandatory:

Holes in the ground are prohibited!

If there are any holes in your in your ground, your map will crash AOS. I recommend reimporting your map into Qubicle and check for holes.

Now you know enough to start building maps and objects for AOS with Qubicle.
If you’ve got any more questions please use the forum.
I hope to see some maps you made on the forum galery

Cheers,
Tim