I rewrote the radiosity solution over the weekend, this time for the Voxel Farm. Here you can see some results for the same forest scene of the earlier video:
It is a bit tricky to understand the light in these pictures. Primary light sources like the sun and the sky are not shown here. You can only see the light that has bounced off the surfaces or went through the tree crowns, which are translucent.
There are no materials or any texturing. The green hue comes from the crowns and parts of the ground that are covered by grass. But don't pay too much attention to the colors. This was to see if the algorithm was working properly. Also keep in mind the crown polygons are there only to collect, scatter and reflect illumination. They are replaced by the instanced leaves.
I found I needed to get up to 20 bounces to get enough illumination down to the forest ground. Otherwise it was too dark.
Are you modeling your crown polygons as opaque? Would partial transparency let you get by with fewer bounces?
ReplyDeleteWell, they are not fully opaque in the sense they are translucent, they receive and scatter light. But, yes, they are opaque in the sense they will always be hit by light rays.
DeleteI could let some rays go through the crowns, but it could be more expensive. For that I would need to consider crown density, because in some places they are so dense no light should really go through.
Computing additional light bounces is very fast. What takes time is to collect which points in the scene receive light from which other points. Once you have that, doing bounces takes just a tiny fraction of time. Having opaque crowns makes the solution run faster, since I can stop tracing a ray once there is an intersection. If the ray goes all the way to the sky, it takes longer.
How about calculating the average transparency of each texture and modulate the ray by that factor? Should be quite fast and accurate enough.
DeleteIt will still be slower and less accurate that what I have now. Note the crowns are opaque to the rays, but not to the light. Light goes through depending on the depth of the crown, and it gets tinted in the process.
DeleteI think I see shadows on the floor =D, this looks quite good, especially if you attempt to look at the final result.
ReplyDeleteI take it that the lighter the colour in the screenshot, the more light it receives?
Then a response to your response of Tom Hudson; Not sure if it would do any good (But hey, if I throw heaps of ideas in your general direction, I have the chance of at least once being right, right? =D), but what if you sort of make translucent, or partially translucent parts opaque, and let them be a new light source, having the same direction as the main source of light in the sky? This would prevent the need of anything except the crown to have to calculate all the way to the sky.. It could of course add more calculation costs in the actual making of the new light-source, which I am not sure about (I am not yet a programmer XD)
If that doesn't work, and distance is the problem, cant you make sort of a low layer, perhaps even moving with the tree-line, or land-scape, which produces the light, that way it would have to travel less distance in the check.
Now, if these are completely and utterly ridiculous suggestions, I can only say: Sorry, I am not a programmer, nor do I know all that much about computers, but I just didn't want to risk not suggesting it and it being a solution XD.
Well I must admit some of your ideas are a bit over my head :)
DeleteAnyway I am looking for a solution that is simple and robust, that means as few special cases or hacks as possible.
As I said I don't really have a problem adding extra light bounces. It will help for the architecture too. The translucency is something I will reuse for some architectural materials, like marble and even atmosphere and clouds, when I get there.
Heh, over your head as in, too difficult too implement, or me just being terrible at explaining them? XD.
DeleteBut yea, I actually thought you were saying it was a problem >.<
I think you've found a very good happy medium, you definitely need to keep the number of bounces high for architecture to have the right radiosity for interiors. The funny thing with radiosity is it adds SO much to the rendered image, but it often is overlooked because we don't realize tend to think about how much the light bouncing around objects it hit re-colors other objects.
ReplyDeleteThe work you've done here will pay of BIG time down the road, bravo... can't wait to see a render with the true scene and poly's in place, with this radiosity :)
Thanks, I will post some results soon.
DeleteOne thing I did not mention is that this is more than just color. It also computes a direction vector for the light at each point. The normal mapping of the texturing reacts very nicely to the changes in direction.