Jump to content

Hi,

So I've just got an idea and need to know why it's stupid.

So being interested in game development I've seen some people saying that some (*cough* console *cough*) games just can't get high resolution real-time realistic shadows because of hardware and they simply can't bake the map because it will be too large. So here I come. Would it be possible to process a chunk of shadows once and store them in the RAM or sumting like that? I mean just like a grid or Minecraft word generation. When you are in an area, the shadows in the boxes nearby are generated and displayed, giving them some form of lazy render just not to put too much stress on the GPU every time you move.

Or was it done before and I had no time to google it out?

Thank you for letting me waste your time,

Yours,

I.

I need S340. But more Define S'ish

Link to comment
https://linustechtips.com/topic/564351-active-shadow-baking/
Share on other sites

Link to post
Share on other sites

They already backed in shadows, and they already do pre-rendered shadows (draws the level during load time (well, that is what loading is about), and calculate the shadows, and store that as a texture and apply it). This is usually done on static objects, or large ones like clouds. You can't have baked on shadows or pre-rendered shadows on movable objects (beside moving clouds), like a tree moving with the window, and you see the shadows, as it won't match. They do other tricks like in a forest, makes the area darker to simulate shadows effect. or have the trunk that doesn't move as shadow, etc.

 

 

Link to comment
https://linustechtips.com/topic/564351-active-shadow-baking/#findComment-7420597
Share on other sites

Link to post
Share on other sites

The absolute most you could theoretically do is pre-render a video of the dynamic shadows, but that's extremely impractical and I can't think of an engine that supports that way.

In other words, dynamic baked shadows aren't really possible.

Check out my guide on how to scan cover art here!

Local asshole and 6th generation console enthusiast.

Link to comment
https://linustechtips.com/topic/564351-active-shadow-baking/#findComment-7420630
Share on other sites

Link to post
Share on other sites

1 minute ago, GoodBytes said:

They already backed in shadows, and they already do pre-rendered shadows (draws the level during load time, and calculate the shadows, and store that as a texture and apply it). This is usually done on static objects, or large ones like clouds.

k. Thank You. still.. Making it more active (dynamic was not the best term) could cut down on loading times anyway.. Am I missing something? Because for example in The Last of Us, I can either have 60fps or nice shadows.. So why not have them both?

I need S340. But more Define S'ish

Link to comment
https://linustechtips.com/topic/564351-active-shadow-baking/#findComment-7420633
Share on other sites

Link to post
Share on other sites

1 minute ago, Dan Castellaneta said:

The absolute most you could theoretically do is pre-render a video of the dynamic shadows, but that's extremely impractical and I can't think of an engine that supports that way.

In other words, dynamic baked shadows aren't really possible.

Okay, I know, I just don't do ingles :P
Edit: Better?

I need S340. But more Define S'ish

Link to comment
https://linustechtips.com/topic/564351-active-shadow-baking/#findComment-7420639
Share on other sites

Link to post
Share on other sites

3 minutes ago, Allshevski said:

Okay, I know, I just don't do ingles :P
Edit: Better?

Real time shadow generation?

It's kind of possible, but it would be much harder on the GPU instead of having them ready to go.

Check out my guide on how to scan cover art here!

Local asshole and 6th generation console enthusiast.

Link to comment
https://linustechtips.com/topic/564351-active-shadow-baking/#findComment-7420674
Share on other sites

Link to post
Share on other sites

Yup. Read time shadows, is taxing on the GPU, and and the less crap you want it to look at on the edges of the shadows the more taxing it is, and the more polygon or transparency you have, even more taxing it is (trees, due to the leaves, as the GPU needs to check if the leaves texture pixel, for each pixel of the texture is transparent or not to see if it needs to a shadow or not).

 

gta-v-shadows.jpg

 

Windows-Live-Writer-Shadow-Filtering_8A7

 

 

And if you think of doing static shadow like I mentioned previously on a character, and have it all animated so it goes well, it only works if sun doesn't change or the character position with the light source, as the shadow moves around and scales, all on a perfectly flat surface. If you have bumps, the bump will clip through, meaning say you have a wrong, it won't go over the rock and bends properly. The rock will be always on top, without shadow on the shadow of a character.

Link to comment
https://linustechtips.com/topic/564351-active-shadow-baking/#findComment-7420708
Share on other sites

Link to post
Share on other sites

