Monday, July 28, 2014

Ugly Terrain


Getting tired of pure voxel terrain again, so I'm going to move voxel system to more of a detail terrain painting system.  GPU Clipmaps are cool again, and much more flexible when it comes to foliage deco -- so hopefully this will be the last ugly terrain screenshot.  Making the system to generate foliage with raycasts as seen in ye old island demo as fun for programmer art, however for deco painting artists don't like that kind of thing.   ;)




Sunday, July 27, 2014

Sublime Text 3 Game Engine RPC Integration

I've been using Sublime Text for a while now, and as you know I have integration for Kagura.  Today I want to share a basic skeleton sample on how to add integration for your project.  Kagura provides both a telnetd and httpd for accepting RPC commands and content, which are the basis of the web based tools such as the editor and profiler charts.   Hooking sublime up via HTTP is easy as it's all python.

I would like to make a full tutorial and go step by step for this, however blogger has no source code formatting / syntax highlighting options via the editor.  Basically, all you need to do is make a small GET / POST request function to push embedded script commands to the game.  Then you can get responses back to process if needed.  Given this is integration into a text editor you're not going to request JSON + js to make pretty graphs or edit content, so responses are ignored.  :)

As far as the game engine side of things go, you'll need to implement or integrate an httpd -- such as mongoose httpd -- to your project and have that feed your main logic loop the script in a thread-safe manner.  Notice all these samples assume local to game engine file modifications to avoid pushing entire files and mirroring during development.  Kagura development is "uncooked" as you can't ship with this enabled for security reasons anyway.  Would make the game a little too easy to hack.  ;)

Sample menu, keys, and plugin files at github:
https://github.com/thendrix/blog-snippets/tree/master/kagura/sublimetext

Sunday, July 13, 2014

In-game editor UI prototype to get full binding support

Here's some screenshots with no context as promised.  You can see the optional in game editing UI is type based instead of GameObject grouped as it's focused more on quick edits.  The prototype was useful enough to to warrant adding a macro system to allow auto binding per KaComponent and/or KaGameObject.



Sunday, July 6, 2014

While you were eating BBQ

I got hopped up on some strong marsala chai and cranked out a ton of updates to kagura3d.  Getting ahead of schedule for my DK2 demo!  :D

* Updated BRDFs and material IDs including a more optimized GGX.  Thanks John Hable!
* Added back some in-engine editor features using antweakbar!  This was mainly to allow editing when you can't have a second display / tablet handy to control the editor remotely via HTML5 UI.
* Hand painted dozens of new textures to convert most of the old assets to Physically-Based Materials.
* Made dozens of new materials for PBS.
* Removed tons of old shaders that existed before PBS support in the engine.
* Updated a few of the old pure voxel terrain and pure heightmap terrain based test scenes.
* Got out blender and worked with exporter, so I can finally export some new animated meshes!
* Updated all the documentation.


Yeah, there is still a lot of support lacking in the in-game viewport editor vs remote editor:

I'm looking for an artist to animate some basic sets like walk / run for MakeHuman meshes.  If you can do original character models or environmental deco contact me as well.  Mainly looking to get assets better than my programmer art and fanart I can't reuse later.  If you have Unity Store Assets I may be able to use those FBX in my engine now blender can import that format.  I am also willing to donate cash to people to fix some commonly used CC0 assets such as the viewmodel arms that need rerigging with a common root to export with animation.  BTW those arms aren't even UV mapped the material is applied magically.  :)

If the models work with this md5mesh exporter then good to go:
http://sourceforge.net/p/blenderbitsbobs/wiki/MD5%20exporter/





Monday, March 3, 2014

Quick screenshot

While waiting for a phone call I tweaked the main BRDF material to cut out a redundant attribute to make art production faster -- also legacy materials are working OK by default with it as well.  Going to reduce a lot of fill soon with a new trick.


Edit -  A couple more set globally for fun:


Wednesday, February 5, 2014

Fun stuff... ?

Minor stress test for new batching prototype: instead of particles generate a gameobject for each foliage, disable LoD, and disable octree / occlusion to only use frustum culling.  Converting voxel terrain to heighmaps for proper foliage system needs to happen sooner now.  So that's 5.756ms out of 9.725ms a frame just for CPU frustum culling everything in a "tiny" ~8kmx8km test.  Going to be moving frustum culling back to the batching thread instead of the dispatch thread where it belongs.  Also going to start using microseconds instead of milliseconds, since I'm starting to hit 0.000ms timers too often.  Basically beat up the CPU testing.  BTW everything is lit using Oren-Nayar + Cook-Torrance even if you can't tell with ugly programmer art / generated level.  I need to add some wolves made out of particle effects like fire and smoke or something jazzy...

Kind of fun wasting 23.323ms on vsync due to some DE bullshit forcing everything to 30Hz... might ditch SDL2 again for GLX with proper triple buffering and timing again if I go back to triple head gameplay more often...  not bad for a mobile GPU still.


Why was this fun?  Well I have a hardcoded limit for PC that's pretty high or so I thought:
ERROR: AglRenderQueue overflow.


The scene that hit that error ( not pictured, boo ) was quite dense, but still was mostly waiting for flips not dispatch.  In other words I can render more things than I allow to be queued from batching thread now.  I will miss you uint16_t!  I would've liked to take a screenshot of that scene, but I may daisy change ringbuffers or something silly to avoid bumping up my numeric limits right now.  Can't wait to see what will happen when I move to a fully indirect / wide batching system as this is just dispatching VBOs off a single thread for the most part -- not counting slow, legacy bullshit used by string drawing and UI.  OMG PCs are finally catching up with consoles for drawcalls.  "Beyond Porting" slides from nvidia are a good resource to get started.

Still planning on fixing all the nuts and bolts stuff before finishing the hydraulic erosion... still tempted to drop all that and work on terrain editor with LeapMotion / Wacom -- but I need to make the voxel terrain swap out meshes more cleanly for realtime editing first.

Another screenshot from old test level because I thought this generated hill was pretty...


Monday, January 13, 2014

Can has NPR

Yes, NPR is still supported... because comic books.  I need to texture and animate the player arms at some point I guess too.



Saturday, January 11, 2014

Quick Post for dtm

Recently I put Oren-Nayar back in for diffuse instead of the Lambert term.  Cook-Torrance is used for base material -- the only material in this scene to point out the difference.  Also note I have a per pixel parameter for occlusion of indirect lighting of a surface in effect too here.   Not much info here for you sorry, but after being asked it's better than just showing a scaled up pic and going LOL. 

"So what does that look like?"  Good question!  Be warned the materials and textures are very half ass.  Also no skin material, shadows are off, etc.