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

Andreas Plesch andreasplesch at gmail.com
Sat Apr 29 06:27:37 PDT 2017


From: Michalis Kamburelis <michalis.kambi at gmail.com>
To: X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: [x3d-public] Support for specular maps (and more) in
        view3dscene, and Blender exporter to CommonSurfaceShader


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


CommonSurfaceShader is a nice way to get many of the performance and effect
benefits of shadering without having to learn glsl and the light models'
matrix math. Some time ago I made a bump mapped Earth in x3dom and then
wanted to add a displacement map. However, x3dom only allowed displacement
in the direction of the displacementAxis field, by default y.  This is now
changed and displacement is along the normal but only if there is also a
normal map (I believe).

http://andreasplesch.github.io/x3dom/CommonSurfaceShader/displacement.html

Does parallax bump mapping mean displacement is applied along the local
normal ? Do you think it would be beneficial to have a displacementAxis
field ?

The main issue I had with using displacement maps is their limited
fidelity, eg. only increments of 1/255 are possible.

https://github.com/x3dom/x3dom/issues/591

I think webgl2 allows floating point textures. Did you consider taking
advantage of floating point textures ? I think maybe even phones support
them.

Finally, I could not find the displacementTexture field in instant reality
: http://doc.instantreality.org/documentation/nodetype/CommonSurfaceShader/

Not sure, if they want to add it (or perhaps already did).

I may try to adopt your examples for x3dom,

-Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170429/81a3d793/attachment.html>


More information about the x3d-public mailing list