Black-and-white Minetest/video games

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Black-and-white Minetest/video games

by ABJ » Tue Aug 09, 2016 14:55

Okay. I know this is a strange idea, and I may not even properly know what I'm trying to talk about, but what if Minetest, or other video games, used graphics engines (wait, am I correct?) that only rendered black and white, where all we need is a base texture and how dark it is, instead of all this RGB stuff? How much would performance be improved? Could such a thing be done?
Again, note, I'm just a curious newbie.
 

User avatar
lisacvuk
Member
 
Posts: 165
Joined: Sat Jul 19, 2014 11:52
GitHub: lisacvuk
IRC: lisac
In-game: lisacvuk

Re: Black-and-white Minetest/video games

by lisacvuk » Wed Aug 10, 2016 06:55

You'd probably only save memory, I think. Performance probably wouldn't be really improved, at least not noticeably. I'm not expert (or even over the basics level) in this field, so feel free to correct me, if I'm wrong (or actually not wrong).
400 character limit? Am I writing a book?
I'm a Minetest player, 'learning' C++ and OpenGL, listening to Blind Guardian, Nightwish, Amon Amarth. Administrator on Craig's server. Likes cookies.
I live in Serbia.
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: Black-and-white Minetest/video games

by MineYoshi » Wed Aug 10, 2016 21:07

lisacvuk wrote:You'd probably only save memory, I think. Performance probably wouldn't be really improved, at least not noticeably. I'm not expert (or even over the basics level) in this field, so feel free to correct me, if I'm wrong (or actually not wrong).

May be...

In my opinion you can get a bit more of performance, in Black and White...
If you modify the code to make that particles, only be of one color...

Can be a good idea do that...
Try it!
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Black-and-white Minetest/video games

by ABJ » Thu Aug 11, 2016 06:41

Yeah.
I was thinking that now we have to deal with four values (RGBA) but then we'd need only one?
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: Black-and-white Minetest/video games

by MineYoshi » Thu Aug 11, 2016 22:05

ABJ wrote:Yeah.
I was thinking that now we have to deal with four values (RGBA) but then we'd need only one?

Actually Black Is the absence of the colors, the black is the presence (Totally) of every one...
RGBA means RedGreenBlueAlpha...
If you think about some textures can have "alpha" or transparency, you don't going to only handle one value!
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

User avatar
Ferk
Member
 
Posts: 330
Joined: Tue Aug 18, 2015 17:18
GitHub: Ferk

Re: Black-and-white Minetest/video games

by Ferk » Thu Aug 11, 2016 22:19

This makes no difference in current hardware. Even if you use some sort of grayscale in your textures, at some point it'd end up translated into some internal representation that separates it in color channels that mix to give whatever shade of gray (that's how the screens work anyway).

I doubt you'd even save memory unless you use some archaic format to store the image data in memory. And even then it won't make it any faster.. perhaps slower depending how awkward the format is to deal with.

If you want faster image loading better just don't use any sort of image compression (unless you have a slow hard disk). The image will be larger on disk but it will load faster on memory. But even then you probably won't notice much of a difference anyway.
{ ☠ Dungeontest ☠ , ᗧ••myarcade•• }
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: Black-and-white Minetest/video games

by MineYoshi » Thu Aug 11, 2016 22:49

Ferk wrote:This makes no difference in current hardware. Even if you use some sort of grayscale in your textures, at some point it'd end up translated into some internal representation that separates it in color channels that mix to give whatever shade of gray (that's how the screens work anyway).

I doubt you'd even save memory unless you use some archaic format to store the image data in memory. And even then it won't make it any faster.. perhaps slower depending how awkward the format is to deal with.

If you want faster image loading better just don't use any sort of image compression (unless you have a slow hard disk). The image will be larger on disk but it will load faster on memory. But even then you probably won't notice much of a difference anyway.

But actually can be good for trying to test out how is Minetest when it got to convert RGBA textures to Black/White ones...
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Black-and-white Minetest/video games

by ABJ » Fri Aug 12, 2016 08:01

OK.
In any case, we can just have one texture and set how dark it is (eg; pinewood, wood, junglewood, acaciawood, etc) with the same texture and a little coding.

Either way, IMHO all those World War simulators should become black-and-white.
Last edited by ABJ on Sat Aug 13, 2016 06:45, edited 1 time in total.
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: Black-and-white Minetest/video games

by MineYoshi » Fri Aug 12, 2016 22:15

