Get pollution isobands

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Get pollution isobands

Post by darkfrei »

Hi devs!

Here is the water pollution layer, that changes the color of water.

Please see screenshot:
2021-01-24T22_51_18-Factorio 1.1.15.jpg
2021-01-24T22_51_18-Factorio 1.1.15.jpg (2.89 MiB) Viewed 1464 times

I've made a mod, that makes pollution isolines. Of course, I want to make isobands too. I am not happy with my isolines right now.

Is it possible to read vanilla isobands for polluted water?
Attachments
SmogVisualPollution_1.2.11.zip
(14.66 KiB) Downloaded 62 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Get pollution isobands

Post by Rseding91 »

I don't understand the request. Pollution is a simple value per chunk; we don't store any other information than that. The water coloring is done purely in a shader based off those values.
If you want to get ahold of me I'm almost always on Discord.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Get pollution isobands

Post by darkfrei »

Rseding91 wrote:
Mon Jan 25, 2021 4:47 pm
I don't understand the request. Pollution is a simple value per chunk; we don't store any other information than that. The water coloring is done purely in a shader based off those values.
The original mod Smog Visual Pollution also uses just values per chunk. All users ask better graphics, the edge between chunks is too visible.

Image

My idea was to cut the pollution squares to pollution isobands. I've made isolines, but sometimes by random-chunk-update they are not connected anymore.

I've noticed that the vanilla's green water pollution is almost the same as this isolines wanted isobands. I cannot see any edges here.

User avatar
bormand
Fast Inserter
Fast Inserter
Posts: 201
Joined: Fri Jun 05, 2020 9:59 am
Contact:

Re: Get pollution isobands

Post by bormand »

darkfrei wrote:
Mon Jan 25, 2021 5:42 pm
I cannot see any edges here.
They just calculate interpolated value for every pixel.

Unfortunately, draw functions accepts only a single color. So, mods can't do anything like that. If draw_polygon() would accept per-vertex colors and would be able to interpolate between them, your mod can just draw chunk-sized rectangles (just as it does now) and get nice smooth overlay.

nastyslave
Inserter
Inserter
Posts: 40
Joined: Sat Aug 06, 2016 11:48 am
Contact:

Re: Get pollution isobands

Post by nastyslave »

Please DEVs, give us some mod technology that can nicely color the polluted air like game colors water!

Post Reply

Return to “Modding interface requests”