Hi there
I am writing my Bachelor-Thesis about pathfinding with Raycasting (Raycasting to check the object intersected by a ray)
and .... well it would be great if you could give me some answers^^
1. Are Raycasts in Bulletphysics processed by GPU or CPU?
2. Is it possible to make them processed by GPU (if CPU) / or CPU (if GPU)?
3. Could you give me a link of the proof of the answer I can put in my Bachelorthesis ... like... you know... something "official". Like an article from one of the dev's or something. Or a class in the Engine's Documentation which is telling that the Raycasts are processed by CPU (or GPU)
4. Do you know another Engine which processess Raycasts with GPU ? (or CPU)?
i would be very very very thankful
cheers!
GPU and Raycasts
-
- Posts: 22
- Joined: Sun Jan 17, 2016 2:37 am
Re: GPU and Raycasts
An entire thesis on ray casting seems a bit much but I'll fill you in on my methods. When a user clicks on the screen there are two points a near and a far point. The near point is closest to the screen and the far point is farthest away. The screen coordinates have to be converted to the world coordinates and this can be done by the use of an inverse matrix. (The inverse of the "mvp" or whatever. I use row operations to calculate the inverse matrix) After getting the near and far point hero's formula can be used to calculate the distance any giving point is from the line of sight. This is very accurateRifleRound wrote:Hi there
I am writing my Bachelor-Thesis about pathfinding with Raycasting (Raycasting to check the object intersected by a ray)
and .... well it would be great if you could give me some answers^^
1. Are Raycasts in Bulletphysics processed by GPU or CPU?
2. Is it possible to make them processed by GPU (if CPU) / or CPU (if GPU)?
3. Could you give me a link of the proof of the answer I can put in my Bachelorthesis ... like... you know... something "official". Like an article from one of the dev's or something. Or a class in the Engine's Documentation which is telling that the Raycasts are processed by CPU (or GPU)
4. Do you know another Engine which processess Raycasts with GPU ? (or CPU)?
i would be very very very thankful
cheers!
and comprehensive compared to alternative methods
see the attached image or look at this one
Point A is the near point and B is the far point. Line AB is the line of sight. To calculate how far point C is from the line of sight:
1. find the area of triangle ABC using HERO's formula after calculating the distances of the triangle's sides (<3 hero's formula)
2. use the area of the triangle to calculate the height where AB is the base (area = base * height / 2)
That height is the distance from the line of sight point C is.
An elementary check can be performed to test if the point is behind the camera, simply if angle A is obtuse then the point is behind the camera.
Finding the distance between two 3d points is not so bad.
I hope you enjoyed learning about my methods
You do not have the required permissions to view the files attached to this post.
-
- Posts: 22
- Joined: Sun Jan 17, 2016 2:37 am
Re: GPU and Raycasts
on another note about using the GPU to do it "OpenGL picking using the selection buffer is deprecated."
-
- Posts: 4
- Joined: Thu Jan 14, 2016 11:09 am
Re: GPU and Raycasts
Thanks for the answer (though its not an answer to my questions)
i need that answers - its very important.
Can I somehow contact the devs or something? :/
i need that answers - its very important.
Can I somehow contact the devs or something? :/
-
- Posts: 22
- Joined: Sun Jan 17, 2016 2:37 am
Re: GPU and Raycasts
Using the GPU for heavily multithreaded tasks is really nice but also rather hacker. If a large number of ray casts needed to be computed then yes it could be done on the GPU for improved performance. However if it was only a single ray cast the normal CPU would probably be better.
-
- Posts: 4
- Joined: Thu Jan 14, 2016 11:09 am
Re: GPU and Raycasts
but where do I know I can trust your answer?
(not that i wouldnt believe you)
i need some official stuff.
Like some official dokumentation for my prof.
you know what i mean?
(not that i wouldnt believe you)
i need some official stuff.
Like some official dokumentation for my prof.
you know what i mean?
-
- Posts: 22
- Joined: Sun Jan 17, 2016 2:37 am
Re: GPU and Raycasts
I stumbled upon this video where they use a lot of ray casting to simulate realistic light reflection.
https://youtu.be/4BeqGY2RwcI?t=4m10s
It is much more official I think it would be good for your paper.
https://youtu.be/4BeqGY2RwcI?t=4m10s
It is much more official I think it would be good for your paper.
-
- Posts: 4
- Joined: Thu Jan 14, 2016 11:09 am
Re: GPU and Raycasts
You mean Raytracing.
Its to simulate the reality of the 3D - like the reflection.
BUT Thanks for that Video
its helping me for a few other matters
Its to simulate the reality of the 3D - like the reflection.
BUT Thanks for that Video
its helping me for a few other matters
-
- Posts: 22
- Joined: Sun Jan 17, 2016 2:37 am
Re: GPU and Raycasts
I came across this today while reading the manual
https://github.com/bulletphysics/bullet ... Manual.pdf
(if it doesn't work click on "Raw")
see page 38
https://en.wikipedia.org/wiki/OpenCL
cool stuff
https://github.com/bulletphysics/bullet ... Manual.pdf
(if it doesn't work click on "Raw")
see page 38
https://en.wikipedia.org/wiki/OpenCL
cool stuff