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

Wednesday, August 21, 2013

Hey guys. It's been a long time since I posted anything about my engine kagura. I've started working on Physically-Based Lighting, and Clustered Deferred Shading with Forward+ will be the next big renderer change. Yes, I do enjoy rewriting my renderer fairly often it may seem. That's why I architected a plugable renderer! ;) First a screenshot of the latest alpha build with some horrible debug spew all over the place:

Currently I have Lambert with a Normalized Blinn-Phong enabled as I have stopped toying with the Oren-Nayar to get to some real business -- Removing the MDR system to replace with a standard HDR system with filmic tone mapping. 
Still using random assets from the web and what I can do with blender.  Really need to contract a professional artist do do a rigged character model with a walk cycle soon.




Also the editor has fully generic property mappings now.  This means you can bind script from native code or script to procedurally generate the UI on the target device such as a desktop webbrowser, nexus 7, or galaxy note in my case(s).  It's not pretty, but it gets the job done.  From native code this is how a bind looks:

KAEDITOR_PROPERTY_RANGE( "Exposure", 0.1, 4.0, mCamera->Exposure(), 0.01, Exposure ); This generates the JSON subpacket to be issued to the HTML5 editor when requested. This would look something like this for a full fresh:
"KaCameraComponent" : { "Properties" : [ { "name" : "Debug", "type" : "bool", "value" : 0, "script" : "$type.SetDebug( $instance, $value )" },{ "name" : "Culling", "type" : "bool", "value" : 1, "script" : "$type.SetVisbility( $instance, $value )" },{ "name" : "Field of View", "type" : "float", "value" : 60.000000, "script" : "$type.SetFieldOfView( $instance, $value )" },{ "name" : "Exposure", "type" : "range", "value" : { "min" : 0.100000, "max" : 4.000000, "value" : 2.000000, "step" : 0.010000 }, "script" : "$type.Exposure( $instance, $value )" },{ "name" : "Near", "type" : "float", "value" : 0.100000, "script" : "$type.SetClipNear( $instance, $value )" },{ "name" : "Far", "type" : "float", "value" : 12000.000000, "script" : "$type.SetClipFar( $instance, $value )" },{ "name" : "Clear Color", "type" : "color", "value" : [0.219000,0.219000,0.219000,1.000000], "script" : "$type.ClearColor( $instance, $value )" },... ] } }

This is then processed in javascript into HTML widgets with signals, updated values, and handlers. A preprocessor in javascript allows for Lua script expansion to save time yeilding something like this for the KaTelemetry callback ( html->js->lua on the remote host/game ) :
KaTelemetry( "KaCameraComponent.Exposure( KaGameObject.GetComponent( KaGameObject.FindByGuid( 0 ), "KaCameraComponent" ), 1.97 )" )

All this happens while you drag your exposure slider around. Yeah I decided to put in on the camera instead of in the Image Filter material while I was testing the tone mapping and linear color changes. This also allows for very complex scripting across the HTML editor and game host / remote server, but this is a simple example. I need to clean it up and optimize it, so I can do a full study and write-up at some point. :D

Friday, July 29, 2011

kagura update



Here's what she's looking like lately with the same data set seen many times. Using FXAA now since it's trendy. Will I have the lighting and AO in a working state for more than a week? Hopefully that'll all come together in a couple of months while working on the new editor. Might have to give up on using blender with the telemetry system after all due to workflow issues.

I should do a write-up on the telemetry system used for editing ( lights, materials, etc ) inside the webbrowser at a later date, however now I'm working on supporting more things with the telemetry system besides TTY / HTTP transport and may hold off until that's worth talking about.

Sunday, June 5, 2011

Cool!


I saw this on altdevblogaday a while back. Embedding a webserver in your game engine, and then using javascript on the webbrowser to visualize it.

Just tried it tonight... btw the tutorial is wrong in several parts of the examples from C to javascript to JSON, but it's the idea that counts. :D

Monday, July 19, 2010

Bon Odori test



I wanted to make a full O-Bon demo, but instead I just spawned some dynamic torches ( animated lights ) following a simple path like a particle system real quick. Need to fix lighting and visibility again new design new breakage. Hurts framerate to spew all the debug and error test each render command too.

Wednesday, June 9, 2010

Haha! Fixed a dozen bugs texcoords ain't one.



Sometimes you need to step back an enjoy the test materials on your programmer art. About to get realtime dynamic light editing hooked back up via replication to edit levels 'live' again. Good times playing around in the sandbox.

Yeah... I'm going to need you to rewrite all the light and material shaders.



With E3 coming up I barely have time for my hobby engine. Still playing around with comic look. About to get serious about fixing the deferred lighting with SIMD based tile rendering for box, point, and spot lights. But for now the same broken shit. People asked how horrible it currently looks, so a quick peek of a debug session.