|
Devising a visualiser for a sculptor friend I
have written an application which displays two intersecting spiral planes, one
clockwise and one anticlockwise. I have the planes displaying correctly, but the
materials and colours are completely different.
In true Java fashion I have an interface which
accepts the dimensional data for the two spirals and I build the geometry and
appearance in two instantations of the one class ( SpiralPlane ), passing
the separate dimensions sets to each, via the constructor. The
geometry is different for each as dictated by the dimensions using
GeometeryInfo class to construct a Triangle Strip Array each time the class is
called. The Materials Node Component is the same for each call, but they display
differently!
e.g. I get one gold spiral, which is
correct for the values set, but the other
spiral appears as black velvet. The selection of the colours and
shininess is fixed in the class and not passed to it from
elsewhere.
I have run many different options, such as cutting
off one or the other spirals, with no effect I still get the same spiral
displaying the same effect, but now alone on the screen.
The two shapes are children of children of separate
TransformGroups, both children, in turn, of the a common BranchGroup. The lights
( 3 ) and the background are further up the scene tree.
I believe it is the lighting, but I cannot explain
it further. Enabling the emissive colour of the Material and
lights up the "black velvet". Without enabling the emissive colour there
is a hint of reflected light, but the effect looks as though there is a very
small shininess value.
By the way, I like the effect, but my sculptor
friend will be not impressed by my input into the "creative"
end
Peter S.
|
