Jump to content

Recommended Posts

Rendering shadow maps from multiple light sources at the same time requires complete rewrite of rendering pipeline in order to retain playable framerates. Devs stated that deferred rendering is what they would like to have at some point, but until then, this could be a satisfactory solution.

Edited by Minoza

Share this post


Link to post
Share on other sites
What on earth is this magical culling that supposedly is easier to do than just render shadowmaps?

The task of culling is to literally remove as much as possible that is not seen by the player, geometry, particle effects, whatever the developers can implement.

Techniques such as these have been floating around since the late 90's, and occlusion is just one of the many techniques.

http://coitweb.uncc.edu/~krs/courses/5010/ged/lectures/cull_lod2.pdf

http://en.wikipedia.org/wiki/Hidden_surface_determination

http://www.gamasutra.com/view/feature/3394/occlusion_culling_algorithms.php

If you've ever messed around in a 3D editor with a one sided face and seen how the "backface" actually has no face, that is a form of culling.

For a game example I would have to point you to to crysis which uses VisAreas and Portals, (mentioned in the above pdf) to achieve the lovely indoor lighting that made the engine a visual powerhouse, and I realize it is apples to oranges in comparing two very different engines but it gives the best and clearest example of what I'm talking about.

In the above video you can see how the geometry and lighting takes on a completely different look once the vis areas and portals are strung together, this would be the LOD's I mention in proposal.

And here is a great example of the finished product with all assets coming together.

Again, note how many lights actually cast shadows and then note how the lights don't bleed through the walls thanks to the combination of vis areas (walls) and portals (doorway and windows)

You could walk from one room to the next without even having a door in the way, with dramatically different lighting and the two would not clash as they do now.

Edited by NodUnit

Share this post


Link to post
Share on other sites
What on earth is this magical culling that supposedly is easier to do than just render shadowmaps?

I think the biggest difference you'll notice is that with culling you're just removing from the render, whereas with shadowmaps, you're now adding shadows to the render requiring more power from the host computer.

Culling, in theory and if done correctly, should in most cases retain the same performance, if not increase performance (in some cases).

They do this in DayZ a little bit with Object Culling when you're inside a building to help reduce the strain of rendering the inside and outsides. ;)

Only now we'd be doing it with lighting (which is something DayZ is actually working on as well to allow for better night-time looting)

Share this post


Link to post
Share on other sites
Only now we'd be doing it with lighting (which is something DayZ is actually working on as well to allow for better night-time looting)

Might I inquire as to where this information came from?

Share this post


Link to post
Share on other sites
otherwise how are you going to tell the inside that it doesn't share the same lighting properties as the outside world?

by creating a lighting model that is scientifically accurate. If it is that then it will produce scientifically accurate lighting. (regardless of the environment)

Not raytracing but maybe something similar but much more dumbed down to gameplay levels. (still retains the realistic properties largely but doesn´t produce the result a render would)

I´ll check the next game i play with the tips you gave.

Edited by RushHour

Share this post


Link to post
Share on other sites
by creating a lighting model that is scientifically accurate. If it is that then it will produce scientifically accurate lighting. (regardless of the environment)

Not raytracing but maybe something similar but much more dumbed down to gameplay levels. (still retains the realistic properties largely but doesn´t produce the result a render would)

There's countless threads about performance already, a scientifically accurate lighting is a no go, it's a no go in a lot smaller scale games too.

Share this post


Link to post
Share on other sites

Apologies if this is the wrong thread (i guess it may be more of a vehicle issue).

The headlights on HEMTT ammo truck (only one i noticed, possibly others) seem to magically come on when you are looking at the vehicle from 25m-30m.

Please see the following image album. It depicts me starting from 22m and driving in reverse, you can see that the three snapshots between 25-35m are clearly showing lit headlights, despite the fact the headlights are not on.

http://imgur.com/a/68sBz

(edit) - I can make a ticket if this is an unknown issue, let me know.

Edited by k0rd
addendum

Share this post


Link to post
Share on other sites

its an the back light on ifrit hunter and more to ;) and the led stripe on the ifrit

Share this post


Link to post
Share on other sites
its an the back light on ifrit hunter and more to ;) and the led stripe on the ifrit

I'm sorry I didn't understand what you mean: Are you saying that these lights also turn on automatically at the same range?

Share this post


Link to post
Share on other sites
There's countless threads about performance already, a scientifically accurate lighting is a no go, it's a no go in a lot smaller scale games too.

It may be possible with clever use of rendering tools out of the game...applications have the ability to bake light and shadow maps into the scenery much the same way ambient occlusion and normal maps are baked, only we're instead taking a light source and baking its information directly into the texture in question...it may be possible to use this method in Arma 3 and use the actual light source as nothing more than to give a hue to the player, giving the illusion that the light source is a full light.

