Noam
Noam

Reputation: 1901

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:

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?

Upvotes: 3

Views: 1491

Answers (2)

Noam
Noam

Reputation: 1901

Answering my own question. After quite a bit of research we ended up going with Trimesh ( https://trimsh.org/trimesh.html ).

It includes

  • Interopability with popular geometry formats (gltf, obj, dae)
  • Support for fast ray tracing by using pyembree (based on Intel's embree project)
  • Supports batch queries (send X ray queries, get X ray answers back) to avoid the python<->C communication bottleneck.

Upvotes: 0

Douglas Ferreira
Douglas Ferreira

Reputation: 514

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/

Upvotes: 1

Related Questions