ABJ wrote:OK.
In any case, we can just have one texture and set how dark it is (eg; pinewood, wood, junglewood, acaciawood, etc) with the same texture and a little coding.

Maybe...
If you change the palete to only 4 greys, i don't know. the game can be faster, starting from the point that when a texture is less bigger, and less colorful... It's faster to load!
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

User avatar
cd2
Member
 
Posts: 552
Joined: Mon Jun 01, 2015 06:30
GitHub: cdqwertz
IRC: freenode - cd2 InchraNet - cd
In-game: cd cd2

Re: Black-and-white Minetest/video games

by cd2 » Sat Aug 20, 2016 11:09

To see how it could look, just add this line of code to the end of opengl_fragmet.glsl (for me its line 212):

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
col = vec4((col.b+col.g+col.b)/3.0,(col.b+col.g+col.b)/3.0,(col.b+col.g+col.b)/3.0, col.a);


Image
Attachments
screenshot_20160820_131308.png
screenshot_20160820_131308.png (428.22 KiB) Viewed 7568 times
Last edited by cd2 on Sat Aug 20, 2016 11:23, edited 2 times in total.
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Black-and-white Minetest/video games

by ABJ » Sat Aug 20, 2016 11:15

Thanks and where is it?
BTW what about the sky though.
 

User avatar
cd2
Member
 
Posts: 552
Joined: Mon Jun 01, 2015 06:30
GitHub: cdqwertz
IRC: freenode - cd2 InchraNet - cd
In-game: cd cd2

Re: Black-and-white Minetest/video games

by cd2 » Sat Aug 20, 2016 11:22

ABJ wrote:Thanks and where is it?

client/shaders/node_shader

ABJ wrote:BTW what about the sky though.

It just changes all nodes, but I think you cant change the sky color via a shader is it?

PS : This wont improve performance
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Black-and-white Minetest/video games

by ABJ » Sat Aug 20, 2016 11:26

I knw but it looks cool.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Black-and-white Minetest/video games

by azekill_DIABLO » Sat Aug 20, 2016 11:33

yep. i think shaders should be applying to all elements in game.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

Hybrid Dog
Member
 
Posts: 2460
Joined: Thu Nov 01, 2012 12:46

by Hybrid Dog » Sat Aug 20, 2016 11:55

Try this:
col.rgb = vec3(max(col.rgb.r, max(col.rgb.g, col.rgb.b)));
Image
Attachments
screenshot_20160820_135320.png
screenshot_20160820_135320.png (481.16 KiB) Viewed 7568 times
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Black-and-white Minetest/video games

by ABJ » Sat Aug 20, 2016 15:00

Water=blue
Sky=blue
BTW where to paste anyway?
 

User avatar
cd2
Member
 
Posts: 552
Joined: Mon Jun 01, 2015 06:30
GitHub: cdqwertz
IRC: freenode - cd2 InchraNet - cd
In-game: cd cd2

Re: Black-and-white Minetest/video games

by cd2 » Sun Aug 21, 2016 07:38

ABJ wrote:BTW where to paste anyway?

cd2 wrote:(for me its line 212)
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Black-and-white Minetest/video games

by ABJ » Sun Aug 21, 2016 09:33

Ooooooooooooon which file in where.
 

User avatar
cd2
Member
 
Posts: 552
Joined: Mon Jun 01, 2015 06:30
GitHub: cdqwertz
IRC: freenode - cd2 InchraNet - cd
In-game: cd cd2

Re: Black-and-white Minetest/video games

by cd2 » Sun Aug 21, 2016 09:47

cd2 wrote:
ABJ wrote:Thanks and where is it?

client/shaders/node_shader


client/shaders/node_shader/opengl_fragmet.glsl
line : 211/212
 

ABJ
Member
 
Posts: 2344
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ

Re: Black-and-white Minetest/video games

by ABJ » Sun Aug 21, 2016 10:28

Oh sorry I wasn't reading that well enough.
 

BBmine
Member
 
Posts: 1425
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins

Re: Black-and-white Minetest/video games

by BBmine » Wed Mar 01, 2017 03:03

Interesting..... I could use a texture pack too :)
God's not dead!
I actually did mine walls before I started playing this game....
Mods, Servers, and My Youtube Channel
Let us remember Just Test on April 16.
"Together, we will make America great again!" --President Trump
Please vote for the next video I should do here
I'm the most rottenist potato in the fridge.
Copyright (c) 2017 Baggins Inc. (tm) All rights reserved.
 


Return to Minetest Engine

Who is online

Users browsing this forum: No registered users and 6 guests

cron