http://area.autodesk.com/userdata/image/inhouse/b/z6rgw-ygh3u-2ghn9-ufn6s.jpg

http://www.tamats.com/blog/?p=287

Of course there are limitations, since we're baking theres nothing dynamic about it, the scene would always be set at the same settings and would require a UV layout which means tiling and mirroring for these textures is a no go.

This method would also allow us to bake shadows directly into the UV's, giving the illusion that the lamps are casting shadows.

We also run into the problem that if it is in shadow then lights will not be their brightest, Emissive materials could fix this but could also run the risk of highlighting the dark parts, lastly we could also bake the lights onto a single alpha image, wherein the light is the semi solid texture, decreasing with the falloff until there is nothing left, essentially creating a glowing hotspot in the shape of what a lamp would give off.

Edited by NodUnit

Share this post


Link to post
Share on other sites
It may be possible with clever use of rendering tools out of the game...applications have the ability to bake light and shadow maps into the scenery much the same way ambient occlusion and normal maps are baked, only we're instead taking a light source and baking its information directly into the texture in question...it may be possible to use this method in Arma 3 and use the actual light source as nothing more than to give a hue to the player, giving the illusion that the light source is a full light.

http://area.autodesk.com/userdata/image/inhouse/b/z6rgw-ygh3u-2ghn9-ufn6s.jpg

http://www.tamats.com/blog/?p=287

Of course there are limitations, since we're baking theres nothing dynamic about it, the scene would always be set at the same settings and would require a UV layout which means tiling and mirroring for these textures is a no go.

This method would also allow us to bake shadows directly into the UV's, giving the illusion that the lamps are casting shadows.

We also run into the problem that if it is in shadow then lights will not be their brightest, Emissive materials could fix this but could also run the risk of highlighting the dark parts, lastly we could also bake the lights onto a single alpha image, wherein the light is the semi solid texture, decreasing with the falloff until there is nothing left, essentially creating a glowing hotspot in the shape of what a lamp would give off.

In ArmA 3 for example every tree shares the same normal map and ambient occlusion textures, but baked lighting would require a unique lightmap texture for every single tree. The memory requirements for that would be humongous, even more than the island satellite maps.

Share this post


Link to post
Share on other sites
It may be possible with clever use of rendering tools out of the game...applications have the ability to bake light and shadow maps into the scenery much the same way ambient occlusion and normal maps are baked, only we're instead taking a light source and baking its information directly into the texture in question...it may be possible to use this method in Arma 3 and use the actual light source as nothing more than to give a hue to the player, giving the illusion that the light source is a full light.

http://area.autodesk.com/userdata/image/inhouse/b/z6rgw-ygh3u-2ghn9-ufn6s.jpg

http://www.tamats.com/blog/?p=287

Of course there are limitations, since we're baking theres nothing dynamic about it, the scene would always be set at the same settings and would require a UV layout which means tiling and mirroring for these textures is a no go.

This method would also allow us to bake shadows directly into the UV's, giving the illusion that the lamps are casting shadows.

We also run into the problem that if it is in shadow then lights will not be their brightest, Emissive materials could fix this but could also run the risk of highlighting the dark parts, lastly we could also bake the lights onto a single alpha image, wherein the light is the semi solid texture, decreasing with the falloff until there is nothing left, essentially creating a glowing hotspot in the shape of what a lamp would give off.

I thought RushHour meant proper simulation of lighting.

How'd that system work with the dynamic daylight and when the streetlights that are casting the baked-in shadows, are shot out?

Share this post


Link to post
Share on other sites

What happened to flares again? They are absolutely useless right now in terms of lighting. I haven't tried them out for some time (since 1.10 I think) and I thought they were too dim then. But now they emit practically no light whatsoever. Is this behaviour intended? Maybe they aren't intended as lighting flares but a signal ones instead? Could someone please clarify this?

Share this post


Link to post
Share on other sites
What happened to flares again? They are absolutely useless right now in terms of lighting. I haven't tried them out for some time (since 1.10 I think) and I thought they were too dim then. But now they emit practically no light whatsoever. Is this behaviour intended? Maybe they aren't intended as lighting flares but a signal ones instead? Could someone please clarify this?

They are signal flares yes.

Share this post


Link to post
Share on other sites
They are signal flares yes.

Well then either add a new type of illumination flares or make the existing ones to be able to illuminate large areas. It currently breaks a lot of missions that adds the flares as another form of tactical advantage and a layer of immersion. These are actually my favorite missions, and I'm not alone in this. Moving without NVGs, having to illuminate your way and find the attacking enemy is a marvelous experience, and currently it's completey broken. We can use illumination flares also for signalling anyway, problem solved.

