Appearance3DChooser will let you play with some of the parameters of a Java3D Appearance object. The Appearance object defines all rendering state that can be set as a component object of a Shape3D node.
This help reminds some parts of the Java3D V1.5 documentation in order to help you to better understand the way the differents parameters of this component work. Moreover it will also help you to construct your own object using the Java3D library.
The rendering state consists of the following:
- Coloring attributes - defines attributes used in color selection and shading. These attributes are defined in a ColoringAttributes object.
- Line attributes - defines attributes used to define lines, including the pattern, width, and whether antialiasing is to be used. These attributes are defined in a LineAttributes object.
- Point attributes - defines attributes used to define points, including the size and whether antialiasing is to be used. These attributes are defined in a PointAttributes object.
- Polygon attributes - defines the attributes used to define polygons, including culling, rasterization mode (filled, lines, or points), constant offset, offset factor, and whether back back facing normals are flipped. These attributes are defined in a PolygonAttributes object.
- Rendering attributes - defines rendering operations, including the alpha test function and test value, the raster operation, whether vertex colors are ignored, whether invisible objects are rendered, and whether the depth buffer is enabled. These attributes are defined in a RenderingAttributes object.
- Transparency attributes - defines the attributes that affect transparency of the object, such as the transparency mode (blended, screen-door), blending function (used in transparency and antialiasing operations), and a blend value that defines the amount of transparency to be applied to this Appearance component object.
- Material - defines the appearance of an object under illumination, such as the ambient color, diffuse color, specular color, emissive color, and shininess. These attributes are defined in a Material object.
- Texture - defines the texture image and filtering parameters used when texture mapping is enabled. These attributes are defined in a Texture object.
- Texture attributes - defines the attributes that apply to texture mapping, such as the texture mode, texture transform, blend color, and perspective correction mode. These attributes are defined in a TextureAttributes object.
- Texture coordinate generation - defines the attributes that apply to texture coordinate generation, such as whether texture coordinate generation is enabled, coordinate format (2D or 3D coordinates), coordinate generation mode (object linear, eye linear, or spherical reflection mapping), and the R, S, and T coordinate plane equations. These attributes are defined in a TexCoordGeneration object.
- Texture unit state - array that defines texture state for each of N separate texture units. This allows multiple textures to be applied to geometry. Each TextureUnitState object contains a Texture object, TextureAttributes, and TexCoordGeneration object for one texture unit. If the length of the texture unit state array is greater than 0, then the array is used for all texture state; the individual Texture, TextureAttributes, and TexCoordGeneration objects in this Appearance object are not used and and must not be set by an application. If the length of the texture unit state array is 0, the multi-texture is disabled and the Texture, TextureAttributes, and TexCoordGeneration objects in the Appearance object are used. If the application sets the existing Texture, TextureAttributes, and TexCoordGeneration objects to non-null values, they effectively define the state for texture unit 0. If the TextureUnitState array is set to a non-null, non-empty array, the individual TextureUnitState objects define the state for texture units 0 through n -1. If both the old and new values are set, an exception is thrown.
The rendering Panel may be used to check the effect of the parametrisation done. You have 4 different views (Right, Front, Left, Top) to check the result and and a checkbox to add a bigger Front view. Any Java3D primitive (ie Cone, Cube, Sphere and Cylinder) may be choosen for the scene. In each view you may use the mouse to navigate : the left button handles rotations, the right one handles translations and the middle one is used for the zoom.
![]()
You may add Antialiasing on the scene and the 3 Axis (x,y,z) to help you to manipulate the objects. Each axis is 1.0 in length.
You also may add the different Java3D lights into the scene :
- Ambient Lights
- Directional Lights
- Spot Lights
- Point Lights
By default only one of each light type is shown, but a panel is available to add some more if needed. The resulting lighting will then be applied on each view.
The Material Panel defines the appearance of an object under illumination, such as the ambient color, diffuse color, specular color, emissive color, and shininess. These attributes are defined in a Java3D Material object. It represents the Java3D Material class.
![]()
![]()
The Material Panel includes the following:
- Emissive - defines the material's emissive color. This is the color of light, if any, that the material emits. The emissive color in this Material object may be overridden by per-vertex colors in some cases. If vertex colors are present in the geometry, and lighting is enabled, and the colorTarget is EMISSIVE, and vertex colors are not being ignored, then the vertex colors are used in place of this Material's emissive color in the lighting equation. The range of values is 0.0 to 1.0. The default emissive color is in general (0.0, 0.0, 0.0) but here it is set to (0.36f, 0.85f, 0.80f).
- Ambient - defines the material's ambient color. This specifies how much ambient light is reflected by the surface. The ambient color in this Material object may be overridden by per-vertex colors in some cases. If vertex colors are present in the geometry, and lighting is enabled, and the colorTarget is either AMBIENT or AMBIENT_AND_DIFFUSE, and vertex colors are not being ignored, then the vertex colors are used in place of this Material's ambient color in the lighting equation. The range of values is 0.0 to 1.0. The default ambient color is (0.2, 0.2, 0.2).
- Diffuse - defines the material's diffuse color. This is the color of the material when illuminated by a light source. The diffuse color in this Material object may be overridden by per-vertex colors in some cases. If vertex colors are present in the geometry, and lighting is enabled, and the colorTarget is either DIFFUSE or AMBIENT_AND_DIFFUSE, and vertex colors are not being ignored, then the vertex colors are used in place of this Material's diffuse color in the lighting equation. The range of values is 0.0 to 1.0. The default diffuse color is (1.0, 1.0, 1.0).
- Specular - defines the material's specular color. This is the specular highlight color of the material. The specular color in this Material object may be overridden by per-vertex colors in some cases. If vertex colors are present in the geometry, and lighting is enabled, and the colorTarget is SPECULAR, and vertex colors are not being ignored, then the vertex colors are used in place of this Material's specular color in the lighting equation. The range of values is 0.0 to 1.0. The default specular color is (1.0, 1.0, 1.0).
- Lighting - Enables or disables lighting for this appearance component object.
- Shininess - defines the material's shininess. This specifies a material specular scattering exponent, or shininess. It takes a floating point number in the range [1.0, 128.0] with 1.0 being not shiny and 128.0 being very shiny. The default value for the material's shininess is 64.
- CorlorTarget - Sets the color target for per-vertex colors. When lighting is enabled and per-vertex colors are present (and not ignored) in the geometry for a given Shape3D node, those per-vertex colors are used in place of the specified material color(s) for this Material object. The color target is ignored when lighting is disabled or when per-vertex colors are not used. The ColorInterpolator behavior also uses the color target to determine which color in the associated Material is modified. The default target in Java3D is DIFFUSE.
The Transparency Panel defines the attributes that affect transparency of the object, such as the transparency mode (blended, screen-door), blending function (used in transparency and antialiasing operations), and a blend value that defines the amount of transparency to be applied to this Appearance component object. It represents the Java3D TransparencyAttributes class.
![]()
The Transparency Panel includes the following:
- Transparency Mode - defines how transparency is applied to this Appearance component object. The default value is NONE.
- FASTEST - uses the fastest available method for transparency.
- NICEST - uses the nicest available method for transparency.
- SCREEN_DOOR - uses screen-door transparency. This is done using an on/off stipple pattern in which the percentage of transparent pixels is approximately equal to the value specified by the transparency parameter.
- BLENDED - uses alpha blended transparency. The blend equation is specified by the srcBlendFunction and dstBlendFunction attributes. The default equation is:
where
alphasrc*src + (1-alphasrc)*dst
alphasrc
is1-transparency
. When this mode is used with a Raster object or with a Geometry that contains per-vertex colors with alpha, the alpha values in the Raster's image or in the Geometry's per-vertex colors are combined with the transparency value in this TransparencyAttributes object to perform blending. In this case, the alpha value used for blending at each pixel is:
alphasrc = alphapix * (1-transparency)
.- NONE - no transparency; opaque object.
- Blend Function - used in blended transparency and antialiasing operations.
The Source Function specifies the factor that is multiplied by the source color. This value is added to the product of the destination factor and the destination color. The default source blend function is BLEND_SRC_ALPHA. The source blend function is one of the following:The Destination Function specifies the factor that is multiplied by the destination color; this value is added to the product of the source factor and the source color. The default destination blend function is BLEND_ONE_MINUS_SRC_ALPHA. The destination blend function is one of the following:
- BLEND_ZERO - the blend function is
f = 0
- BLEND_ONE - the blend function is
f = 1
- BLEND_SRC_ALPHA - the blend function is
f = alphasrc
- BLEND_ONE_MINUS_SRC_ALPHA - the blend function is
f = 1 - alphasrc
- BLEND_DST_COLOR - the blend function is
f = colordst
- BLEND_ONE_MINUS_DST_COLOR - the blend function is
f = 1 - colordst
- BLEND_ZERO - the blend function is
f = 0
- BLEND_ONE - the blend function is
f = 1
- BLEND_SRC_ALPHA - the blend function is
f = alphasrc
- BLEND_ONE_MINUS_SRC_ALPHA - the blend function is
f = 1 - alphasrc
- BLEND_SRC_COLOR - the blend function is
f = colorsrc
- BLEND_ONE_MINUS_SRC_COLOR - the blend function is
f = 1 - colorsrc
- Transparency Value - the amount of transparency to be applied to this Appearance component object. The transparency values are in the range [0.0, 1.0], with 0.0 being fully opaque and 1.0 being fully transparent. The default value is 0.0.
The Texture Panel defines attributes that apply to texture mapping.
![]()
![]()
The Texture Panel includes the following:
- Transform - the texture transform object used to transform texture coordinates. The texture transform can translate, scale, or rotate the texture coordinates before the texture is applied to the object.
- Perspective Correction Mode - the perspective correction mode used for color and texture coordinate interpolation. One of the following:
The default value is NICEST.
- NICEST - uses the nicest (highest quality) available method for texture mapping perspective correction.
- FASTEST - uses the fastest available method for texture mapping perspective correction.
- Texture Mode - defines how the object and texture colors are blended. The mode may be one of the following:
C = Incoming color to the texture unit state. For texture unit state 0, C is the object color Ct = Texture color
- MODULATE - modulates the incoming color with the texture color.
C' = C Ct
- DECAL - applies the texture color to the incoming color as a decal.
C'rgb = Crgb (1 - Cta) + Ctrgb Cta
C'a = Ca- BLEND - blends the texture blend color with the incoming color.
C'rgb = Crgb (1 - Ctrgb) + Cbrgb Ctrgb
Note that if the texture format is INTENSITY, alpha is computed identically to red, green, and blue:
C'a = Ca CtaC'a = Ca (1 - Cta) + Cba Cta
- REPLACE - replaces the incoming color with the texture color.
C' = Ct
- COMBINE - combines the object color with the texture color or texture blend color according to the combine operation as specified in the texture combine mode.
Cb = Texture blend color
The default value is REPLACE.
- Blend Color - the constant texture blend color. In General, the default value is (0,0,0,0). Here it is set to (0.5,0.5,0.5,0.5).
- Combine Mode - defines the RGB/Alpha combine operation when texture mode specifies COMBINE. The combine mode includes the following:
where C0, C1 and C2 are determined by the color source, and the color operand.
- COMBINE_REPLACE
C' = C0
- COMBINE_MODULATE
C' = C0 C1
- COMBINE_ADD
C' = C0 + C1
- COMBINE_ADD_SIGNED
C' = C0 + C1 - 0.5
- COMBINE_SUBTRACT
C' = C0 - C1
- COMBINE_INTERPOLATE
C' = C0 C2 + C1 (1 - C2)
- COMBINE_DOT3
C' = 4 * ( (C0r - 0.5) * (C1r - 0.5) + (C0g - 0.5) * (C1g - 0.5) + (C0b - 0.5) * (C1b - 0.5))
where CNx is the x component of the Nth color operand in the combine operation.
The value C' will be placed to the all three r,g,b components or the a component of the output.
The default value is COMBINE_MODULATE.- Combine Color Source - defines the RGB/Alpha source for a color operand in the combine operation. The color source includes the following:
- COMBINE_OBJECT_COLOR - object color
- COMBINE_TEXTURE_COLOR - texture color
- COMBINE_CONSTANT_COLOR - texture blend color
- COMBINE_PREVIOUS_TEXTURE_UNIT_STATE - color from the previous texture unit state. For texture unit state 0, this is equivalent to COMBINE_OBJECT_COLOR.
The default value is (COMBINE_TEXTURE_COLOR, COMBINE_PREVIOUS_TEXTURE_UNIT_STATE, COMBINE_CONSTANT_COLOR).- Combine Color Function - specifies the RGB/Alpha function for a color operand in the combine operation. The valid values are:
The function for the alpha component only accepts COMBINE_SRC_ALPHA and COMBINE_ONE_MINUS_SRC_ALPHA.
- COMBINE_SRC_COLOR - the color function is f = Crgb
- COMBINE_ONE_MINUS_SRC_COLOR - the color function is f = (1 - Crgb)
- COMBINE_SRC_ALPHA - the color function is f = Ca
- COMBINE_ONE_MINUS_SRC_ALPHA - the color function is f = (1 - Ca)
For RGB the default value is COMBINE_SRC_COLOR for (C0,C1,C2) and for Alpha it is set to COMBINE_SRC_ALPHA for (C0,C1,C2).- Combine Scale Factor - specifies the scale factor to be applied to the output color of the combine operation. The valid values include: 1, 2, or 4. The default value is set to 1.
The System Info Panel gives information on the system environnement, in particular the architecture, the Operating System and the memory used in real time through the JVM. This panel is accessible from the question mark in the menu bar.
The GC Button may be used to force a Garbage Collector.
![]()
This panel also gives a flash view on the live Threads.
![]()
The Java3D Characteristics Panel queries information from the used Java3D Universe and Canvas. This panel is accessible from the question mark in the menu bar.
![]()
In particular this Panel gives the following information :
j3d.version
A String that defines the Java 3D implementation version. The portion of the implementation version string before the first space must adhere to one of the the following three formats (anything after the first space is an optional free-form addendum to the version):
x.y.z
where:
x.y.z_p
x.y.z-ssss
x is the major version number
y is the minor version number
z is the sub-minor version number
p is the patch revision number
ssss is a string, identifying a non-release build (e.g., beta1, build47, rc1, etc.). It may only contain letters, numbers, periods, dashes, or underscores.j3d.vendor
String that specifies the Java 3D implementation vendor.
j3d.specification.version
A String that defines the Java 3D specification version. This string must be of the following form:
x.y
where:x is the major version number
No other characters are allowed in the specification version string.
y is the minor version number
j3d.specification.vendor
String that specifies the Java 3D specification vendor.
j3d.pipeline
String that specifies the Java 3D rendering pipeline. This could be one of: "NATIVE_OGL", "NATIVE_D3D", or "JOGL". Others could be added in the future.
j3d.renderer
String that specifies the underlying rendering library. This could be one of: "OpenGL" or "DirectX". Others could be added in the future.
doubleBufferAvailable
A Boolean indicating whether or not double buffering is available for this Canvas3D. This is equivalent to the getDoubleBufferAvailable method. If this flag is false, the Canvas3D will be rendered in single buffer mode; requests to enable double buffering will be ignored.
stereoAvailable
A Boolean indicating whether or not stereo is available for this Canvas3D. This is equivalent to the getStereoAvailable method. If this flag is false, the Canvas3D will be rendered in monoscopic mode; requests to enable stereo will be ignored.
sceneAntialiasingAvailable
A Boolean indicating whether or not scene antialiasing is available for this Canvas3D. This is equivalent to the getSceneAntialiasingAvailable method. If this flag is false, requests to enable scene antialiasing will be ignored.
sceneAntialiasingNumPasses
An Integer indicating the number of passes scene antialiasing requires to render a single frame for this Canvas3D. If this value is zero, scene antialiasing is not supported. If this value is one, multisampling antialiasing is used. Otherwise, the number indicates the number of rendering passes needed.
texture3DAvailable
A Boolean indicating whether or not 3D Texture mapping is available for this Canvas3D. If this flag is false, 3D texture mapping is either not supported by the underlying rendering layer or is otherwise unavailable for this particular Canvas3D. All use of 3D texture mapping will be ignored in this case.
textureColorTableSize
An Integer indicating the maximum size of the texture color table for this Canvas3D. If the size is 0, the texture color table is either not supported by the underlying rendering layer or is otherwise unavailable for this particular Canvas3D. An attempt to use a texture color table larger than textureColorTableSize will be ignored; no color lookup will be performed.
textureLodRangeAvailable
A Boolean indicating whether or not setting only a subset of mipmap levels and setting a range of texture LOD are available for this Canvas3D. If it indicates false, setting a subset of mipmap levels and setting a texture LOD range are not supported by the underlying rendering layer, and an attempt to set base level, or maximum level, or minimum LOD, or maximum LOD will be ignored. In this case, images for all mipmap levels must be defined for the texture to be valid.
textureLodOffsetAvailable
A Boolean indicating whether or not setting texture LOD offset is available for this Canvas3D. If it indicates false, setting texture LOD offset is not supported by the underlying rendering layer, and an attempt to set the texture LOD offset will be ignored.
textureWidthMax
An Integer indicating the maximum texture width supported by this Canvas3D. If the width of a texture exceeds the maximum texture width for a Canvas3D, then the texture will be effectively disabled for that Canvas3D.
textureHeightMax
An Integer indicating the maximum texture height supported by this Canvas3D. If the height of a texture exceeds the maximum texture height for a Canvas3D, then the texture will be effectively disabled for that Canvas3D.
textureBoundaryWidthMax
An Integer indicating the maximum texture boundary width supported by the underlying rendering layer for this Canvas3D. If the maximum supported texture boundary width is 0, then texture boundary is not supported by the underlying rendering layer. An attempt to specify a texture boundary width > the textureBoundaryWidthMax will effectively disable the texture.
textureEnvCombineAvailable
A Boolean indicating whether or not texture environment combine operation is supported for this Canvas3D. If it indicates false, then texture environment combine is not supported by the underlying rendering layer, and an attempt to specify COMBINE as the texture mode will be ignored. The texture mode in effect will be REPLACE.
textureCombineDot3Available
A Boolean indicating whether or not texture combine mode COMBINE_DOT3 is supported for this Canvas3D. If it indicates false, then texture combine mode COMBINE_DOT3 is not supported by the underlying rendering layer, and an attempt to specify COMBINE_DOT3 as the texture combine mode will be ignored. The texture combine mode in effect will be COMBINE_REPLACE.
textureCombineSubtractAvailable
A Boolean indicating whether or not texture combine mode COMBINE_SUBTRACT is supported for this Canvas3D. If it indicates false, then texture combine mode COMBINE_SUBTRACT is not supported by the underlying rendering layer, and an attempt to specify COMBINE_SUBTRACT as the texture combine mode will be ignored. The texture combine mode in effect will be COMBINE_REPLACE.
textureUnitStateMax
An Integer indicating the maximum number of texture unit states supported by the underlying rendering layer. Java3D allows an application to specify number of texture unit states more than what the underlying rendering layer supports; in this case, Java3D will use multi-pass to support the specified number of texture unit states.
textureCubeMapAvailable
A Boolean indicating whether or not texture cube map is supported for this Canvas3D. If it indicates false, then texture cube map is not supported by the underlying rendering layer, and an attempt to specify NORMAL_MAP or REFLECTION_MAP as the texture generation mode will be ignored. The texture generation mode in effect will be SPHERE_MAP.
textureDetailAvailable
A Boolean indicating whether or not detail texture is supported for this Canvas3D. If it indicates false, then detail texture is not supported by the underlying rendering layer, and an attempt to specify LINEAR_DETAIL, LINEAR_DETAIL_ALPHA or LINEAR_DETAIL_RGB as the texture magnification filter mode will be ignored. The texture magnification filter mode in effect will be BASE_LEVEL_LINEAR.
textureSharpenAvailable
A Boolean indicating whether or not sharpen texture is supported for this Canvas3D. If it indicates false, then sharpen texture is not supported by the underlying rendering layer, and an attempt to specify LINEAR_SHARPEN, LINEAR_SHARPEN_ALPHA or LINEAR_SHARPEN_RGB as the texture magnification filter mode will be ignored. The texture magnification filter mode in effect will be BASE_LEVEL_LINEAR.
textureFilter4Available
A Boolean indicating whether or not filter4 is supported for this Canvas3D. If it indicates flase, then filter4 is not supported by the underlying rendering layer, and an attempt to specify FILTER_4 as the texture minification filter mode or texture magnification filter mode will be ignored. The texture filter mode in effect will be BASE_LEVEL_LINEAR.
textureAnisotropicFilterDegreeMax
A Float indicating the maximum degree of anisotropic filter available for this Canvas3D. If it indicates 1.0, setting anisotropic filter is not supported by the underlying rendering layer, and an attempt to set anisotropic filter degree will be ignored.
compressedGeometry.majorVersionNumber
compressedGeometry.minorVersionNumber
compressedGeometry.minorMinorVersionNumber
Integers indicating the major, minor, and minor-minor version numbers, respectively, of the version of compressed geometry supported by this version of Java 3D.
native.version
A String indicating the version number of the native graphics library. The format of this string is defined by the native library.
The Java Info Panel gives information related to Java, ie the Java Version and the JRE used, the CLASSPATH ... It is accessible from the question mark in the menu bar.
![]()
This Panel also shows all the used class and their version.
![]()
Through this Panel it is also possible to see all the defined Java System properties.
![]()
The User Info Panel gives mostly information related to the user, ie your Login, you Home directory, your language ... It is accessible from the question mark in the menu bar.
![]()
The Parameters Values Info Panel summarizes all the Appearance3DChooser values that are handled by this component for a java3D Appearence object.
![]()