Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (489)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (555)
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 1260 times)
0 Members and 1 Guest are viewing this topic.
Offline William

Junior Member




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 Member




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.

Ubuntu
Offline William

Junior Member




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 Member




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.

Ubuntu
Offline shawnkendall

Senior Member





« 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
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!

Shawn Kendall
Cosmic Interactive, LLC
http://www.facebook.com/BermudaDash
Offline William

Junior Member




No Exit


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

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.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Nickropheliac (9 views)
2014-08-31 22:59:12

TehJavaDev (22 views)
2014-08-28 18:26:30

CopyableCougar4 (27 views)
2014-08-22 19:31:30

atombrot (40 views)
2014-08-19 09:29:53

Tekkerue (38 views)
2014-08-16 06:45:27

Tekkerue (34 views)
2014-08-16 06:22:17

Tekkerue (24 views)
2014-08-16 06:20:21

Tekkerue (34 views)
2014-08-16 06:12:11

Rayexar (71 views)
2014-08-11 02:49:23

BurntPizza (47 views)
2014-08-09 21:09:32
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!