Share this post


Link to post
Share on other sites
In ArmA 3 for example every tree shares the same normal map and ambient occlusion textures, but baked lighting would require a unique lightmap texture for every single tree. The memory requirements for that would be humongous, even more than the island satellite maps.

That depends on how you set up your scenes, full indoor is easy, only the walls get a shadow LOD.

Indoor with a window to the sun/moon requires selective shadow LOD, don't give the furniture shadow polygons unless they are close enough to the source of sun (arma 3's lights will get rid of them anyway).

Full in the open is more tricky and may require a locked time of day.

It's not the best solution, when mentioned "static" it meant things will have to be tailored specially for it but thats the way it goes for this method.

The idea is more for indoor environments than outdoor in this case, since we don't have to worry about light bleeding through large walls as much.

Very much like the second link, the lighting can either be baked directly onto the texture or can be another "layer" of polygons in the form of a proxy as an alpha texture to apply the lighting cast as a mask on the texture.

It also doesn't take as much processing power as you think, the method has been used for decades now...how do you think many of the older games achieved vibrantly lit scenes 10-20 years ago?

Rarely did they have true light sources, nevermind lights that cast shadows. The majority of lighting was baked directly into the map itself albiet with a different technique not available here.

I thought RushHour meant proper simulation of lighting.

How'd that system work with the dynamic daylight and when the streetlights that are casting the baked-in shadows, are shot out?

That can go one of two ways, firstly is that the light is baked into a much larger texture which means it doesn't otherwise it would effect the rest.

The other has the light baked into its own unique texture, allowing it to be manipulated by script commands, hiding it upon being "shot" for example, or even flipping it so that the backface is facing up.

Funny thing is that "lightmaps" have been around for decades and using very thoroughly in gaming but most of them had it integrated as part of the "material" scheme. http://www.spiralgraphics.biz/images_g25/battered_robot.jpg

I had proposed this idea back in alpha but was met with a swarm of "there are more important things to do" and that it had little application..shame too, it could have saved us all so much grief on so many things.

If you have some idea's I'd love to hear them because true light sources are going to be far more resource hungry and we're never going to see lights that cast shadows beyond the sun and moon.

Edited by NodUnit

Share this post


Link to post
Share on other sites
That can go one of two ways, firstly is that the light is baked into a much larger texture which means it doesn't otherwise it would effect the rest.

The other has the light baked into its own unique texture, allowing it to be manipulated by script commands, hiding it upon being "shot" for example, or even flipping it so that the backface is facing up.

Funny thing is that "lightmaps" have been around for decades and using very thoroughly in gaming but most of them had it integrated as part of the "material" scheme. http://www.spiralgraphics.biz/images_g25/battered_robot.jpg

I had proposed this idea back in alpha but was met with a swarm of "there are more important things to do" and that it had little application..shame too, it could have saved us all so much grief on so many things.

If you have some idea's I'd love to hear them because true light sources are going to be far more resource hungry and we're never going to see lights that cast shadows beyond the sun and moon.

Thanks for the reply, very interesting read.

Are there any major pitfalls in the second method, other than considerable amount of work?

I have no knowledge of these things, I'm a beginner in 3D modeling/rendering but basically that's it.

Share this post


Link to post
Share on other sites
Well then either add a new type of illumination flares or make the existing ones to be able to illuminate large areas. It currently breaks a lot of missions that adds the flares as another form of tactical advantage and a layer of immersion. These are actually my favorite missions, and I'm not alone in this. Moving without NVGs, having to illuminate your way and find the attacking enemy is a marvelous experience, and currently it's completey broken. We can use illumination flares also for signalling anyway, problem solved.

I'm just repeating what a developer said. ;)

Share this post


Link to post
Share on other sites
Thanks for the reply, very interesting read.

Are there any major pitfalls in the second method, other than considerable amount of work?

I have no knowledge of these things, I'm a beginner in 3D modeling/rendering but basically that's it.

It hinges on the scene and what you want to achieve. For example if you have two walls close together to which the light would clearly bounce off of them and not just the floor then you're going to need two textures, one for the wall and another for the floor.

Secondly it depends on how you want your scene to look...while you can get a more accurate light model by applying a base mesh to the walls which would emulate the light bouncing around rather than just the pure lamp source.

