Hi all.  I want to preface this and other questions/comments with the
statement that I am a Java3d novice.  I am just learning this and many of my
questions will be out of ignorance.  I have read the white papers, api spec,
tutorials and looked at all the demo programs.  However there seems to be
many ways to do things and the example programs, especially ones written by
third parties (like BViewer and BuildYourOwnVR) are written very
differently.

On to the issue.

I have been working with the BuildYourOwnVR code-base, added
KeyBehavior.java, completely changed the UsefulUniverse (now based on simple
universe) and added support for the NSCA loaders and helper classes.

Well I have the default "museum" scene loaded and decided to start bringing
in 3ds models and experiment with them.  I saved a poser human model out in
3ds format and used the NSCA loader to bring it in.  It came into the scene
but as a black outline only.  I can move around it and look at it from all
angles, but there is no "definition" to the model.  Trying to figure this
out I ran the LoadObj demo and loaded the galleon.obj file.  It displayed
and rotated fine.  So I used the sun OBJ loader and brought the galleon into
my scene.  Once again nothing but a black outline.  I was very confused and
started bringing in code from the ObjLoad program bit by bit and adding it
to a sub group node that I was attaching as a child of my main scene.
Nothing I did mattered until I brought in the lines of code which defined
directional lights.  All of the sudden the model showed up.  I checked my
main scene construction code and found I already had two light sources.  One
is a ambient light source and the other a point light.  I added the two
directional light sources to this same code and removed it from my sub-group
definition and, yes indeed, I can still see the model.  I then brought in my
poser model and now I can see that also.  Can anyone explain this behavior?

The next wierd thing is that the model has appropriate shadows on its
backside, darker on one side than the other, but no other objects in my
universe are so shadowed.  In fact, when I removed the point light and the
ambient light completely from the scene, the museum walls, pillar and
rotating earch spheres did not change their look at all.  Completely harsh
lighting illuminates every corner and both sides of the walls.  Its as if
they don't see the directional lights at all. but are instead illuminated by
ambient light.  But there are no other light sources anywhere in the
program.  I have this nagging suspician that if I removed all light sources
all the musem stuff would still show up the same.

The next wierd thing is that there is no shadow cast on ground from my poser
model.  Its backside is dark, but its standing on the "ground" ( a texture
mapped, flat rectangle ), but there is no shadow cast from the lightsource
to the ground from the object.

There is a lot more experimentation I need to do, but I would love any hints
as to where to look first.  For example, all the museum objects are built
from a sub-class called PositionedElement, whcih really does nothing but
encapsulate a groupnode with the appropriate transformation node and
shape/geometry/texture nodes.  These group-nodes are placed into my scene as
siblings to the models I am loading, so I would really expect them to be
rendered with exacely the same lighting as my model.  very wierd.

The last thing is that the 3ds models I have loaded do not seem to have any
textures on them.  What I mean is that when I bring in a model, it is
illuminated by the light source, but there is NO colors/textures at all,
just a "neutral" color (really absorbing the color of the lights is all).
Now I have not dumped the node hierarchy to really delve into what then
loader is doing to the model, but I do have LOAD_ALL flags set, which should
bring in everything associated with the model into the sub-graph.  Assuming
that the variaous sub-shapes are named, I am sure I can find the shapes
within the sub-graph and apply the textures at run time, but that defeats
part of the purpose of using a modeller in the first place.  Any general
suggestions would be useful.

Thanks

Dave Yazel

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to