The Second Antarean War is a multiplayer team-based real time strategic battle simulator. It simulates battle between spaceships in fully accessible 3d space. As an admiral, you can call in different types of ships for different situations. The game aims to be played against other people, not the game itself. The 3d navigation, order queues, smart orders and no limits on build queues aim to hide the visible user interface completely and allow you to focus on the battle at hand. You can join any battle in progress at any time. Some battles start small and grow in player size and in their importance to universal scale. The universe is persistent. Each battle has an impact on how well your faction does. Winning battles progresses the war and earns you medals, rank and respect from people you play with and strikes fear into players you fight against. Good hunting.

Post feature Report RSS Marching Cubes: Generating Rocks

In the quest for the best rock shape, I went to the next best thing - marching cubes. Marching-Cubes is an algorithm to convert a 3D math density function into a triangle based 3D model. So basically I come with math function and then wrap it with triangles. Marching cubes allow me to make much more interesting formations.

Posted by on

Generating Rocks

Space is full of rocks. Well that is false but to make any Second Anterean War (2aw) battle field interesting - one needs rocks. I need rocks to add strategic as well as just be interesting to look at.

I have though hard about rocks. I have a limited amount of art assets to work with. Making rocks are boring too, so my 3D artists did not make all that good looking ones.


So any art time I use should be put to good use like making awesome ships ( Aff2aw.com ). So I am stuck with doing auto generating rocks - which sound doable.

I want to first focus on the shape of the rock. For its the first thing players would see the shape of the rock must be interesting first. I will discuss my texture findings in another post. Most common way to make a rocks shape is to extruding it from a spheres yet that just does not make rocks that look all that nice. The main reason is that spheres can't have caves and holes. The triangle density is different from the inner parts. This appears to be true if you start for uv-sphere, iso-Sphere or the cube grid sphere.


In the quest for the best rock shape, I went to the next best thing - marching cubes. Marching-Cubes ( En.wikipedia.org ) is an algorithm to convert a 3D math density function into a triangle based 3D model. So basically I come with math function and then wrap it with triangles. Marching cubes allow me to make much more interesting formations.

From smooth:


To bone looking:


To chunky:


I can generate infinite number of those rocks using random noise. After I generate a rock I sort it based on the number of triangles and scale. This gives me group of small, medium and large rocks. I combine the small rocks into rock groups. Then I can place large, medium and small rocks groups on the map.

The rocks generated are efficient in their triangle counts. In computer graphics we need to show the lowest triangle count but still make it look good.


This is how filled rock looks like.


This is a wire frame of the same rock. You can see the 3D grid of the underlying marching cubes algorithm. Marching cubes work by basically walking each cube of space and figuring out which of the 15 unique cube configurations fit it. After that it does some smoothing between the cubes.

How do you think I could improve rock generation? (not music)

Comments
Elementalist
Elementalist

You could use mu... Oh. Right. Looks good to me! Especially chunky, very eye catching. Will be interesting to see them textured, will there be normal mapping?

Glad to see this game on ModDB, is it still running on Panda3D?

Reply Good karma Bad karma+1 vote
Aurel_Tristen
Aurel_Tristen

This is a good post, I like to see stuff like this. I've run into the same problem myself, and never came up with a good answer.

I would just jump in 3DSMAX, make a cube, extrude it, turbosmooth, spacewarp, optimize, repeat. Worked OK, but that 'chunky' rock looks great! I'd never end up with a rock like that.

Reply Good karma Bad karma0 votes
treeform Author
treeform

I will do a post on how i texture the rocks in the future.

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
Angels Fall First : The Second Antarean War
Platforms
Windows, Mac, Linux
Creator
treeform
Engine
Panda3d
Contact
Send Message
Homepage
Aff2aw.com
Release date
Game watch
Follow
Feature
Tags
Feature
Browse
Features
Report
Report
Share
Related Games
Related Engines
Panda3d
Panda3d BSD