Can any engine do this ?

63c8989a6aaf6d2ecfa91667d92fe642
0
Paulo_Andrade 101 Feb 25, 2012 at 07:04

I was wondering, what are the limitations of current game engines. Can they :

  • Generate shadows over curved surfaces ?
  • Generate reflection on curved surfaces ?
  • Generate reflections from parts of a scene that haven’t rendered before ?
  • Turn on / Off individual lights and have this lights affect the global illumination of the scene ?
  • Move lights randomly at the scene and have these lights affect ambient occlusion and indirect illumination ?
  • Move / Destroy objects and have this affect shadows and illumination ?
  • Simulate prism like light decomposition ?

If possible, could you point me references ?

Thanks in Advance !

6 Replies

Please log in or register to post a reply.

820ce9018b365a6aeba6e23847f17eda
0
geon 101 Feb 25, 2012 at 09:56

@Paulo Andrade

  • Generate shadows over curved surfaces ?

Absolutely. Both shadow volumes and shadow mapping handles this perfectly. Any engine after Doom 3 should do it, provided the hardware is powerful enough.
@Paulo Andrade

  • Generate reflection on curved surfaces ?

Yes and no. The effect would be convincing enough for most situations, but not physically correct. Especially self reflection is tricky.

Usually, an object would use a reflection cube map, rendered from a single sample point and use the object normal only to interpolate it.

Flat surfaces like water or building glass facades could use a reflection rendered to a normal texture, and just disort it based on the bump/normal map.
@Paulo Andrade

  • Generate reflections from parts of a scene that haven’t rendered before ?

Yes. Wether or not the reflected part has been rendered before is irrelevant.

You might be thinking about *refraction* where you could first render the lake bottom, disort it and render the water surface on top of it.
@Paulo Andrade

  • Turn on / Off individual lights and have this lights affect the global illumination of the scene ?
  • Move lights randomly at the scene and have these lights affect ambient occlusion and indirect illumination ?

Some engines can do this. If the engine supports dynamic global illumination, you should be able to move/turn on lights in realtime. Otherwise it would just be a precomputed lightmap.

Ambient Occlusion has nothing to do with light sources. It’s kind of the point of it.
@Paulo Andrade

  • Move / Destroy objects and have this affect shadows and illumination ?

Any effect that does not rely on precomputed light mapping woudl work just fine with this.
@Paulo Andrade

  • Simulate prism like light decomposition ?

I have never heard of an engine that supports this. I guess it’s a very minor effect in most games, not worth implementing.

There are however some shader demos showing off pretty convincing prismatic effects.

If it is the caustics you are after, they are very difficult to replicate accurately. I’ve seen some pretty nice faked ocean floor caustics in demos, though. Not sure if any engine does it out of the box.

B20d81438814b6ba7da7ff8eb502d039
0
Vilem_Otte 117 Feb 25, 2012 at 15:34

So, I’ll also try to answer:

  • Generate shadows over curved surfaces ?

    Actually shadow mapping can fail a bit in this case, can also be a bit “jaggy” (note that some time ago, someone post to my shadow topic here link to good paper solving jagginess of shadow maps - basically cascaded shadow mapping, but with better method to split and fit them to viewport). E.g. cascaded shadow mapping works (for directional lights), for local point lights - you can use shadowing-cube - good results, but for intense lights it sucks a bit.

    Shadow volumes are … well … not too useful these days. They’re too fillrate heavy to be used in modern scenes and it seem, they might as well die (as a technique). Also they’re a bit harder (and slower) when it comes to simulate soft shadows and/or plausible shadows.

  • Generate reflection on curved surfaces ? Most technologies use cube-mapping (Source engine) or screen-space reflections (Cryengine 2) to fake this. Some (mostly home-made engines) use physically based solution to this through realtime ray tracing (it can be very well fit together with any deffered pipeline). Although I think no commercial engine actually uses this techinque.
  • Generate reflections from parts of a scene that haven’t rendered before ? If you meant refractions, then again - most commercial engines can’t (same goes also for F.e. screen-space reflections). Cube-maps are also pre-rendered … so actually you can generate them again (correctly) just through ray tracing.
  • Turn on / Off individual lights and have this lights affect the global illumination of the scene ? Actually any game engine that has dynamic lights can do this of course it has to support global illumination through some kind of hack, well unless it doesn’t use path-tracing or some other physically based solution for GI (radiosity … well, close enough :P). Crytek’s LPV are far off being physically based, but better fake than nothing … or?
  • Move lights randomly at the scene and have these lights affect ambient occlusion and indirect illumination ?

    Actually real-time computed Indirect Illumination is quite tricky - path tracing is fully realtime and physically based, and well … a lot slower than hacking indirect illumination. Radiosity is well for pre-computing, instant radiosity is good at this (but well I think no commercial engine actually uses it, or does Frostbite use something like this?), then we have here LPV from Crytek.

    Ambient occlusion is just a way to hack indirect illumination ;) In real light physics (meaning path tracing) there is nothing like ambient occlusion.

  • Move / Destroy objects and have this affect shadows and illumination ? Actually any engine with dynamic shadows and dynamic lighting can do this.
  • Simulate prism like light decomposition ? Yes! You can see it in Crysis 1 when underwater (of course it is very cheap hack). I tried something similar (again through hack) and it is quite fast and looking good (but it won’t work on prism - just F.e. underwater, or on very little light dispersion). Of course, again, path tracing can actually solve this (with a little of extending it).
A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Feb 25, 2012 at 17:39

The Unreal “Samaritan” demo actually does do raytraced reflections in a limited way. They don’t raytrace against the whole scene, just some quads for the bright neon signs, plus a distance field stored in a volume texture to get occlusion from buildings. There’s a talk about their technology here although they don’t go into all that much detail. Supposedly this technology is in the UDK although I’m not sure if it’s in the free version or limited to the one you have to pay lots of $$ for.

B20d81438814b6ba7da7ff8eb502d039
0
Vilem_Otte 117 Feb 25, 2012 at 20:06

Seems interesting, I wonder what numbers they got with their ray tracing (and I doubt they actually use some (Q)BVH or KD-tree - as it isn’t that much reflective surfaces, and raytracing 100 surfaces is like childs play for GPU, or even for CPU)… It could be interesting addition to my game engine (for lower performance computers, as fully raytraced reflections are indeed quite heavy).

EDIT: I think about making article + demo here about the stuff they use… could be C/C++/OpenCL fun :P

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Feb 25, 2012 at 20:59

Oh, I’m sure they don’t use any space partitioning, they probably just intersect each ray with each quad exhaustively. :)

The distance field approach is kind of interesting, though; it skips over large empty spaces quickly and then goes slow when nearby geometry, actually a lot like a kd-tree…

B20d81438814b6ba7da7ff8eb502d039
0
Vilem_Otte 117 Feb 26, 2012 at 01:35

IMHO the distance field approach will be slower. Anyway I’ve said to myself that I’m just gonna test it (with similar approach - of course without the distance field as I think I’ve figured out a bit faster solution IMO - but can’t say before I actually make and test it).

Okay I’m gonna do the basic math for this and start writing application (and most probably sleep in the time between also :D), of course I’ll report as soon as I get some decent results. (The ray-tracing guy read of interesting technique, let’s code! :ph34r:)

And ehm… I appologize to OP, that I a bit spammed his topic, sorry.