| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
- Pages:
- 1
- 2
| Implementing effecient camera bounding; spheres...any ideas? | |
|---|---|
| Tweet Topic Started: Nov 18 2007, 11:08 PM (565 Views) | |
| Eansis | Nov 18 2007, 11:08 PM Post #1 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
My game has reached the collision stage. I have searched around for a bounding sphere example, and have found none. Bounding spheres are pretty much a requirement for all modern 3d games. If we can put together a bounding sphere example, I think it would be beneficial to everybody. The thing that puzzles me, is how to detect whether or not something is in the sphere. I mean, using ray tracing, you would have to create about 360^2 rays, which would run the game at about 0 fps. Is sphere checking going to be included in U3d final? If so, is there a way to accomplish this before then? If not, there has to be some way of implementing this. My second puzzlement is, how to check the normal of the plane that has intersected the sphere... Finally, I just want to reiterate that without bounding spheres fully smooth, fully perfect, and fully 3d collision response just isn't possible. Here are some diagrams to show why: ![]() ![]()
|
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| skarik | Nov 19 2007, 01:57 AM Post #2 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Use a physics engine. Wait for U3d 2.1. Find the Bullet Physics Engine to U3d topic on the GMC. Not impossible. You have a defeatist attitude, dear sir. |
| Blog|EHS | |
![]() |
|
| Eansis | Nov 19 2007, 02:01 AM Post #3 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Well sir, if I truly had a defeatist attitude, I wouldn't be trying to implement sphere collisions now would I. What exactly is the Bullet Physics engine? |
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| skarik | Nov 19 2007, 04:23 AM Post #4 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Well, basing on what I read on their site, it does exactly what you want with rays, or something like that. Someone on the GMC is trying to make it for Game Maker. If you ask me, that would be awesome, because then I can finish my trishot. http://www.continuousphysics.com/Bullet/
Good point. :rolleyes: |
| Blog|EHS | |
![]() |
|
| Eansis | Nov 19 2007, 04:33 AM Post #5 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Sounds somewhat complicated, but thats irrelevant because I can't use it anyway (it doesn't exist.)
Btw, what is a trishot?
|
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| skarik | Nov 19 2007, 05:17 AM Post #6 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
It's U3d's equivalent of a gravity gun. Except awesome-r.
Hmm. Have you used the box points way? ![]() Doesn't work with spheres, but pretty good with bounding boxes. Of course, if you have no collision, you already have 24 rays if you're checking all directions. What we need here is
|
| Blog|EHS | |
![]() |
|
| Eansis | Nov 19 2007, 05:14 PM Post #7 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I think you may have something there with your bounding boxes idea...but that distance_to_closest_face would trump all!
|
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| Ruud v A | Nov 19 2007, 06:07 PM Post #8 |
|
Programmer · Artist
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
It depends on how important good collisions are, but you could use the 4 rays thing, but rotate the rays each step. That's 90 degrees, and if you rotate them with 2 degrees per step, it would take 45 steps to detect a collision in extreme cases. At 60 fps, this is less than a second, so for e.g. a camera it could work. I think Skarik's idea is better thoug, the image he showed might just work. |
|
Veniogames Vēnit, ut mē occidĕret. I will not use Ultimate3d 2.x.x anymore - I am an Ogre C++ programmer. | |
![]() |
|
| Bami | Nov 19 2007, 06:35 PM Post #9 |
|
Guess the character, win a prize
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Why is everybody so exited to use Bullet physics? Just use Tokemak, or ODE, or one of the gazillion engines already ported. Tokemak and ODE work perfectly well with X3D, so I couldn't see why they shouldn't work with U3D. |
Here are the thrill seekers, corrupt and immoral.
| |
![]() |
|
| Eansis | Nov 19 2007, 09:06 PM Post #10 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Ruud, in about a second I could traverse about 7 yards, a bullet could hit me from 1500 feet away, and fall 20 meters. Sorry to burst your 'collision bubble', but that rotating the rays each step isn't gonna happen
Bami-Which is easier, Tokamak or ODE? I may end up using those to accomplish sphere checking. Also, where can I find them? |
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| Bami | Nov 19 2007, 09:56 PM Post #11 |
|
Guess the character, win a prize
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Depends, both are pretty easy to learn if you get the hang of it. I'm trying to make a little wrapper for Tokamak though, and since Macarraum was so kind to give the source to it, I can even update errors in it. Both engines are now opensource (tokamak just recently), and both use the BSD license, so license speaking there are no differences between them. I find that tokamak is a bit faster, and supports "materials", different surfaces have different friction values etc. I couldn't accomplish that in ODE. Tokamak has been removed from Macarraums site, but he gave me permission to re-upload it. download.bahmi.com You can download a lot of crap there. Oh, as far as I know, tokamak supports collision checking of meshes, but uses the .bin format, which is just tokamak specific. I don't know if I have a exporter or converter or something, but when I find one, I'll let you know. |
Here are the thrill seekers, corrupt and immoral.
| |
![]() |
|
| Rixeno | Nov 19 2007, 10:49 PM Post #12 |
![]()
Teo-Carliss
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Here, someone's trying to make a DLL from Bullet Physics, once it's done, you might get your wish (if he finishes it) HERE |
|
Report spam the nanosecond you see it. Ninjas are everywhere, for all you know there are eleven behind you right now, including me... | |
![]() |
|
| Eansis | Nov 19 2007, 11:32 PM Post #13 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
"Here, someone's trying to make a DLL from Bullet Physics, once it's done, you might get your wish (if he finishes it) HERE" yeeeaaahhhh...I kind of can't use it since it does not exist...
yeeeaaahhhh...I kind of can't use it if it only uses some obscure format... |
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| Bami | Nov 20 2007, 12:01 AM Post #14 |
|
Guess the character, win a prize
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
it isn't obscure, you just need to go through a bit of trouble. There is this program that converts a ascii table model to the .bin format. You just need to list the vertices in a list. It's better then using 3ds or something, since that has a lot of added data. |
Here are the thrill seekers, corrupt and immoral.
| |
![]() |
|
| Eansis | Nov 20 2007, 12:41 AM Post #15 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
eh...sounds like too much work, and I doubt it perfectly converts the model, how do you convert a DirectX. 8.0 file to ASCII table file? |
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| Go to Next Page | |
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |
- Pages:
- 1
- 2





![]](http://z1.ifrm.com/static/1/pip_r.png)






Btw, what is a trishot?



9:10 PM Jul 11