Can I calculate light interception by an object ?
Hello everyone,
first a little background of what I am trying to do. It's not game related, as I am looking into the possibility of using Unity to replace a modelling platform we are using called GroIMP, it's a platform for modelling plant growth and especially light interception among others.
So here is what I would like to do. Initially I would work with a plant model created by some other software and imported to Unity. The structure would consist of a main stem and multiple branches and leafs.
The way our current raytracer works is described below, taken by a scientific paper describing the platform (Reference: The rule-based language XL and the modelling environment GroIMP illustrated with simulated tree competition, Reinhard Hemmerling)
When a ray hits a visible object, the intersection point with this object is calculated and a new ray is created. The direction and spectral composition of this new ray are determined by the material properties of the object that was hit and a random number generator suitable for Monte-Carlo integration. The origin of the new ray is set to the intersection point. The amount of radiation that was absorbed by the surface is calculated as the difference between the spectrum of the old and the new ray. This difference is added to the absorption spectrum of the object. For the new ray, the whole process is repeated recursively. The recursion ends if a user-defined recursion depth is reached, if the contribution of the ray falls below a certain threshold or if no object was hit. Sensors are treated similarly, except that they do not modify the ray.
Is something like this even possible in Unity ?
Thank you for going through all this :)