math & physics
xcrypt at March 16th, 2012 09:58 — #1
Hi, I would like to write my own raycasting algorithm implementation with C++, for all types of 3D objects. However I'm not sure where to begin, on google there's a lot of junk and I can't seem to find anything of worth.
Can anyone point me in the right direction? Thanks
reedbeta at March 16th, 2012 12:45 — #2
Just to be clear, do you just want references for ray intersection tests for various shapes? Or are you doing a raytracer and want a full reference on it including acceleration structures, light/shading and the like?
For intersection tests: here's a giant chart of references to intersection algorithms for various combinations of shapes.
xcrypt at March 16th, 2012 13:10 — #3
just the physics, although the raytracing stuff might come in handy too, for later That link is very nice, thanks!
roel at March 17th, 2012 07:14 — #4
However I'm not sure where to begin
vilem_otte at March 17th, 2012 20:39 — #5
Begin with spheres, AABBs (axis aligned bounding boxes) and triangles. Then read something on optimizing (BVHs, KDTrees and such hot stuff) ... and when you've got this implemented, then it's solid start
xcrypt at March 18th, 2012 09:21 — #6
Seems like more game programmers do their physics themselves than I thought! Nice
I already did triangles and working on AABBs/OBBs/spheres atm, reading the book "real-time collision detection"
I'm planning to (try) make a full-scaled current-gen physics engine starting from next year, over a period of 5 years, while going for a computational physics/mathematics degree Atm I just need some basics for a game project I'm working on, which is not so physics intensive.
Can't wait 'till then, I love physics!
Although I have always dreamed about making a physics engine, I'm a bit uncertain if this is productive...
Is there a future in this area, for game development?
Or would I have to direct myself to robotics?
roel at March 18th, 2012 12:01 — #7
I was totally disillusioned after creating my first (and only) 2D physics engine. In theory things are beautiful. In practice, one needs a huge amount of hacks to get things (e.g. stacking) stable. It wasn't fun.
xcrypt at March 18th, 2012 13:36 — #8
I'll have to find that out for myself then
stainless at March 18th, 2012 14:44 — #9
There are really good physics engines out there, both 2D and 3D.
If you want to write one for your own enlightenment, fair play to you. Loads of support and good wishes.
However we have no idea what the hardware will be like in 5 years time, XBOX will be dead, or replaced, same for PS3 I would imagine.
With the work I am doing, it's entirely possible the games machine as we know it will not exist by then and your TV will be the centre of your audio visual universe.
So keep your techniques general, and don't get caught up in "I can make the whole thing work really fast on a quad core fred bloggs processor as long as I have a TI994a Harrry Ramsden graphics card"
xcrypt at March 18th, 2012 16:14 — #10
Thanks for the tips, but I didn't mean to optimise specifically, it's the physics & techniques that interest me (as well as generic optimisation, independent of hardware: eg: spatial partitioning)
Besides, one man making a physics engine who is totally new to the field can not compete to 50 experienced and well-respected men in the field, so it's intent is not commercial, I'll probably make it freeware. I just hope it would be a good thing for my portfolio
system at April 16th, 2012 03:43 — #11
Can you elaborate a little further on your needs?
xcrypt at April 23rd, 2012 15:45 — #12
The first answer given by Reedbeta pretty much gave me what I wanted