Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python (or not...) framework for GPU / parallel ray tracing?

I'm doing tech research for my next project, and haven't found anything suitable yet, so I'm giving SO a try.

The problem I'm looking to solve is the following:

  • I have many (hundreds / thousands) of procedurally generated scenes, each consisting of ~10k cubes.
  • In each of them I would like to check 1k-10k rays and get statistics on hit distance.
  • This is not a rendering problem - the rays do not all originate from the same position. (So depth-pass based ray tracing is less suitable)
  • Performance matters. I would like the underlying code to be either GPU based or parallelizable C.

Is there a framework that allows me to do such things? I looked at game engines but mostly don't raytrace. I prefer to find a python framework framework that does this, but will settle on other languages (C# / C++) as well.

What would be the best way to tackle such a problem?

like image 897
Noam Avatar asked Nov 22 '25 07:11

Noam


1 Answers

Which game engines did you looked for? Because Unreal and Unity two of most popular engines in market does already have support. In Python find a good lib or framework may be harder because Python doesn't have a great ecossystem around game engines.

https://docs.unrealengine.com/en-US/Engine/Rendering/RayTracing/index.html

https://docs.unrealengine.com/en-US/Engine/Rendering/RayTracing/RayTracingSettings/index.html

https://developer.nvidia.com/blog/introducing-ray-tracing-in-unreal-engine-4/

https://unity.com/ray-tracing

https://docs.unity3d.com/Packages/[email protected]/manual/Ray-Tracing-Getting-Started.html

Update:

There's an engine in Python called PyGame that it's open source and might have some support, but I'm not sure if it's stable.

https://www.pygame.org/project/4743/6980

After some research I also found a package in Python that might work without a game engine, you could give a try

https://pypi.org/project/ntracer/

like image 102
Douglas Ferreira Avatar answered Nov 24 '25 21:11

Douglas Ferreira



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!