Monday, February 2, 2009

Effects in Gamebryo

Hey, been working on designing the lighting model in our game and figuring out how to get custom D3D FX effects working in Gamebryo. While attempting to move the rim/ink shader from my last post into gamebryo I ran into a few problems.

The effect running fine in FX Composer:
When applied to the model in Maya, exported to Gambryo and opened in the asset viewer:
With the inking removed:
So it appears the the Z-buffer is not reading/writing properly. I spent quite a bit of time trying to figure out why. The Gamebryo documentation talks about turning Z-buffer reading and writing on from within Maya, so I tried that to no avail (read/write seams to be on by default)

The shader does work when loaded into the scene designer:
However the default values are not correct, the rim should be white, while the outline is black. These defaults are used correctly in FX Composer.

This dose create quite a cumbersome workflow for the artists, who will, if we can’t figure this out, need to apply and modify the shader in Maya, export to gamebryo as the shader is not rendered in Maya and then create a scene that uses the effect in order to see it.

Gamebryo’s semantics and annotations are also based on those used in Microsoft’s EffectEdit which is now deprecated. Unfortunatly many of these do not line up with those used in FX Composer, which is another slight annoyance.

No comments:

Post a Comment