Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (602)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (650)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Java3D picking question  (Read 1424 times)
0 Members and 1 Guest are viewing this topic.
Offline William

Junior Devvie

No Exit

« Posted 2003-04-04 15:50:41 »

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!)
Offline Conzar

Junior Devvie

There is nothing common about common sense

« Reply #1 - Posted 2003-04-07 15:54:29 »

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.

Offline William

Junior Devvie

No Exit

« Reply #2 - Posted 2003-04-07 17:05:56 »

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).
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Conzar

Junior Devvie

There is nothing common about common sense

« Reply #3 - Posted 2003-04-07 19:30:23 »

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.

Offline shawnkendall

Senior Devvie

« Reply #4 - Posted 2003-04-07 23:15:43 »

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

Practical Collision Detection

General Collision Detection for Games Using Ellipsoids

Scroll down to Collision Detection

Some Math and Physics for good measure!

Good colliding!

Shawn Kendall
Cosmic Interactive, LLC
Offline William

Junior Devvie

No Exit

« Reply #5 - Posted 2003-04-08 17:22:39 »

Thanks, I'm working on organizing my scene as recommended in the 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 article and the Java tutorials recommend ray picking. The physics articles may come in handy though when finalizing my flight physics for the bird.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Jesse (16 views)
2015-07-29 04:35:27

Riven (37 views)
2015-07-27 16:38:00

Riven (18 views)
2015-07-27 15:35:20

Riven (21 views)
2015-07-27 12:26:13

Riven (12 views)
2015-07-27 12:23:39

BurntPizza (30 views)
2015-07-25 00:14:37

BurntPizza (42 views)
2015-07-24 22:06:39

BurntPizza (24 views)
2015-07-24 06:06:53

NoxInc (31 views)
2015-07-22 22:16:53

NoxInc (20 views)
2015-07-22 22:13:39
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!