Some thoughts about light in general

Post your ideas and suggestions how to improve the game.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 10393
Joined: Tue Apr 16, 2013 10:35 pm

Re: Some thoughts about light in general

Post by ssilk » Sat Jul 20, 2013 10:15 pm

SilverWarior wrote: Many (to many) of them had awsome graphics but crappy gameplay. So I would rather play game with crappy graphics and great gameplay than game with great graphics and crappy gameply becouse the later would always bee crappy game.
... you can be sure that I will rather support and idea which brings new feature to the game than the idea that simply makes game look a bit better.
Too true.
To the developers: forgot about anything I suggested above, it's too early to think about it! :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Tenebrous
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Mon May 05, 2014 8:06 am

Normal maps for cool lighting effects

Post by Tenebrous » Wed May 21, 2014 7:56 am

Since the sprites are created in a 3D package, it would be relatively simple to also have normal maps for them.

This would allow some really cool lighting effects (including changing time of day, although of course this messes up shadows!)

I understand that there are issues with the huge atlases at the moment, however, so perhaps this could be an option for people with more memory on their graphics cards.

Tenebrous
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Mon May 05, 2014 8:06 am

Normal maps for cool lighting effects

Post by Tenebrous » Wed May 21, 2014 7:57 am

Moved to this thread cause of initiator-request. :) -- ssilk
Another thread, also created by Tenebrous, with the same name is merged into this. --ssilk

-----------------------

Since the sprites are created in a 3D package, it would be relatively simple to also have normal maps for them.

This would allow some really cool lighting effects (including changing time of day, although of course this messes up shadows!)

I understand that there are issues with the huge atlases at the moment, however, so perhaps this could be an option for people with more memory on their graphics cards.

Example from a tool called 'Sprite Lamp'

Edit: By 'time of day', I meant changing the lighting direction based on time of day, as obviously the game already has night/day :)
Last edited by Tenebrous on Wed May 21, 2014 8:43 am, edited 1 time in total.

Trucario
Long Handed Inserter
Long Handed Inserter
Posts: 77
Joined: Fri Aug 09, 2013 12:40 pm

Re: Normal maps for cool lighting effects

Post by Trucario » Wed May 21, 2014 8:27 am

Tenebrous wrote:Since the sprites are created in a 3D package, it would be relatively simple to also have normal maps for them.

This would allow some really cool lighting effects (including changing time of day, although of course this messes up shadows!)

I understand that there are issues with the huge atlases at the moment, however, so perhaps this could be an option for people with more memory on their graphics cards.

Example from a tool called 'Sprite Lamp'
Damn, its amazing.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 10393
Joined: Tue Apr 16, 2013 10:35 pm

Re: Normal maps for cool lighting effects

Post by ssilk » Wed May 21, 2014 8:58 am

Well, that isn't that easy. Technically there are some things standing against it.
- the sprites are rendered with light coming from upper left. If you change the direction it would look strange
- extra shadows need more RAM. It's already a big issue, that the sprites use too much video-ram.
- it would make it more unmovable. The graphics from mods has problems to be rendered.

We'll.I can think one thing: to make it graphically really cool, the game calculates the shadows itself. Every sprite becomes something like a form, some cubes, very simple. For that a transparent shadow is calculated, which is laid above the stuff. It might not be looking perfect, but it would look amazing. But the afford is really high.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Tenebrous
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Mon May 05, 2014 8:06 am

Re: Normal maps for cool lighting effects

Post by Tenebrous » Wed May 21, 2014 9:57 am

ssilk wrote:- the sprites are rendered with light coming from upper left. If you change the direction it would look strange
No, the point is that you render the sprites with completely flat lighting, and let the normal map control all the lighting from then on.
ssilk wrote:- extra shadows need more RAM. It's already a big issue, that the sprites use too much video-ram.
Aye!
ssilk wrote:- it would make it more unmovable. The graphics from mods has problems to be rendered.
Not sure what you mean... all that would change is that each sprite would have it's graphics plus a separate one for the normal map.
ssilk wrote:We'll.I can think one thing: to make it graphically really cool, the game calculates the shadows itself. Every sprite becomes something like a form, some cubes, very simple. For that a transparent shadow is calculated, which is laid above the stuff. It might not be looking perfect, but it would look amazing. But the afford is really high.
I think that's a bit of overkill really :D The normal-mapped lighting would work even if you didn't have moving shadows - for things like explosions, and other lights on things.

Tenebrous
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Mon May 05, 2014 8:06 am

Re: Normal maps for cool lighting effects

Post by Tenebrous » Wed May 21, 2014 9:59 am

Not sure why this thread appeared twice, anyway here's my edits to the other one:

Have a look at this example from a tool called 'Sprite Lamp'.

Also, by 'time of day', I meant changing the lighting direction based on time of day, as obviously the game already has night/day :)

User avatar
Drury
Filter Inserter
Filter Inserter
Posts: 672
Joined: Tue Mar 25, 2014 8:01 pm

Re: Normal maps for cool lighting effects

Post by Drury » Wed May 21, 2014 12:14 pm

Actually when I was theorizing a hypothetical game I'd make I had something similar in mind. By something similar I mean nearly identical.

I'm actually surprised this is something new and kickstarter/Steam-worthy, seems to me like a general technique that is somehow never used.
Image

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 10393
Joined: Tue Apr 16, 2013 10:35 pm

Re: Normal maps for cool lighting effects

Post by ssilk » Wed May 21, 2014 2:16 pm

Well, this would be absolutely amazing. :) I would like to see that depth and the atmosphere in the night.

As always :) we've been discussing this earlier:
https://forums.factorio.com/forum/vie ... f=6&t=1089

