[Bf-committers] BGE: Removing Singletexture Mode

Mitchell Stokes mogurijin at gmail.com
Wed Sep 11 21:48:46 CEST 2013

By deprecating, in 2.69, I was thinking about printing a message when the
BGE started if it was using Singletexture materials. As for face textures,
this is still supported in Multitexture if no material is assigned. If a
material is assigned, the user can simply select the Face Texture option.
>From what I've seen, Multitexture materials acts almost as a superset to
Singletexture materials, so I'm not sure how many conversion issues we'll
run into. However, as a user of the BGE, I only use GLSL materials, so I'll
need to dig a bit more into the actual differences between Singletexture
and Multitexture materials. Removing Singletexture from the BGE will
probably mean removing it from the viewport as well.

Ultimately I'd like to refactor the BGE into two rasterizers: a
fixed-function "legacy" rasterizer based off of Multitexture materials, and
an OpenGL 3/OpenGL ES "modern" rasterizer based off of GLSL materials. GLSL
material's shortcomings can be addressed. Speedups can be had by reducing
overdraw using techniques such as a pre-z pass. The shaders themselves are
not really that expensive (GLSL compilers these days are pretty good at
optimizing). I think the problem is mostly how often they're called. Also,
reducing light calculations by making lightmapping easier could also help
performance. Another technique that can help performance and address the
fixed number of lights issue is a light pre-pass technique such as deferred
or inferred lighting (I might be using the terms slightly incorrectly as
the terminology surrounding these techniques gets kinda muddy). Kupoman has
been experimenting with these in his Harmony branch with good results.


On Wed, Sep 11, 2013 at 12:04 PM, Brecht Van Lommel <
brechtvanlommel at pandora.be> wrote:

> Hi,
> I'm happy to see old cruft removed, but automatic conversion is
> unlikely to be totally smooth. So if we are going to put game engine
> users through this compatibility breaking again, it may be good to
> consider the bigger picture too?
> What is the ideal material system that you would  work towards? With
> fixed function being deprecated in OpenGL, where does that leave
> Multitexture? Currently all 3 modes have issues:
> Single texture
> + Fast
> + Visible in 3D viewport
> - Too simple for good materials
> Multitexture
> + Fast
> + More flexible than single texture
> - Not visible in the 3D viewport when editing
> - Strange interpretation of material options
> - Fixed function is being deprecated in OpenGL
> + Most flexible
> + Visible in 3D viewport
> o Designed to match blender render exactly
> - Performance quite poor because of that
> - Shaders not dynamic (limited parameter animation and number of lights)
> Anyway, maybe no one has time to undertake a big redesign here, but it
> may be interesting to think about.
> My other question is, what does deprecating single texture in 2.69
> mean? Does that involve any code changes, or just a mention in the
> release notes that it will be removed in a future version?
> Brecht.
> On Wed, Sep 11, 2013 at 8:03 AM, Mitchell Stokes <mogurijin at gmail.com>
> wrote:
> > Hello devs,
> >
> > Based on feedback from a BA thread[0], I would like to start working on
> > removing the Singletexture material mode. By removing Singletexture, we
> can
> > focus on making Multitexture a fixed-function material mode and GLSL a
> > shader-only material mode. I would like to deprecate Singletexture in
> 2.69
> > and remove it in 2.70. Ideally, we should be able to get blend files
> using
> > Singletexture to convert smoothly over to Multitexture.
> >
> > The biggest benefit of removing Singletexture is we get to cleanup some
> > code. For example, KX_PolygonMaterial can be completely removed since
> > KX_BlenderMaterial handles both Mutlitexture and GLSL material modes. We
> > can also remove some checks for if we're using KX_BlenderMaterial, since
> > KX_BlenderMaterial will be the only remaining concrete implementation of
> > RAS_IPolygonMaterial. Furthermore, we'd no longer need this
> > IndexPrimatives/IndexPrimativesMulti mess in the rasterizer code.
> >
> > The feedback from BA was mostly users, so I'd like to get some devs'
> > opinions on this as well. Any feedback would be appreciated.
> >
> > Thanks,
> > Mitchell Stokes
> >
> > [0]
> >
> http://blenderartists.org/forum/showthread.php?306748-Dev-Anyone-still-using-Singletexture-materials
> > _______________________________________________
> > Bf-committers mailing list
> > Bf-committers at blender.org
> > http://lists.blender.org/mailman/listinfo/bf-committers
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers

More information about the Bf-committers mailing list