Friday, September 27, 2013

Retro? freyja 3d. Future? Public alpha test for kagura?

Had a free hour between 0145 and 0245, so I "ported" freyja 3d to a modern Linux system.  Kind of funny things have changed so much since then...  mostly a hassle due to cmake being so horribad.  If premake4 was around back then it would have been much easier.  The cmake system ties into a hand rolled cross compiler system for building for platforms like Windows from Linux if you didn't know.  Good times.  I mostly fixed it to use as a model viewer / tweaker / debugger for some blender exported skinned meshes with animations.

 

Also got the per voxel sector procedural deco system up and running, but didn't post anything about it as there is a long way to go to get the cubemap gen, depth/height gen, etc in for IBL fun per sector.  Not much to look at especially without even volumeric fog / aerial perspective enabled.  I was just testing 'fill' with this screen capture basically.  The bright yellow dots are markers that flash on/off to visualize the sector layout, and show where the 'smart sector' object is located.  It is mostly for coordinating deco batches and the cached/dynamic maps mentioned above.

About to get back to working on graphics after making several script based camera rigs and character controllers to test the new scripting API improvements including fast math lib exposure and the ability to dynamically bind script classes from the native side.  May toss in a quick shooter game play demo like I did in midgard... that was 11 years ago!  I feel old as the last engine I wrote from scratch with network gameplay is older than most game companies today.

Once I have a polished network model for gameplay I may do a public alpha test.  If that goes well... ah kickstarter?  This time it will be an action rpg-ish death match in an open world environment.  I also need to get the Makehuman models animated for demo content I can release.  Currently I'm using "stand-in" animated models that can't be redistributed with the demo as you likely noticed.  Right now that would mean you can plug-in any md5mesh model and play, and I'm not going to encrypt the script files or shaders as I want to demo with the web browser as editor, so people can mod it.  It'll be like old times.  I thought about purchasing some stock animated models in FBX and converting them... but I would have to reverse engineer FBX binaries.  If you have some to sell and are willing to export to md5 for me I will pay extra to save the time for coding on my engine.  ;)

Failing that I may release a single player version to let people kill and loot some mobs, and focus on gameplay net code later.  Hell worked for minecraft going single player + editor.  I already support a couple network servers per game client already for editor on httpd and script console via telnet.  The dedicated server part is easier that this, but I have yet to put time into it.  Time for bed! 0310  :)


Wednesday, September 11, 2013

Better Look

Here's a better look at the Voxel Sandbox with the LoD off with an inlay:

Monday, September 9, 2013

Voxel Terrain Sector Preview

Got the basic voxel terrain in today.  The most time was spent on new ways to generate and enqueue Voxels, RenderMesh, PhysicsMesh in various worker threads and sync them amongst all the subsystems.  Also refactored some of the math library and noise generation while in there to avoid overlap.
Voxel Terrain Sectors 2x1x2

The scale of this image required me to adjust my camera... typical player could be about as big as a pixel here... going to hook this up to my biome and erosion simulation next.  That way flora and fauna will spawn with rivers and 'set piece' locations, and have some more high frequency details... I had some crazy stuff like ocean trenches prototyped, but who would ever see that?  Took out the randomized caves for now too as they should be created by the biome / erosion system.  The trick will be to convert it to density functions properly - eg account for overlapping terrain.  I don't think trees grow under ground.

This is just a 2x1x2 voxel terrain patch to get a sense of scale... I have mostly been testing with 6x2x6 and 9x3x9 for a complete world earlier.  It is all hooked up to script you can spawn more terrain as the player runs around until you run out of floating point sanity if you like.  

Memory overhead is super low at ~1/4 the size of the older heightmap generated terrain.  That said you could make worlds smaller than one walk cycle of animation or short sound clip by far still.  :D

Planning on adding real-time editor later that works by altering density in a selected Voxel Sector for artist controlled editing via terrain brush.  It would be nice to make it work with touchscreens via the web editor too in real-time, but not high on my list.  Elevation and Biome splat controller needs to come in next.  Maybe add some slope blending adjustments to the basic shader / materials too.  

The most fun will be allowing scripted density functions by exposing the native structs holding function pointers and args to script that run in the density summation as addends.  In other words alter the density functions from script ( data driven ) at any time not just alter the voxel field... well laters.  

Saturday, September 7, 2013

Isosurface Extraction done quick...

Cross post from Google+:

Voxels and Triplanar Mapping only took a day and a half thanks to the excellent docs from Nvidia and my awesome little engine that could. Going to work in real-time editing and maybe tessellation guided by isosurface extraction later if I don't get sidetracked with other big features. This is a CPU converted isosurface to standard mesh to use the CPU side physics. eg voxels -> mesh. Will be doing GPU side physics to use with noise based particles / fluid simulation at some point. Also GPU only is good for real-time editing.

BTW was using marching cubes for this, but I'm still toying with naive surface nets for low end mobile platforms as it's much less ploygon soup when done. Also with naive surface nets you can generate less dense CPU side physics meshes then render on GPU in higher detail.

I also tossed in a preview of a simple 2 texture triplanar 'cave' material for the same shader.

Here's the algorithms:

Chapter 1. Generating Complex Procedural Terrains Using the GPU

Polygonising a scalar field