Easy mirrors on flat surfaces: more progress

Posted on

The implementation of our “easy mirrors on flat surfaces” is more-or-less complete now. I’ll be working on a documentation and better demos soon. For now, see the description below.

Features:

  • Setting up the mirror is a matter of using X3D node ViewpointMirror with RenderedTexture (to get a texture containing mirror), and applying this texture with generated coordinates by TextureCoordinateGenerator { mode "MIRROR-PLANE" }.
  • A working demo is in viewpoint_mirror.x3dv. Just get the demo-models repository and open viewpoint_mirror.x3dv inside with view3dscene from snapshots or any Castle Game Engine 3D example. A better demo will follow shortly, showing also how to use this with Blender and Pascal, without hand-crafting an X3D file.

  • Multiple mirrors work nicely and can produce recursive reflections (when a mirror is visible in a mirror). Each frame updates the mirrors based on their previous contents, so the recursion depth is practically unlimited with zero cost.

  • A mirror texture can be mixed with material and other textures using multi-texturing, just like any other texture.

  • The mirror geometry can be any complicated shape. It doesn’t have to be a simple quad! However, it should be more-or-less planar (we automatically calculate a best fit plane looking at geometry) in order to get sensible results.

  • The texture mapping TextureCoordinateGenerator is done by shaders on GPU. So it remains fast even for complicated objects. The mirror itself is rendered using FBO.

This work is sponsored by the Castle Game Engine supporters on Patreon, in particular thanks go to Robert Daniel Murphy for requesting this feature. If you like what I’m doing, please consider supporting me! Thank you.

Comment on this post ➤

New trailer of “The Unholy Society”

Posted on

vlcsnap-2018-06-14-01h56m05s627

We proudly present a new trailer for our game “The Unholy Society”:

It’s all in-game footage, everything is done using Castle Game Engine. Most of the graphics is done in Spine, and rendered and animated using TCastle2DScene (see more info about using Spine in Castle Game Engine). The UI (fight symbols, items) is using standard CGE UI (TUIControl descendants). We have a simple custom language for conversations and scripting (see also Google Doc version of this post).

You can wishlist the game on Steam!

The game is developed by Cat-astrophe Games, an indie game studio in which Michalis is the main (and only, although that may change soon) developer. Coincidentally, we’re doing all our projects using Castle Game Engine 🙂

Comment on this post ➤