• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java3D - Why could objects disappear?

 
zoe goddard
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've got a 3D application that displays an animation. Sometimes my objects are not visible. I know its not the clip planes causing it. What other things could cause this?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you already double-buffering? If not, perhaps this would help matters.
 
zoe goddard
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I'm not double buffering. I have no idea how to do this in Java3d.
I was wondering more along the lines of do I have to make some sort of viewing area bigger, like you have to do with clip planes.
I've got a dozen objects I read in and place. I've created a camera so I can move around and point at objects. I've got a play button that goes and moves the objects in the universe. I'll step through time and everything is fine then after awhile objects just start disappearing. It doesn't have to do with clip planes, camera location or zoom. It's weird.
 
zoe goddard
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope everyone had a good weekend.
I noticed something about my application. I think I might have a clue about what's going on. I think my objects might just be turning black, therefore making them look invisible against the black background. One of the things that happens is I've got a big and little object I can see. Then as the little object moves towards the big object you can see it until it gets close and then it disappears (and its not inside the big object, because I can rotate to certain angles and see a black silloute of the little object against the big object). Could this be due to the way I'm doing lighting?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It could be. It might not be. I don't think there is enough information for an outsider to tell you what's going on.
I don't know what API you are using. Could you just add another light source in a location you'd think would illuminate your darkened figures to see if perhaps shadows are your problem?
 
zoe goddard
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It turns out that my objects moved outside of the bounding sphere of the ambient light points. I assumed that since the ambient light was added to the branch groups that it would move along with the the branch groups being transformed. Apparently not. Also it seems that the entire object geometry most move out of the light bounds before it disappears, but I didn't verify this.
I'm using the Java 3D package (java3d-1_2_1_04-win32-opengl-sdk.exe)
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For those who aren't familiar with it, the Java 3D API is a very neat way to do 3D graphics. There is a Manning book on the subject which I reviewed (see the Bunkhouse) which was faascinating.
 
zoe goddard
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the book by Selman, it helped me a lot, but personally I don't like some of the code examples.
I don't know if its because I still don't know very much, or if its because his way of thinking is way different than mine. I'm still glad I got the book I use it a lot.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!