But your aspect is completely new. The main problem is: For the night, most of the shadow-maps need to be stored in the video-RAM. I think this is just a hard technical limit. There are other thoughts: The map is a big hurdle to modders. If they do not add the shadow layer, the thing looks just odd.

An implementation to my point of view could look so, that every object has a sprite, but also a very simple 3D model. This avoids of having the additional bitmaps for the shadows, they are created from the model, the model can stay in normal memory.

But even then it is a big technical hurdle. I don't see much chances for that.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 10393
Joined: Tue Apr 16, 2013 10:35 pm

Re: Normal maps for cool lighting effects

Post by ssilk » Wed May 21, 2014 3:32 pm

Tenebrous wrote:
ssilk wrote:- it would make it more unmovable. The graphics from mods has problems to be rendered.
Not sure what you mean... all that would change is that each sprite would have it's graphics plus a separate one for the normal map.
Replace unmoveable with unMODable. iPad is sometimes nasty...
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Tenebrous
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Mon May 05, 2014 8:06 am

Re: Normal maps for cool lighting effects

Post by Tenebrous » Wed May 21, 2014 3:33 pm

ssilk wrote:
Tenebrous wrote:
ssilk wrote:- it would make it more unmovable. The graphics from mods has problems to be rendered.
Not sure what you mean... all that would change is that each sprite would have it's graphics plus a separate one for the normal map.
Replace unmoveable with unMODable. iPad is sometimes nasty...
I don't think it affects that at all. Except now, instead of just having image file for an object, you have two. One with the colours as now, and one with the normal map.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 10393
Joined: Tue Apr 16, 2013 10:35 pm

Re: Some thoughts about light in general

Post by ssilk » Wed May 21, 2014 3:50 pm

Well, my favourite music programm Reason by Propellerheads does do such things.

Reason Developers can add new devices/instruments (they call it Rack Extensions, RE) to Reason and sell it through their shop. The idea is, that the RE-developers create the idea and Propellerheads looks, that it works, no matter which platform, graphics, soundcard etc. This includes also the visible part of the device, the knobs, buttons, switches, and so on. A developer needs to define all the knobs etc. as a 3D map and they render from that some 2D images. The results are compelling (for example: https://shop.propellerheads.se/product/e670-equalizer/ - this graphics is rendered for the shop only)

I know, this is somehow complicated, but I think this direction only leads into something, which can be used in some future.

And it would make the work much more easier!! :)

How?

I think about so: Currently Albert delivers the pure graphics to the factorio-devs. I mean, they found some way speed things up in this process, but it is still many work by hand.

What if Albert delivers only the 3D-modells and the rest is made in a build-process?

And once there is such a build-process, and it is working reliable, why not using other models from other mod-developers or other artists and put them also in this queue? The advantage would be, that they would have the same look, resolution and so on.

And (!) they can calculate the shadows from different angels, because they have the 3D-model. And from that point on, you can do much more really, really cool stuff, like the link above....

Well, just some thoughts...
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
cube
Smart Inserter
Smart Inserter
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm

Re: Some thoughts about light in general

Post by cube » Thu May 22, 2014 8:42 am

ssilk wrote:What if Albert delivers only the 3D-modells and the rest is made in a build-process?

And once there is such a build-process, and it is working reliable, why not using other models from other mod-developers or other artists and put them also in this queue? The advantage would be, that they would have the same look, resolution and so on.
To me this sounds like a great idea, but AFAIK Albert does quite a lot of manual post processing on the 2D sprites before including them in the game, so I'm afraid that he wouldn't approve.

Technically this should be pretty simple -- just a python script that controls a blender instance for rendering...
I have no idea what I'm talking about.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 10393
Joined: Tue Apr 16, 2013 10:35 pm

Re: Some thoughts about light in general

Post by ssilk » Thu May 22, 2014 11:14 am

Last year my team has been in a similar situation: the designers developed great graphics, cool CSS styles and so on, but we couldn't integrate that automatically. Every style needed to be integrated by hand, and if it changed, the work begins from start. That costs us very much time to integrate the graphics. So we wrote a tool, where the designers had the possibility to integrate the CSS/graphics and test, if it fits all. So they did the work. The designers loved it, they said that makes the work with us much easier, cause they now can just try things out and immediately se, what fits and what not. And we loved it, cause we don't need to integrate all the time. The result was a big speed up in the development-process and much faster and reliable deploy.

If you continuously improve this process, every version the biggest work, the stupidest job, you will see some performance gain in about 2-3 month.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Tenebrous
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Mon May 05, 2014 8:06 am

Re: Some thoughts about light in general

Post by Tenebrous » Thu May 22, 2014 12:15 pm

cube wrote:...AFAIK Albert does quite a lot of manual post processing on the 2D sprites before including them in the game...
Well, to be honest that'd be something to automate soonish, especially as Albert's time is already full up :D

krux02
Inserter
Inserter
Posts: 48
Joined: Tue May 06, 2014 2:45 pm

Re: Some thoughts about light in general

Post by krux02 » Thu May 22, 2014 2:09 pm

First of all. Light is the most complicated and complex thing you can simulate. You can invest hundreds of hours into this topic. I am a developer myself and I know how much work it is. At the moment light is pretty simple. There is one lightmap where all light sources are added and then at night, the lightmap is multiplied with the image. This is easy too implement and not too wrong.

at the moment shadows are just constant, so every model has it's own shadow image. The only way to make this realistically would be to project the shadows from 3d models to the ground which is just not feasible if you consider that in the game are no 3d models left anymore. It would also drastically increase rendering complexity. So I don't see that happen soon. Also for realistic lighting we would need correct normal maps for each model in the game and I don't see that happen soon.

Short answer you just need more man power to get it correct. On the other hand colorful light's would be pretty easy.

Post Reply

Return to “Ideas and Suggestions”