Page 1 of 2

[Mod] Vignette - Surprisingly good for immersion [vignette]

PostPosted: Tue Jun 14, 2016 02:44
by TriBlade9
Vignette Mod

Adds a somewhat subtle vignette effect to the screen of players, darkening the edges of the screen.
Best used with an ambient_occlusion_gamma value of about 1.2.

Code License: MIT
Texture License: CC0
Depends: None
Source on Github
Download

With:
Image

Without:
Image

Mod dependencies: none

Thanks and enjoy,
- Tri

Re: [Mod] Vignette [vignette] - Surprisingly good for immers

PostPosted: Tue Jun 14, 2016 06:57
by D00Med
The mod I've been waiting for, this is great! I'll try it out now...
Edit: I have been wanting to do this for a long time... D: 12 lines of code?
Anyway, great mod!

Re: [Mod] Vignette [vignette] - Surprisingly good for immers

PostPosted: Tue Jun 14, 2016 12:58
by TriBlade9
Yep. Took me about five minutes, and most of it was remembering how to write Lua. :3

Re: [Mod] Vignette [vignette] - Surprisingly good for immers

PostPosted: Tue Jun 14, 2016 15:29
by azekill_DIABLO
oh a question: if orking your mod and would like to know to remove an hud element just after placing it.
Can you help me?

Re: [Mod] Vignette [vignette] - Surprisingly good for immers

PostPosted: Tue Jun 14, 2016 16:32
by TriBlade9
If I understand your question correctly azekill_DIABLO, you're looking for player:hud_remove(id).

https://github.com/minetest/minetest/bl ... .txt#L2710

Re: [Mod] Vignette [vignette] - Surprisingly good for immers

PostPosted: Tue Jun 14, 2016 16:45
by azekill_DIABLO
yes but how to get the id of the hud_element?

Re: [Mod] Vignette [vignette] - Surprisingly good for immers

PostPosted: Tue Jun 14, 2016 16:56
by ExeterDad
That really gives a nice effect.

Re: [Mod] Vignette [vignette] - Surprisingly good for immers

PostPosted: Tue Jun 14, 2016 18:40
by TriBlade9
azekill_DIABLO wrote:yes but how to get the id of the hud_element?

It is returned from add_hud

Or is your question how to get it from my mod?
I'd have to expose it in some way.

Re: [Mod] Vignette [vignette] - Surprisingly good for immers

PostPosted: Tue Jun 14, 2016 18:42
by TriBlade9
ExeterDad wrote:That really gives a nice effect.


I think it's one of the big factors that made MT feel so plastic compared to MC.

I may be wrong though. It's very hard to determine what causes subconscious feelings. ;)

Re: [Mod] Vignette [vignette] - Surprisingly good for immers

PostPosted: Wed Jun 15, 2016 10:52
by azekill_DIABLO
TriBlade9 wrote:
azekill_DIABLO wrote:yes but how to get the id of the hud_element?

It is returned from add_hud

Or is your question how to get it from my mod?
I'd have to expose it in some way.


i try to get it from your mod....i'm just modifing it :)
i'm adding a special hud on_damage (no problem with this)
buti want i leaves the screen some time after this....

Edit: this is a great mod

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Wed Jun 15, 2016 12:46
by TriBlade9
Okay, I'll look into exposing the id.

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Wed Jun 15, 2016 16:20
by srifqi
Nice simple small mod! Just a function call and an image. :D

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Wed Jun 15, 2016 22:25
by TriBlade9
srifqi wrote:Nice simple small mod! Just a function call and an image. :D

Yeppers. :)

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Wed Jun 15, 2016 23:08
by MineYoshi
Very nice effect to the game!

Very nice, i tested it and looks very great!
+100

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Fri Jun 17, 2016 11:08
by Gael de Sailly
Impressive simplicity.

On the first line I would prefer this:
Code: Select all
local function joinplayer (player)
because creating global variables is not advised when it can be avoided, because it may create confusion if ever another mod uses a variable called "joinplayer". Here, a local variable is better.

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Fri Jun 17, 2016 14:49
by TriBlade9
Oops, I've been in Node.js-land too long. Forgot that creates a global function.

On the bright side, that will make exposing the id very simple.

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Sat Jun 18, 2016 06:11
by Byakuren
TriBlade9 wrote:Oops, I've been in Node.js-land too long. Forgot that creates a global function.

On the bright side, that will make exposing the id very simple.

It's not necessary to console yourself with the bright side, because it is a one keyword fix. To expose it you can just define a global table named after your mod, and put the function there.

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Sat Jun 18, 2016 21:58
by Bas080
I made a pull request which creates an api for the vignette mod. This allows for other mods to increase or decrease the darkness effect.

https://github.com/TriBlade9/minetest_vignette/pull/1

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Mon Jun 20, 2016 20:24
by TriBlade9
Merged, thanks a ton Bas080!

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Wed Jun 22, 2016 14:00
by bark
Love this mod! Thank you.

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Mon Jul 11, 2016 09:07
by jordan4ibanez
This should be in the game by default, very nice.

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Mon Jul 11, 2016 09:45
by Calinou
jordan4ibanez wrote:This should be in the game by default, very nice.


Then it should be configurable, I don't personally like vignettes much and I don't think any "competitive" player does.

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Tue Jul 12, 2016 01:31
by BrunoMine
No matter which the server. This mod is awesome.

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Sun Jul 17, 2016 01:54
by Diamond knight
Calinou wrote:
jordan4ibanez wrote:This should be in the game by default, very nice.


Then it should be configurable, I don't personally like vignettes much and I don't think any "competitive" player does.


should be a setting in the same submenu as enable fullscreen in advanced settings

Re: [Mod] Vignette - Surprisingly good for immersion [vignet

PostPosted: Sun Jul 17, 2016 02:08
by BrunoMine
I believe that this feature should not exist in minetest. This is a unique recusro for survival servers. (Slightly increases the difficulty and puts insecurity player)

I've added to my server.