I was working intensively on support of CommonSurfaceShader (aka “material on steroids”) in view3dscene and Castle Game Engine, and the following features have been added:
- specular maps (vary specular color throughout the surface, e.g. making it selectively shiny or “rough”)
- shininess maps
- ambient maps
- configuring displacementFactor for parallax bump mapping
- support for reflectionFactor and transmissionFactor in ray-tracer
This is all added to the previous features: support of basic factors (similar to the standard Material features) and normal maps (bump mapping). Bump mapping was also improved a bit.
The demos are inside bump_mapping/common_surface_shader subdir (you can download complete demo models contents from GitHub). You can open them using the latest view3dscene from snapshots. Or you can just compile the engine from GitHub
The updated CommonSurfaceShader information is here. The fields marked in bold there are supported in view3dscene / Castle Game Engine. There’s also a lot of text that may help you understand how CommonSurfaceShader works:)
- In a (related) news, I have improved our custom Blender exporter to X3D. It now exports the CommonSurfaceShader, including various texture configurations like normal maps, specular maps and so on.
This means that an artist can configure all the goodies mentioned above from Blender! Just export with “Use CommonSurfaceShader” checkbox, and the resulting file will include CommonSurfaceShader with all the parameters and texture configuration.
My notes about exporting X3D to Blender (part of the Castle Game Engine documentation) include a detailed description how to use this feature. See the “Extra material textures (normal maps, specular maps) with CommonSurfaceShader” section here.
The modifications to the Blender exported are not yet submitted to the Blender developers, but they *will* be:) I want this to be present in Blender out-of-the-box.
At the end, I wanted to emphasize that this work was sponsored by Castle Game Engine patrons on Patreon. If you like what I’m doing, please consider supporting me, through the page https://www.patreon.com/castleengine . This really helps me spend more time on the engine and view3dscene, and you can also request a particular feature. This month, Robert Daniel Murphy requested “easy export from Blender of normal maps and specular maps”, and look what cool things happened! 🙂
Support for specular maps (and more) in view3dscene, Blender exporter to CommonSurfaceShader
One Reply to “Support for specular maps (and more) in view3dscene, Blender exporter to CommonSurfaceShader”
Update: if the process of installing our custom Blender X3D exporter scared you, I have just improved it a lot 🙂 You can now install our customized exporter as a normal “Blender Add-On” that exists in parallel to the standard Blender X3D exporter.
The instructions on http://castle-engine.sourceforge.io/creating_data_blender.php provide the details, they are hopefully clear to follow even for a Blender novice:)