Java3D picking question

Well, well, I have run into some slowness in my less-than-10k-polys scene and I suspect picking could be the culprit. I’m guessing I can resolve the problem by decreasing the amount of shape nodes, but I would also like to know if anyone has done some tests on the best way to handle picking in 3rd person perspective apps.

How much slower is cylinder picking than ray picking? Is there a quicker way than cylinder picking to handle collisions between the world and the player’s bounding-sphere? It seems ray picking from the center of the sphere would result in the possibility of the player’s shoulders going through the walls and his head going through the roof when jumping etc.

grinds teeth over having an Athlon processor as the 1.4.2 VM only provides SSE/SSE2 acceleration (the comp that I am going to present my 3D-app on is a Intel machine though, woohoo!)

Let me ask you this, are you using ray picking for terrain following or cylinder? It might be sufficent enough to use ray for that. Also, how are doing your collision detection? I guess you are just using one big cylinder around your character. It also might make sense to choose points on your character and use a couple of rays at each point - or just use a small cylinder at each point to pick w/. I haven’t tried this out so I’m not sure if this will help your performance or not.

I have two special circumstances that affect the usefulness of terrain following. First, my player character is a bird that will do most of its movement by flying or jumping. Second, I have an indoors environment with a completely flat floor so I don’t need picking to keep the player character from going through the floor. Terrain following would only be needed to handle the situations when the player lands on top of furniture.

I’m using a bounding-sphere to represent the player character. Every frame I do a cylinder pick check between the current center of the bounding-sphere and the position that the player’s velocity wants to bring him the next frame. I have also been thinking about using a number of ray checks instead of the cylinder check, but I think that might cause a problem with thin objects (like table legs or bookcase shelves).

Sounds good to me. I guess someone else w/ more experiance might be able to help you out more then I - they might have some cool trick to use or something.

Collision is notoriously difficult.
Java3D doesn’t make it any easier really.

There are many, many factors that contribute to final accuracy and performance, including the testing geometry as well as the scene organization and shape SIZE and triangle COUNT.

Here a couple links to review that may help, but just keep in mind, “simple” navigation with collision is NOT simple, so don’t get discouraged!

Implementing Terrain Following and Collision Detection in Java 3D
http://www.j3d.org/tutorials/collision/index.html

Practical Collision Detection
http://www.gamedev.net/reference/articles/article736.asp

General Collision Detection for Games Using Ellipsoids
http://www.gamedev.net/reference/articles/article1026.asp

Scroll down to Collision Detection
http://www.gamedev.net/reference/list.asp?categoryid=45#99

Some Math and Physics for good measure!
http://www.gamedev.net/reference/list.asp?categoryid=28

Good colliding!

Thanks, I’m working on organizing my scene as recommended in the j3d.org article. I just wanted to make sure that I had not missed some trick to getting good accuracy with ray picking instead of cylinder picking since the j3d.org article and the Java tutorials recommend ray picking. The physics articles may come in handy though when finalizing my flight physics for the bird.