[x3d-public] Extensions from Castle Game Engine that could be generally useful in the X3D standard

Michalis Kamburelis michalis.kambi at gmail.com
Wed Apr 12 13:33:45 PDT 2017


Hi,

Following the today's discussion on X3D WG Meeting, here are some
extensions from Castle Game Engine that you may consider:

1. Smaller extensions:

  1.1. X3DShapeNode.shading = "DEFAULT"|"PHONG"|"WIREFRAME|..." field.
See https://castle-engine.sourceforge.io/x3d_extensions.php#section_ext_shading

  1.2. Allow to use TextureCoordinateGenerator on primitives, by a new
field: Box/Cone/Cylinder/Sphere/Extrusion/Text.texCoord . This is also
useful for other texture-generating nodes (like two existing proposals
for projective-texturing). See
https://castle-engine.sourceforge.io/x3d_implementation_texturing_extensions.php#section_ext_tex_coord

  1.3. Generating 3D texture coordinates in world space:
TextureCoordinateGenerator.mode =
["WORLDSPACEREFLECTIONVECTOR","WORLDSPACENORMAL"]. These modes allow
using GeneratedCubeMapTexture as a simple mirror. See
https://castle-engine.sourceforge.io/x3d_implementation_texturing_extensions.php#section_ext_tex_coord_worldspace
, https://castle-engine.sourceforge.io/x3d_implementation_cubemaptexturing.php

  1.4. Generating texture coordinates based on the shape's bounding
box: TextureCoordinateGenerator.mode =
["BOUNDS","BOUNDS2D","BOUNDS3D"]. These allow to explicitly request a
kind of coordinate generation that is right now available by default
in some situations. Very useful when transforming X3D graph. See
https://castle-engine.sourceforge.io/x3d_implementation_texturing_extensions.php#section_ext_tex_coord_bounds

  1.5. Specify whether texture alpha should be used for alpha testing
or alpha blending: alphaChannel=["AUTO"|"NONE"|"TEST"|"BLENDING"]. See
https://castle-engine.sourceforge.io/x3d_implementation_texturing_extensions.php#section_ext_alpha_channel_detection

  1.6. Specify blending factors: BlendMode node. This is an Instant
Reality extension,
http://doc.instantreality.org/documentation/nodetype/BlendMode/ ,
implemented in a compatible way in CGE:
https://castle-engine.sourceforge.io/x3d_extensions.php#section_ext_blending

2. Some larger extensions, that will understandably need discussion
and more input from other implementors:

  2.1. Compositing shaders extensions that we talked about today,
https://castle-engine.sourceforge.io/compositing_shaders.php

  2.2. Screen effects using shaders,
https://castle-engine.sourceforge.io/x3d_extensions_screen_effects.php

  2.3. Some way to make shadows, see
https://castle-engine.sourceforge.io/x3d_extensions_shadow_maps.php ,
https://castle-engine.sourceforge.io/x3d_extensions_shadow_volumes.php
. But I would start "cautiously" here, and include in the X3D
specification something much simpler than my own extensions. See my
mail "X3D features missing, but desired, by a game engine" that I'll
send shortly to the same address:)

  2.4. Some way to pass camera information to shaders. I have my
extensions for this:
https://castle-engine.sourceforge.io/x3d_implementation_navigation_extensions.php#section_ext_viewpoint_camera_matrix
. But I'm not happy with my own work here, connecting these events
from a Viewpoint node proved uncomfortable when you have many
viewpoints in a scene. I would like to redesign it using something
like a ViewpointSensor node.

3. Note: I did *not* mention on the list above my bump mapping
extensions ( https://castle-engine.sourceforge.io/x3d_implementation_texturing_extensions.php#section_ext_bump_mapping
). That is because I would prefer to see CommonSurfaceShader (from
Instant Reality) to be included in the X3D specification. It also
allows bump mapping, and many other features.

Best regards,
Michalis



More information about the x3d-public mailing list