I want to develop a component for 3d shadow analysis of 3d city model. I decided to use ray tracing for this purpose. For every time step (for sun's dynamic position during the year) rays will be sent from sun (point light source) and with ray intersection tests surfaces which are and how long are in shadow will be determined. Are there any components for this purpose such as sun's position, ray tracing etc. or do I have to code everything from beginning to the end? Any answer would be very helpful.


1 Answer 1


I use Nvidia OptiX for Ray casting and tracing purposes. It is based on CUDA and gives you a library that runs on GPU and is capable of building and traversing efficient acceleration structures. You just supply a few programs such as intersection tests and shading and OptiX does the rest. I personally think it is really easy to work with it but your milage may vary. With this it should be very doable to make your project and even with decent running speed.

  • $\begingroup$ how can I entegrate it to my software. I am thinking to use unity3d as a developing platform. Can I entegrate Nvidia Optix to it? $\endgroup$
    – Ziya6161
    Commented Jun 10, 2016 at 17:16
  • $\begingroup$ Depends. OptiX has a C/C++ API so if you use Unity with Cpp you should be fine. Just install CUDA and link against the OptiX library. The tricky part will be to get the Nvcc to do its thing. I use CMake for that but I don't know about Unity + CMake. Then just ist unity to visualize the output of the OptiX simulation. $\endgroup$
    – Dragonseel
    Commented Jun 10, 2016 at 17:20
  • $\begingroup$ @Ziya6161 I don't know but Unity3D may have what you need. $\endgroup$
    – user3437
    Commented Jul 11, 2016 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.