Jump to content

  • Log In with Google      Sign In   
  • Create Account


Unreal 4 voxels


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
10 replies to this topic

#1 3DModelerMan   Members   -  Reputation: 965

Like
0Likes
Like

Posted 09 October 2012 - 06:14 PM

I've been reading about Unreal 4's graphics techniques and heard about the sparse voxel octree cone tracing for global illumination, and the true emissive materials it provides. Does anyone know if that's ALL voxels? Or are voxels only used to accelerate the cone tracing?

Sponsor:

#2 Necrolis   Members   -  Reputation: 1281

Like
1Likes
Like

Posted 10 October 2012 - 01:42 AM

You should give their siggraph 2012 presentation a read, as well as Cyril Crassin's papers a read (where the technique is derived from). From what I understand of this technique, any voxel may inject or remove light based on the properties it stores and how you treat those properties.

#3 CryZe   Members   -  Reputation: 768

Like
1Likes
Like

Posted 10 October 2012 - 05:41 AM

The voxels are not used for the actual rendering, just for the secondary bounces of the lighting.

#4 3DModelerMan   Members   -  Reputation: 965

Like
0Likes
Like

Posted 10 October 2012 - 08:50 AM

I see now. The voxels seem to be updated on the fly. So shadows come automatically with this system then? I noticed that UE4 still needs AO and deferred shading. If the light bounces are simulated then doesn't AO come for free?

#5 MJP   Moderators   -  Reputation: 10601

Like
2Likes
Like

Posted 10 October 2012 - 01:25 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.

#6 Lightness1024   Members   -  Reputation: 702

Like
0Likes
Like

Posted 10 October 2012 - 03:49 PM

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.
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 jcabeleira   Members   -  Reputation: 670

Like
1Likes
Like

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.

#8 gboxentertainment   Members   -  Reputation: 766

Like
0Likes
Like

Posted 16 October 2012 - 05:44 PM

According to a presentation done by Crassin on his engine, voxel octree cone-traced shadows are actually faster, the softer they are - due to the mip-mapping using the octree structure.

#9 Frenetic Pony   Members   -  Reputation: 1221

Like
0Likes
Like

Posted 17 October 2012 - 03:17 PM

Edited on a day when I can brain again- So I've been thinking, why doesn't Epic (or anyone else using this) just set all materials as emissive, but only tagged for the voxelization?

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 Lightness1024   Members   -  Reputation: 702

Like
0Likes
Like

Posted 18 October 2012 - 03:09 AM

There is another video where they show the cone tracing in action. We don't see it, but it is actually everywhere. EVERYWHERE. i'm putting caps here because its quite stunning. the cave scenes with only direct lighting show only black stuff, and only the sky is visible in a tight hole in the broken ceiling and a mini small tight tiny spot of light on the ground. and all the lighting comes from there. crazy.

#11 gboxentertainment   Members   -  Reputation: 766

Like
0Likes
Like

Posted 07 November 2012 - 05:04 PM

I'm still a bit confused by the bricks. Crassin mentions in most of his papers that color values are written to the leaf nodes of the octree structure after its creation.
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?




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS