Unreal 4 voxels
#1 Members - Reputation: 536
Posted 09 October 2012 - 06:14 PM
#2 Members - Reputation: 692
Posted 10 October 2012 - 01:42 AM
#5 Moderators - Reputation: 5444
Posted 10 October 2012 - 01:25 PM
#6 Members - Reputation: 642
Posted 10 October 2012 - 03:49 PM
About shadows in the voxels, they come from classic shadow maps, actually reflective shadow maps because they are necessary everywhere nowadays the RSMs. Each voxels carries radiance property (from direct lights, occluded by shadow maps), albedo, normal (6 directional), and then other info for mip mapping the voxels and other stuffs.
Therefore, the only stuff lacking in the voxel representation is the GI itself. Because the GI is not yet evaluated at voxel stage, using specular from the voxels cannot show a reflection of the scene as it is with its GI, but only a reflection of the scene as it is with purely direct lighting. Which is an artefact that would gives curious results in some situations if you ask me. But maybe there is a way to retro feed the GI into the voxels after some frames are rendered, however that would be unpure, because everything that is unprojected from perspective views is dirty (variable world density). also that would need to be invalidated everytime an octree region is changed from geometry movement/deformation, and that would cause severe energy jumps. typically the most noticeable kind of instabilities, the ones you dont want. but digressing.
#7 Members - Reputation: 426
Posted 11 October 2012 - 02:49 PM
The indirect light does indeed get shadowed due to the cone tracing, although not perfectly due to the approximations introduced by the voxelizations and the tracing itself. At the SIGGRAPH presentation they mentioned that they were still using SSAO to add some small-scale AO from features that weren't adequately captured by the voxelization, but I think that's a judgement call that you'd have to make for yourself.
The shadowing is better that you may think, it can even be used for direct lighting. A friend of mine has been exploring the use of area lights with voxel cone tracing and has obtained very promising results. He was able to inject area lights into the voxel volume and get very reallistic lighting and soft shadows running perfectly in real-time. The whole thing looked like it was rendered offline even with a modest configuration of cone and sample count.
UE4 still needs AO and deferred ? that´s a pretty curious statement. cone tracing´s second step (the actual cone tracing) should be done from a deferred target otherwise you are risking suiciding your framerate. Secondly, AO is the base effect that cone tracing can achieve, thirdly they have SSAO to complement like MJP says.
They only need SSAO because they're using a small number of cones for the sake of performance. If they decided to use a higher number of cones, from my experiments 16 cones would be enough, they would get the excelent quality AO for free (at the cost of frame rate, of course) for both large and small scale details.
#9 Members - Reputation: 526
Posted 17 October 2012 - 03:17 PM
As in set all materials to emit the same amount of light as you'd want to get from an ambient term. You'd then be cone tracing into a world that's entirely lit. Point being you'd be replacing the ambient term entirely with colored, directional environment light emulating extra bounces everywhere. You'd even get specular off areas not hit by direct light. And it seems like it would all be free if you're already cone tracing everything.
Think of it like the reverse of ambient occlusion. Environment based ambient lighting.
Edited by Frenetic Pony, 18 October 2012 - 03:11 PM.
#10 Members - Reputation: 642
Posted 18 October 2012 - 03:09 AM
#11 Members - Reputation: 335
Posted 07 November 2012 - 05:04 PM
Some of his papers imply that the color values are written to a 3D texture and the octree structure just points to the texture coordinates - is this the same thing?
In his OpenGL Insights chapter he writes that color values are appended to the "voxel fragment list" during voxelization, then this is written to the 3D texture after construction of the octree.
The thing I am most confused about is, if bricks are used that are say 3x3x3, yet coordinates on the 3D-texture does not correspond to coordinates in world space; how would we write the color values so that you get voxels inside a brick that are in the correct order (i.e. the voxels within each brick would neighbour each other as they do in world space)? I am thinking the only way to get correct ordering of voxels within bricks is to generate the octree structure using morton-order interleaving.
Also, if the octree structure is sparse, meaning that every few voxels may border empty-space, how would I tell the code to detect that there are empty space voxels?