possible, but useless since shadow will often be very different. Both in form, intensity and more. It's like having a the player's character's position saved in the RAM, it wont help since the character will be in another place in a second.

"We're all in this together, might as well be friends" Tom, Toonami.

 

mini eLiXiVy: my open source 65% mechanical PCB, a build log, PCB anatomy and discussing open source licenses: https://linustechtips.com/topic/1366493-elixivy-a-65-mechanical-keyboard-build-log-pcb-anatomy-and-how-i-open-sourced-this-project/

 

mini_cardboard: a 4% keyboard build log and how keyboards workhttps://linustechtips.com/topic/1328547-mini_cardboard-a-4-keyboard-build-log-and-how-keyboards-work/

Link to comment
https://linustechtips.com/topic/564351-active-shadow-baking/#findComment-7420770
Share on other sites

Link to post
Share on other sites

@Minibois @GoodBytes @Dan Castellaneta

 

Okay guys, I see your point, but for example generating only the static mesh. Running the same shadow pass every single frame for object that remains static (buildings, rigid, static stuff in the level) would be waste of processing power so it could only real-time render the dynamic objects shadows. For example again, the The last of Us, lots of the scenes have only building shadows and lighting (windows, exteriors, rocks etc.) These could be precalculated for an certain area. Or for large worlds not using day-night cycle. Of course the additional couple of gigabytes of shadow file means nothing once you installed the game.. Umm.. But things like progressive quality improvements over time.. Well, lots of things are to consider..

I need S340. But more Define S'ish

Link to comment
https://linustechtips.com/topic/564351-active-shadow-baking/#findComment-7420949
Share on other sites

Link to post
Share on other sites

The problem is not file size on disk, the problem is GPU memory, and high res textures are costly.

But, to answer you, normally in a game, you mix shadow technique, and you hope people don't notice.

 

Gaming graphics is all about tricks. and the day we come and go "Hey we have so much power, we don't need tricks", people will look at the game, and go "This is next gen? It looks identical to previous gen!". The devs inside and outside, and graphics artists and basically anyone with a keen eye on things will notice, but no one else will really, or even if they do, the mass computation power it would consume over the the "filled with tricks" method, will not justify the increase in image quality/fidelity/realism (whatever you want to call it).

 

I cannot speak specifically on the game you play, I honestly never played it. But normally, a well developed game, uses many techniques, including the ones mentioned here by you and us. You have similar thing for light source, where object next to light is emulated to be brighter, with an overlay texture(s) that adds brightness or glow at certain distance and position to the fake light, or baked in light if its not moving, but it isn't real light.

 

 

Link to comment
https://linustechtips.com/topic/564351-active-shadow-baking/#findComment-7421080
Share on other sites

Link to post
Share on other sites

1 minute ago, GoodBytes said:

The problem is not file size on disk, the problem is GPU memory, and high res textures are costly.

But, to answer you, normally in a game, you mix shadow technique, and you hope people don't notice.

 

Gaming graphics is all about tricks. and the day we come and go "Hey we have so much power, we don't need tricks", people will look at the game, and go "This is next gen? It looks identical to previous gen!". The devs inside and outside, and graphics artists and basically anyone with a keen eye on things will notice, but no one else will really, or even if they do, the mass computation power it would consume over the the "filled with tricks" method, will not justify the increase in image quality/fidelity/realism (whatever you want to call it).

 

I cannot speak specifically on the game you play, I honestly never played it. But normally, a well developed game, uses many techniques, including the ones mentioned here by you and us. You have similar thing for light source, where object next to light is emulated to be brighter, with an overlay texture(s) that adds brightness or glow at certain distance and position to the fake light, or baked in light if its not moving, but it isn't real light.

 

 

Yeah, I know that, hmm.. Have a good night, I will think about that a little before I finally say that this idea was stupid.. Yawn, but now it's time for sleep for Europeans.

I need S340. But more Define S'ish

Link to comment
https://linustechtips.com/topic/564351-active-shadow-baking/#findComment-7421122
Share on other sites

Link to post
Share on other sites

10 minutes ago, Allshevski said:

Yeah, I know that, hmm.. Have a good night, I will think about that a little before I finally say that this idea was stupid.. Yawn, but now it's time for sleep for Europeans.

It's not stupid. Personally I am impressed. Usually, only people who work in the field knows and think about performance tricks. You should be proud!

Link to comment
https://linustechtips.com/topic/564351-active-shadow-baking/#findComment-7421183
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×