Better HN
topnewbestaskshowjobs
Log inSign up

hormis

8 karma · joined Apr 4, 2011 (15y ago) · 7 submissions

Submissions

comment 7y ago · link · parent

Location: Bangalore, India

Remote: No

Willing to Relocate: Toronto Preferred (will need work permit), otherwise depends.

Technologies: C/C++/C#, Obj-C, Java, Swift, Android, iOS, Python, Django, Embedded (mbedOS), AOSP HAL, others as needed

Resume: https://www.linkedin.com/in/hormis/

Email: hormis.t2512 AT gmail

13+ years of experience. Prefer roles where I can work as an Individual Contributor, complex non UI work, using static typed languages (ask me why).

Coming off a Principal Engineer job at a startup where I built the core of their Android, iOS and Backend. Also designed and built Bluetooth LE based (nRF51) & USB based (Atmel SAMD21) IR devices to help control your devices, and HAL for Android TV platform prototypes.

comment 14y ago · link · parent

> he way it's working in my mind has about the same number of lookups as FXAA,

However, the FXAA will have a clear win as it works over a partly transparent polygon. So you will have to combine both an RBG and z based to get the same result as an FXAA.

> you're dependent on bandwidth between the GPU and its memory, not main memory.

The bandwidth I was talking about was the older cards which do not have bandwidth or fill rate to keep 60fps with deferred shading, no AA. FXAA would be a candidate there if it is a pure RGB technique on the composited frame, especially as it is cheaper than MSAA.

comment 14y ago · link · parent

> This was true for Direct3D 9 but 10+ allow you to bind the depth/stencil buffer as a texture, although there is the caveat that you can't have it simultaneously bound as a texture and as a render target.

Missed that one as I have been mostly playing around in DX9 and only a bit of DX10.

There is the case of the billboarded or partly transparent texture. The z-based edge methods will not work in these cases as you render them with z-write off. Meaning, atleast in those cases, FXAA is a clear winner over both MSAA and z-based edge detection.

comment 14y ago · link · parent

> Why is that? While techniques like FXAA are needed for deferred rendering due to the order of operations, I don't see why FXAA isn't acceptable on non-deferred renderers.

FXAA is acceptable for the other techniques as well. However, MSAA is, in my opinion, a better technique as it uses supersampling at the edges and is already hardware assisted. FXAA's strength is that it is less expensive than MSAA memory and bandwidth wise. Both are a premium in deferred shading as you are using a 4x RBGA16 texture render target or something close to it :)

> If you have two planes at a right angle to each other, you'd see that in the depth buffer. Imagine you're looking at a line of pixels and you're doing this on each pixel -- you'd look to see if the pixels on either side of the one you're on are trending in opposite directions from the current one, and know it's an edge.

The question is can you get reliable edge detection with less number of texture look-ups on the z-buffer versus the RBG based edge detection?

> As far as I'm aware, all modern graphics cards allow you to render the depth buffer to texture just like the color buffer.

Not quite. You can render the z value to a texture, but that is done in the pixelshader and do not touch the hardware z-buffer used for z-fail/z-pass tests. It is this hardware z-buffer that is inaccessible, as it shares it memory with the stencil buffer which is used for stencil tests. Hence the proprietary format.

> Sure, but there's no reason you can't do post-AA using the RTT depth buffer and your composited color buffer.

See http://msdn.microsoft.com/en-us/library/windows/desktop/bb14...

> All render target surfaces used together must have the same bit depth but can be of different formats, unless the D3DPMISCCAPS_MRTINDEPENDENTBITDEPTHS cap is set.

As you can see, the bit depth restriction means that you would end up with 2x bandwidth usage with the z based edge detector, especially on the older hardware where you do not have the bandwidth to spare. It would be a different case if you can sample the hardware z-buffer.

comment 14y ago · link · parent

FXAA and other similar techniques are only relevant when dealing with deferred rendering only. Detecting edges on the depth buffer may sound as the solution until you realize that two planes at right angles has an edge between that can alias. The change there is in the normal and not the Z.

Also modern graphics cards do not give programmatic access to the z-buffer as the z-buffer format is often proprietary. Deferred shading based renderers often duplicate the z-value also into a texture.

Deferred rendering can render large number of dynamic, unshadowed lights very efficiently. It can be used as approximate global illumination technique.

comment 15y ago · link · parent

Can you give some more details on the language/libraries that you are using? I am just getting started on a 6DOF game...

I am planning to use C++ to code up the engine. So the easiest option is to use Boost.statechart to implement a Hierarchical Finite State machine based AI. I can always switch to a hand coded state machine later on if the performance of boost is not good. See an old article on Halo 2 AI: http://www.gamasutra.com/gdc2005/features/20050311/isla_01.s...

Havok Behaviour seems to be a game middleware covering the same area. So it might be an option if you are targeting PC (See licensing details of the same) even if it is not open source. I am not considering it as most of the features of it seem to be targeting the FPS game type which is a bad fit for a 6DOF game.

Apart from the high level AI functionality that can be implemented using Boost.Statechart, there is also the need for good pathing. For a 6DOF game reduces to a problem of generating non intersecting B-Splines a between source and target. Space is mostly empty ;) This is relatively simpler compared to the pathing algorithm needed for an FPS. Off the top of my head, I would use something like Boost Graph library to do an A* search on a Nav nodes as the simplest solution for an FPS game. You should be able to provide various heuristics using multiple vistors to customize the A* searches. Another option is to use a dedicated pathing library like Path Engine ( http://www.pathengine.com/ ) or Havok AI ( http://havok.com ). Unfortunately both are paid libraries. A Nav Mesh based pathing provided by Path engine or Havok AI will be much better than the Nav Node system, but with adequate coding and good level design, it should not too different from a nav node system. Eg: Left 4 Dead 1 & 2 seem to be using a Nav Mesh based system versus Alien swarm which seem to use a Nav Nodes based system for pathing.

Planning of AI is a hard problem without having the constraint of being real time. I would instead use strategically placed volume triggers (Ghost/Phantom object of your physics library) to customize the AI NPC behaviour (triggering AI HFSM transitions) or to trigger a preset sequence of scripted actions (Cinematics, sort of). Combine that with a decent nav nodes system and some randomness, we get sufficiantly 'intelligent' behaviour. This, however, becomes a data heavy approach to game level design. A full planning engine becomes a code heavy approach. The trick seem to be to strike a balance between the two :D