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

TriBlade9
Member
Posts: 89
Joined: Fri Sep 05, 2014 09:35

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

by TriBlade9 » Post

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

User avatar
D00Med
Member
Posts: 943
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med
Location: Australia...somewhere

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

by D00Med » Post

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!
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

TriBlade9
Member
Posts: 89
Joined: Fri Sep 05, 2014 09:35

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

by TriBlade9 » Post

Yep. Took me about five minutes, and most of it was remembering how to write Lua. :3

User avatar
azekill_DIABLO
Member
Posts: 7494
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

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

by azekill_DIABLO » Post

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?

TriBlade9
Member
Posts: 89
Joined: Fri Sep 05, 2014 09:35

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

by TriBlade9 » Post

If I understand your question correctly azekill_DIABLO, you're looking for player:hud_remove(id).

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

User avatar
azekill_DIABLO
Member
Posts: 7494
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

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

by azekill_DIABLO » Post

yes but how to get the id of the hud_element?

User avatar
ExeterDad
Member
Posts: 1717
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad
Location: New Hampshire U.S.A

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

by ExeterDad » Post

That really gives a nice effect.

TriBlade9
Member
Posts: 89
Joined: Fri Sep 05, 2014 09:35

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

by TriBlade9 » Post

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.

TriBlade9
Member
Posts: 89
Joined: Fri Sep 05, 2014 09:35

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

by TriBlade9 » Post

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. ;)

User avatar
azekill_DIABLO
Member
Posts: 7494
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

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

by azekill_DIABLO » Post

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

TriBlade9
Member
Posts: 89
Joined: Fri Sep 05, 2014 09:35

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

by TriBlade9 » Post

Okay, I'll look into exposing the id.

User avatar
srifqi
Member
Posts: 557
Joined: Sat Jun 28, 2014 04:31
GitHub: srifqi
IRC: srifqi
In-game: srifqi
Location: Indonesia

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

by srifqi » Post

Nice simple small mod! Just a function call and an image. :D
Saya dari Indonesia! · Terjemahkan Minetest! · my mods · My nickname in IPA: /es.rif.qi/

TriBlade9
Member
Posts: 89
Joined: Fri Sep 05, 2014 09:35

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

by TriBlade9 » Post

srifqi wrote:Nice simple small mod! Just a function call and an image. :D
Yeppers. :)

User avatar
MineYoshi
Member
Posts: 5373
Joined: Wed Jul 08, 2015 13:20
Contact:

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

by MineYoshi » Post

Very nice effect to the game!

Very nice, i tested it and looks very great!
+100
Happy new Year 2020: let's all aim finally for a clear vision of what we want to make of Minetest!

User avatar
Gael de Sailly
Member
Posts: 753
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly Ginkgoo
Location: France

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

by Gael de Sailly » Post

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.
Just realize how bored we would be if the world was perfect.

TriBlade9
Member
Posts: 89
Joined: Fri Sep 05, 2014 09:35

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

by TriBlade9 » Post

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.

Byakuren
Member
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

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

by Byakuren » Post

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.
Every time a mod API is left undocumented, a koala dies.

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

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

by Bas080 » Post

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

TriBlade9
Member
Posts: 89
Joined: Fri Sep 05, 2014 09:35

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

by TriBlade9 » Post

Merged, thanks a ton Bas080!

bark
Member
Posts: 35
Joined: Thu Sep 24, 2015 13:25
In-game: bark

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

by bark » Post

Love this mod! Thank you.

User avatar
jordan4ibanez
Member
Posts: 1895
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez
Location: Rhode Island, USA

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

by jordan4ibanez » Post

This should be in the game by default, very nice.
I've been gone for a long time

User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

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

by Calinou » Post

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.

User avatar
BrunoMine
Member
Posts: 1073
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

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

by BrunoMine » Post

No matter which the server. This mod is awesome.

User avatar
Diamond knight
Member
Posts: 475
Joined: Sun Apr 19, 2015 19:50
GitHub: Diamondknight
In-game: Ferrumprinceps
Location: Chilling in Constantinople
Contact:

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

by Diamond knight » Post

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

User avatar
BrunoMine
Member
Posts: 1073
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

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

by BrunoMine » Post

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests