[x3d-public] Support for specular maps (and more) in view3dscene, and Blender exporter to CommonSurfaceShader

Michalis Kamburelis michalis.kambi at gmail.com
Fri Apr 28 15:29:13 PDT 2017


The 2nd feature should be something great not only for view3dscene
users, but for all X3D people using Blender:) Feel free to jump to
that part. I'm also attaching some cool images to this mail:)

1. 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
https://github.com/castle-engine/demo-models/tree/master/bump_mapping/common_surface_shader
(you can download complete demo models contents from GitHub on
https://github.com/castle-engine/demo-models ). You can open them
using the latest view3dscene from snapshots:
http://michalis.ii.uni.wroc.pl/castle-engine-snapshots/ .

The updated CommonSurfaceShader information is on
https://castle-engine.sourceforge.io/x3d_implementation_texturing_extensions.php#section_ext_common_surface_shader
 . 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:)

Also, our software ray-tracer was much improved in the recent days
(support for smooth normals, textures, backgruond color), and it also
understands a subset of CommonSurfaceShader.

2. In another news, I have improved our custom Blender exporter to
X3D, linked on https://castle-engine.sourceforge.io/creating_data_blender.php
. 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.

The details are

- On https://castle-engine.sourceforge.io/creating_data_blender.php .

- 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 on
https://github.com/castle-engine/castle-engine/wiki/Blender

This is useful also for Instant Reality / X3DOM users that use
CommonSurfaceShader! That's what you get for having a standard,
improvements like this benefit everyone using X3D, not just my own
engine:)

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 mention that this work by 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! :)

Best regards,
Michalis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1_blender_monkey_0.png.jpg
Type: image/jpeg
Size: 234756 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170429/0438f805/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2_more_textures_with_specular_maps_0.png.jpg
Type: image/jpeg
Size: 285166 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170429/0438f805/attachment-0003.jpg>


More information about the x3d-public mailing list