Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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  
  ? 3D physics collision testing with OpenGL  (Read 2195 times)
0 Members and 1 Guest are viewing this topic.
Offline heezel

Junior Devvie

Medals: 7

« Posted 2013-03-13 15:56:23 »

Hey, I just had an idea of simulating 3d physics using offscreen rendering, and never found anything about this on the internet.

So basically,
- imagine an object with some movement force falling somewhere in space,
- I would create an small viewport 1x1 with perspecive inside the object facing the way of the movement force,
- I would render depth values of whole scene into the framebuffer
- then i would just check the depth value if its too close - boom - collision = true;

Dunno if it's worth the gpu and cpu time than regular collision detecting. Does anybody got any article about this or something similar?
Offline quew8

JGO Knight

Medals: 53

« Reply #1 - Posted 2013-03-13 18:34:04 »

Whilst it's a lovely idea, I don't see any way it could be at all efficient. Essentially, each and every frame you would be rendering the entire scene again for each object in motion. That's on top of the normal rendering which is often several passes as it is. Some day hardware will be capable of this. Not today.
Purely theoretically speaking, I don't think it would be as simple as you have made it out to be.
-You couldn't use a 1 x 1 pixel view unless every face was perpendicular to the movement. Unlikely.
-How do you know if its too close? You would have to render the object moving, then render the scene to a different
 frame buffer and then compare them pixel for pixel.
Offline deepthought
« Reply #2 - Posted 2013-03-14 02:59:17 »

Use bullet. It won't slow your frame rate down to 3 seconds per frame.

Mad Scientist
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Danny02
« Reply #3 - Posted 2013-03-14 11:24:31 »

bungee did something like that for their particle effects in halo 3. there is also a slide from GDC I think out there
Pages: [1]
  ignore  |  Print  

EgonOlsen (79 views)
2018-06-10 19:43:48

EgonOlsen (59 views)
2018-06-10 19:43:44

EgonOlsen (78 views)
2018-06-10 19:43:20

DesertCoockie (261 views)
2018-05-13 18:23:11

nelsongames (160 views)
2018-04-24 18:15:36

nelsongames (158 views)
2018-04-24 18:14:32

ivj94 (901 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (813 views)
2018-03-24 14:43:53

Solater (177 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!