I recently ramped up the level of procedural tree foliage and wanted to briefly post about it.
I chose to generate the trees myself and spent some time thinking about how to do that. I didn't look at any other implementations but rather tried to imagine the simplest approach I could think of and build out from there.
Initially I considered a tree to simply be a pole (like a telegraph pole).
Pointing up, normal to the surface I then imagine rings around its exterior that I could then stitch together using triangles.
Next I imagine at some distance along the pole, branching by rotating the (imaginary) pole about the branching point (the new origin) a configurable number of degrees in the XY ZY planes.
This process repeats recursively with the pole radius narrowing at each branching point and shortening and effectively produces a hierarchy of transformations (one per branching point) that I then bake into the mesh vertices for each branch sub-mesh.
Next, to improve on the rigid pole appearance I modified the ring placement to follow a sinusoidal pattern (rather than the straight pole) by imagining the sin function rotated counter-clockwise +ve 90 degrees in the XY plane. Starting at zero then this function (now transposed) moves vertically upwards and oscillates +/- about the X axis.
For the leaves I chose initially a spherical distribution of points.
For the spherical distribution of triangular leaves I went with the Fibonacci sphere making each point the leaf triangle's circumcentre.
I then added support for optional hanging vines the colour of which are complementary to the leaf colours.
Finally, for coloration I added support for 3 schemes; Monochrome, Complementary and Analogous coloration (in HSV colour space).
A short video of the results can be see in this video:
[previewyoutube=FJofx9x1Roo;leftthumb][/previewyoutube]
[ 2024-12-21 09:36:16 CET ] [ Original post ]
This is my first dev diary post. I'm hoping to do this on a semi-regular basis. Over the last few weeks I've been working on the targeting system. This game is built using my own engine so it was a case of experimenting, failing and then finally settling on a simple and extensible design for weapons, associated explosions and a simple hand written collision detection system. I wanted to be able to create a new weapon type in a few lines of code, a corresponding explosion animation and custom weapon and explosion sounds. In addition I wanted to be able to register a collideable thing with the collision system. The collision system in effect then sits in-between the weapon systems and collideable objects. It performs collision detection and manages the notification of collisions to interested observers. A short video of it in action is here If you want to know more about the design and / or have any suggestions for improvement let me know! Thanks, Ben.
[ 2024-12-15 09:27:12 CET ] [ Original post ]
🕹️ Partial Controller Support
🎮 Full Controller Support
- Use the in-game editor to define the rules for creating your terrain, grass, rocks, trees, city and traffic
- Create your own unique look using the wide range of graphical settings from retro-pixelated to film-noir and more
- Walk and fly around your creation
- More features (and gameplay) coming soon...
- OS: Linux + SteamOS
- Processor: Requires a 64-bit processor and operating system
- Graphics: OpenGL 3.3
- OS: Linux + SteamOS
- Processor: Requires a 64-bit processor and operating system
- Graphics: OpenGL 3.3
[ 6138 ]
[ 3335 ]