Xj3D Dynamic Texture Rendering Extensions
The name of this component is "xj3d_RenderedTexture". This name shall be used when referring to this component in the COMPONENT statement (see ISO FDIS 19775-1:200x 7.2.5.4 Component statement).
This extension provides the ability to dynamically render a partial scenegraph to an offscreen texture that can then be used on the geometry of a node. This can be used in many different ways such as creating mirror effects, inputs to shaders etc. The purpose of this component is to provide for extended visual effects, but not the complete form of offscreen rendering and buffers that would be available to lower-level rendering APIs. For example, this does not provide the ability to read back the contents of the texture, not any of the associated buffers such as depth, stencil or occlusion.
If no value is provided for the field then default behaviour is applied - for example, no background provided means that the base texture colour is cleared to black.
Information about the size of the texture is provided through the dimensions field. This is an array of integer values with the first 3 values having defined meanings, and is almost identical in semantics to the SFImage field definition. The first two values are the width and height of the texture, in pixels. Width and height must be a power of two. The third value provided is the number of colour components to generate in the texture: a value of 1-4. The user is not required to provide all of these values, and the following default behaviour can be assumed:
- Sensors. Most input sensors won't function (eg touch and drag sensors). Time sensors should work, but what about visibility, proximity sensors, LODs, billboards. Supporting them in a dynamic system is extremely compute intensive, and can be quite a problem to implement. For now, none of these are supported.
RenderedTexture : X3DTexture2DNode {
SFNode [in,out] metadata NULL [X3DMetadataObject]
SFBool [] repeatS TRUE
SFBool [] repeatT TRUE
SFString [in,out] update "NONE" ["NONE", "NEXT_FRAME_ONLY", "ALWAYS"]
SFNode [in,out] viewpoint NULL [X3DViewpointNode]
SFNode [in,out] background NULL [X3DBackgroundNode]
SFNode [in,out] fog NULL [Fog]
SFNode [in,out] scene NULL [X3DGroupNode]
MFInt32 [] dimensions [128 128 3] (0, ∞)
}
The RenderedTexture node defines a texture image that takes its source
from a X3D scene graph structure.
This component defines 2 levels of conformance. The nodes are specified by the following levels:
| Level | Prequisites | Nodes/Features | Support |
|---|---|---|---|
| Level 1 | Core 1 Grouping 1 Shape 1 Rendering 1 Texturing 1 |
||
| RenderedTexture | All fields fully supported |
Shape {
appearance Appearance {
texture RenderedTexture {
update "NEXT_FRAME_ONLY"
scene Group {
children Shape {
geometry IndexedFaceSet {
coord Coordinates {
point [ 1 0 0, 1 1 0, 0 1 0, 0 0 0 ]
}
coordIndex [ 0 1 2 3 ]
color Color {
color [ 1 0 0, 0 1 0, 0 0 1, 1 1 1 ]
}
}
}
}
}
}
geometry Box {}
}
|
[
Xj3D Homepage |
Xj3D @ Web3d |
Screenshots |
Dev docs |
Dev Releases |
Contributors |
Getting Started
]
Last updated: $Date: 2004/04/30 04:50:27 $ |