(this is why I suggested using Arma 3's light in addition but not make it the overpowering light source)

Scene complexity is another thing to take into account, if you have a bunch of objects near these "false" light sources then you will need to substitute them with some overlaying faces to get the baked lighting.

In truth for Arma's complex scenes this will be a case of using polygons as tarps to put over everything, in other games there are material slots which allow these textures to be used as masks but here since there is no such slot we have to use base alpha textures with emission overlayed onto the actual model hence using them as proxy's.

One could also use multiple rvmats on single lights as opposed to a full scene in that you leave the light a "base" color and then modify the RGB values in the rvmat, allowing you to use the same image but with multiple colors.

Making lights out of textures also allows the opportunity to make unique "shapes" for example say you have a light above you with a grating upon it, the light doesn't have to be just a big white blur, it can have the grating simulated by texture work.

There are a lot of methods when it comes to rendering scenes and achieving the illusion of dynamics is more important than actually doing it in most cases,

you may save labor but at the cost of performance, or you can use a lot of tricks to achieve something similar for substantially less..the goal in the end is to make your audience THINK they are seeing what they want.

Edited by NodUnit

Share this post


Link to post
Share on other sites
That depends on how you set up your scenes, full indoor is easy, only the walls get a shadow LOD.

Indoor with a window to the sun/moon requires selective shadow LOD, don't give the furniture shadow polygons unless they are close enough to the source of sun (arma 3's lights will get rid of them anyway).

Full in the open is more tricky and may require a locked time of day.

It's not the best solution, when mentioned "static" it meant things will have to be tailored specially for it but thats the way it goes for this method.

The idea is more for indoor environments than outdoor in this case, since we don't have to worry about light bleeding through large walls as much.

Very much like the second link, the lighting can either be baked directly onto the texture or can be another "layer" of polygons in the form of a proxy as an alpha texture to apply the lighting cast as a mask on the texture.

It also doesn't take as much processing power as you think, the method has been used for decades now...how do you think many of the older games achieved vibrantly lit scenes 10-20 years ago?

Rarely did they have true light sources, nevermind lights that cast shadows. The majority of lighting was baked directly into the map itself albiet with a different technique not available here.

That can go one of two ways, firstly is that the light is baked into a much larger texture which means it doesn't otherwise it would effect the rest.

The other has the light baked into its own unique texture, allowing it to be manipulated by script commands, hiding it upon being "shot" for example, or even flipping it so that the backface is facing up.

Funny thing is that "lightmaps" have been around for decades and using very thoroughly in gaming but most of them had it integrated as part of the "material" scheme. http://www.spiralgraphics.biz/images_g25/battered_robot.jpg

I had proposed this idea back in alpha but was met with a swarm of "there are more important things to do" and that it had little application..shame too, it could have saved us all so much grief on so many things.

If you have some idea's I'd love to hear them because true light sources are going to be far more resource hungry and we're never going to see lights that cast shadows beyond the sun and moon.

"Shadow polygons"? Shadow LOD? What? You mean the lightmap UVs or what?

I wasn't talking about processing power anyway, I was talking about memory usage.

Share this post


Link to post
Share on other sites
"Shadow polygons"? Shadow LOD? What? You mean the lightmap UVs or what?

I wasn't talking about processing power anyway, I was talking about memory usage.

Shadow LOD- the LOD that creates the shadow for most objects that do not use shadow maps

Shadow polygons- polygons that create the shadow LOD, so if you include two chairs in one scene but only one of those chairs has the polygons for the shadow LOD, then it will be the only one casting a shadow.

What is your concern on the memory? The amount of texture or something else?

Edited by NodUnit

Share this post


Link to post
Share on other sites
Shadow LOD- the LOD that creates the shadow for most objects that do not use shadow maps

Shadow polygons- polygons that create the shadow LOD, so if you include two chairs in one scene but only one of those chairs has the polygons for the shadow LOD, then it will be the only one casting a shadow.

What is your concern on the memory? The amount of texture or something else?

Oh, you mean the stencil shadows? Why did you then link this and this? Those are examples of light mapping. You said "baking" too, which lead me to think you were talking about light mapping.

As I mentioned, shadow LODs are used for stencil shadows which are 100% dynamic. They aren't baked and the links you posted have nothing to do with stencil shadowing. Neither does baking.

Regarding the memory issue: As I previously said, each lightmap requires certain amount of space to look even remotely good. Due to the amount of objects on Altis, you'd end up needing gigabytes of video memory.

Share this post


Link to post
Share on other sites
Oh, you mean the stencil shadows? Why did you then link this and this? Those are examples of light mapping. You said "baking" too, which lead me to think you were talking about light mapping.

As I mentioned, shadow LODs are used for stencil shadows which are 100% dynamic. They aren't baked and the links you posted have nothing to do with stencil shadowing. Neither does baking.

Regarding the memory issue: As I previously said, each lightmap requires certain amount of space to look even remotely good. Due to the amount of objects on Altis, you'd end up needing gigabytes of video memory.

Because I wasn't referring to the stencil shadows when I linked them, and never said anything about applying this to all of Altis.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×