Towards Soya 2.0

Soya 2.0 is coming!

The most striking feature of Soya 2.0 is mini shaders. They allow to write Open GL / GL SL shaders so easily! With GL SL, you have to rewrite the entire rendering pipeline, even if you want to modify only a small part of it...

On the contrary, with Soya's mini shaders, you can write a mini shader that overrides a part of the rendering pipeline (ex customizing the lighting computation), or that adds an extra step in the rendering (ex deforming the model geometry). Then Soya assembles all mini shaders, adds the missing pieces of the rendering pipeline, and generates a GL SL shader.

Additionally, Soya's mini shaders can be written with a Python-like syntax ;)

Soya provides 16 classes mini shaders, each corresponding to a specific part of the rendering pipeline. Here is an example of a "camera-space deform" mini shader, which deforms the model's geometry in camera space:

wavy_mini_shader = soya.MiniShader("wavy", """
uniform float self.time
def void cameraspace_deform_mini_shader():
  current_vertex.x = current_vertex.x + 0.2 * sin(0.2 * self.time + 3 * current_vertex.y)
""")


my_body.add_mini_shader(wavy_mini_shader())
../../_images/mini_shader.png

Mini shaders can be associated to any object: a Model, a Body (an instance of Model), a World (a group of other 3D object) or a Material. When associating a mini shader to a World, it is inherited by all objects inside this World, and automagically combined with objects' own mini shaders. For more details about mini shaders, see the mini-shader-* tutos!

Want to try and start hacking with Soya 2? You're welcome! The development version can be obtained on this mercurial repository: http://hg.tuxfamily.org//mercurialroot/oomadness/soya2.

Other new features include:

  • Support both Python 2.7 and 3.3,

  • Open GL SL shader support,

  • new exporters for Blender 2.6x, with a bugfixed Blender => Cal3D exporter, able to take into account vertex location, normal and texture coords when merging vertices,

  • LOD support for models,

  • pre-rendered background, usefull for slow computer or old-style games,

  • Partial Open GL ES support (not yet finished).