Message Boards Message Boards

BVH Accelerated 3D Shadow Mapping

Posted 7 years ago
Attachments:
POSTED BY: Benjamin Goodman
10 Replies
Posted 7 years ago

Hi Benjamin, I think your shadow model is not only playful for video game, but also useful for real engieering. For example, Wind turbine is usually big and high, it generate big shadow. Meanwhile it is slowly dynamic shadow, that shadow makes local inhabitant uncomfortable. I suggust base on your model and local sun trajectory from W|A, you can probably sell your model and predict result to some wind turbine company. http://windni.com/2009/02/04/shadow-casting-from-wind-turbines/

POSTED BY: Frederick Wu

Wow! what a nice a contribution!

Jesús Rico

Anonymous User
Anonymous User
Posted 7 years ago

accelerated 3D, while it isn't as correct, looks impressive and convincing to a point by rendering an insane number of polygons - it's well suited for for solar, city, and geo mapping. ultimately it depends on "what you want to see". were i to choose 1 method i would choose it, i learned the language in 1997 i think, but raytracing i did mid 80's?

keep in mind older "3D accelerated" code uses "fake shadows", newer use a combination of shadowing build-in to the video card features and pre-rendered textures (sometimes raytraced textures). because many of the "documents" on the subject are by gamers you can get misled upon what these cards have in silicon and what must still be "faked" (they have hardware shadows and light sources these days, as well as other effect that aid in "hiding the crime" of faked 3D depth clues) and how (xbox, or city simulations) develope large scenes in production. But mirrors must be faked (render scene backwards, past texture on the mirror), where as in raytracing as you know the reflectivity is specified, and the rays do rest.

raytracing can, if used properly, make images that look as if they are real: but can take a week or a month to render. it's "needed" but less needed than GL?

i don't think you'll enjoy studying GL as much as geology or even lightwaves because you seem inclined to science moreso than "short code tricks that fake depth clues at high speed" and "massive code bases that assembled textures and scenery"

POSTED BY: Anonymous User

Thanks Marco and Sander, for your continued kind words.

Thanks David for your suggestions, and there's some very inspirational methods outlined in the links you provided. I'm still deciding on where to take the project but I think a proper finalisation of it's utility package is a priority. I'm also considering a brief hiatus in favour of unearthing an old project. Either way, GPU acceleration is certainly one entry on my List of Programming Things to Learn!

POSTED BY: Benjamin Goodman
Anonymous User
Anonymous User
Posted 7 years ago

Great work! solar paths are complictaed, ie seeing jpl horizons one must know if the solar position includes the time for light to travel or not :)

The below uses an external renderer (i thought of recoding in mathematica - but that seems further down on the todo list). It might interest you?

rayshade for mathematica

BVH is one of a few methods for pixel shading (Open GL's is more fake but far faster, while raytracing in general uses more real methods). I'm sure BVH is one of a few methods found in books long published on the topic. But in addition there are lighting and color methods (that may even consider parts of Huygens-Fresnel in modeling), and much more "todo" (ugh and fully test!) to make a full raytracer.

I'm wondering if you've explored free source code for raytracers (there are many now), or tried exporting Mahematica Graphics3D to "professional" software like 3DStudio "Art Renderer" ?

POSTED BY: Anonymous User

Thanks for your comment.

Yes, I've been meaning to pick apart the source for the very impressive rayshade for mathematica for a few weeks now. Interesting that you mention solar paths as they were the focus of my research for this project when I started it. The original aim was to simply produce the solar exposure plot described at the end but it turns out the project was more complex than I initially imagined : ) I was debugging my own implementation of the Solar Position Algorithm for Solar Radiation Application by I. Reda & A. Andreas whren I came across the SunPosition function (of course mathematica has a function for the solar position!). Indeed, it made for an interesting exercise and It would be cool to compare SunPositon to the SPA. The authors also provide an exemplar SPA source code in C.

I'm thinking on progressing the project more towards general tools for intersections and optimisation which can be applied beyond computer graphics as it's something which I'd like to have at my disposal. Although I have considered experimenting with some Java based ray casting and tracing libraries and 2/3D game engines and seeing what features can be pulled through a JLink instance.

POSTED BY: Benjamin Goodman
Posted 7 years ago

Wonderful explainer, thx!

Ben, I am a noob to the math you are using, any thoughts on using GPU acceleration, CUDA or OpenCL?

I see these articles:

Thinking Parallel, Part III: Tree Construction on the GPU

https://devblogs.nvidia.com/parallelforall/thinking-parallel-part-iii-tree-construction-gpu/

GPU path tracing tutorial 3: GPU-friendly Acceleration Structures. Now you're cooking with GAS!

http://raytracey.blogspot.com/2016/01/gpu-path-tracing-tutorial-3-take-your.html

POSTED BY: David Proffer

enter image description here - Congratulations! This post is now a Staff Pick! Thank you for your wonderful contributions. Please, keep them coming!

POSTED BY: Moderation Team

Thanks for sharing!

POSTED BY: Sander Huisman

Hi Ben,

good job! That's very nice and useful.

Cheers

Marco

POSTED BY: Marco Thiel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract