Search code examples
javashadowjmonkeyengine

Strange shadows on a blender model with subdivision surface


Placing a blender model in the scene with shadows applied produces the following result. shadows on blender model

The filters used are a DirectionalLightShadowFilter, SSAOFilter and BloomFilter. The model is exported using the OgreXML exporter. The strange thing is that the model doesn't have these strange shadows when not using a SubdivisonSurface in Blender. Is this a common problem with jme3 or could it be a Blender-related issue.


Solution

  • What you see here is called z-fighting. It is due to two faces directly in the same position, "fight" about which face is shown an which stays hidden.

    As a solution I would suggest changing to a person who is better at 3D-modelling than your current 3D Modelling guy. This guy must be a real mess. Not that it was me or something.

    No, seriously, this looks like it was designed with blender. Here a solution would be this:

    • Join the objects into one object / mesh (select all cubes in Object Mode, Ctrl + J)
    • Enter editmode, select all A (if not already) and Remove Doubles (in W menu)