Surfaces
From H3D.org
←Older revision | Newer revision→
The surface nodes are H3D-specific nodes. There are four surfaces currently implemented in H3D:
- SmoothSurface
- FrictionalSurface
- MagneticSurface
- DepthMapSurface
This example focuses on the first two. MagneticSurface and DepthMapSurface tutorials are found at the Magnetic lines and Depth map surface H3D demo tutorials.
Learning objective:
- Adding surfaces to geometries
Smooth surface
<Shape> <Appearance> <Material diffuseColor="0.5 0.7 0" /> <SmoothSurface stiffness="0.6" damping="0.2" /> </Appearance> <Box size="0.1 0.1 0.05"/> </Shape>
As discussed in A simple scene, surface nodes define the surface properties of a geometry. The SmoothSurface node in this example defines a smooth surface, with two fields stiffness and damping, which determines the stiffness and velocity damping of the surface.
Frictional surface
<Shape> <Appearance> <Material diffuseColor="0.5 0.7 0" /> <FrictionalSurface stiffness="1" damping="0" staticFriction="0.8" dynamicFriction="0.2" /> </Appearance> <Box size="0.1 0.1 0.05"/> </Shape>
FrictionalSurface actually inherits from SmoothSurface. FrictionalSurface has two additional fields to determine frictional properties: staticFriction defines the friction that is experienced upon initial movement when resting on the surface, while dynamicFriction defines the friction that is experienced when moving along the surface.

