Jump to content

Fix Line on screen when adding brightness to the Environment and LensFlare not showing


Recommended Posts

  • Premium

Hey, so, basically I recently got into making environment effects and skyboxes, I'm pretty satisfied with the results so far, nevertheless, I had two issues:

 

I was playing with the LensFlare on WorldEditor, that's how it should be, or at least, that's what the result the World Editor window showed me:

 

184645bmO7dUz.png

 
 

 

When the camera is looking the MainFlare (the sun), the window should get blurrier and brighter, and it should also show the Flare effect you see. (the circles)

But the problem was that, when I got in-game, it was like this:

 

184645THqNc9U.png

 

So the issues were 2:

First problem:

You see it only was getting brighter for only like half of the window, depending on my resolution (It was perfect on 800x600 and 1024x768, if I chose a resolution even just a little bit wider, a part of the screen bugged out, but it worked even on fullscreen as long as I used one of those 2 resolutions).

Fix:

1. Open your ClientSide sources and then your LensFlare.cpp file. Search for:

RenderBar2d(0.0f, 0.0f, 1024.0f, 1024.0f);

Change it into:

RenderBar2d(0.0f, 0.0f, 3840.0f, 2400.0f);

^ I overdid the fix so it supports even the most advanced gaming resolutions.

 

Second problem:

It didn't show the LensFlare effect (https://metin2.download/picture/0cbuuZn9EK5V0Wroc0pHLnm4QmkzK85K/.png), no matter what I did. (Yes the binary loaded the 6 flare files from my client correctly).

Fix:

1. Open your ClientSide sources and then your LensFlare.cpp file. Search for:

static float g_afColors[][4] = {{1.0f, 1.0f, 0.0f, 1.0f}, {1.0f, 1.0f, 1.0f, 1.0f}, {0.0f, 1.0f, 0.0f, 0.8f}, {0.3f, 0.5f, 1.0f, 0.9f},
								{0.3f, 0.5f, 1.0f, 0.6f}, {1.0f, 0.6f, 0.9f, 0.4f}, {1.0f, 0.0f, 0.0f, 0.5f}, {1.0f, 0.6f, 0.3f, 0.4f}};

Each of these subarrays is a color, structure = R, G, B, A, the last argument, A, is the Alpha, by increasing it, it will eventually show them, make them as transparent as you like!

 

My end result at max brightness: https://metin2.download/picture/1rh42RCCj9h9SOYokntOPY5MRJNCkXFe/.gif

 

For the moderators: This thread was originally a help request, but since I managed to fix both of those issues, I think the thread should/could be moved to Guides/HowTo, I've already changed it so it fits for that section.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Love 22

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Premium
1 hour ago, asdajdja said:

omg!

Thank you..

No problem!

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Forum Moderator
On 4/6/2019 at 11:56 PM, Syreldar said:

Wow ?
It looks amazing ?
The lens flares are totally sexy.
 

Best regards
Raylee

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

  • Premium
2 hours ago, Tatsumaru said:

It's hard to set the circles to be more visible, and the picture does not brighten, but fix is brilliant;)

 

What do you mean by it doesn't brighten up?

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Honorable Member
21 godzin temu, Syreldar napisał:

What do you mean by it doesn't brighten up?

When trying to increase the visibility of the vertebrae, overall brightness also increases.

neNB9PW.jpg

By the way, I observed that the effect varies depending on the set resolution of the game. For example, in 1024 the effect will look good, and when we change the game settings to full HD, the effect may be different. Sometimes I will also enter the game with the settings of full HD resolution and the effect looks good, and the other time I will go to the same settings and the effect is different. It's such a curiosity ^^

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1

GhwYizE.gif

Link to comment
Share on other sites

  • Premium
19 hours ago, Tatsumaru said:

When trying to increase the visibility of the vertebrae, overall brightness also increases.

neNB9PW.jpg

By the way, I observed that the effect varies depending on the set resolution of the game. For example, in 1024 the effect will look good, and when we change the game settings to full HD, the effect may be different. Sometimes I will also enter the game with the settings of full HD resolution and the effect looks good, and the other time I will go to the same settings and the effect is different. It's such a curiosity ^^

Placebo effect I believe, the code doesn't make the brightness random, it only depends how far the MainFlare is to the center of your screen, the nearest it is, the brightest the effect will be.

It doesn't depend on resolution.

Edited by Metin2 Dev
Core X - External 2 Internal

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • 9 months later...
  • 2 weeks later...
  • Premium
On 1/24/2020 at 6:50 AM, HITRON said:

How can you put Sun in the Game o.O?

It's just the mainflare. You can enable it via worldeditor.

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • 3 years later...

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.