RagnarokFileFormats icon indicating copy to clipboard operation
RagnarokFileFormats copied to clipboard

Research the various weather effects that are supported by the client

Open rdw-software opened this issue 5 years ago • 2 comments

Not really a file type, but it might be of interest regardless. The idea is to put it into the Research folder, alongside all the other concepts that are somewhat related.


There are some working weather related effects like snow and fog in-game, but a much more comprehensive system was planned at some point. This would include dynamic sun location and a true day/night cycle. One problem was probably that model shadows in Ragnarok are precomputed. A rain effect was implemented, but it was probably never finished as it looks pretty bad. The jRO team used to have some pictures related to this on their news page, and I believe they planned to release the new weather system with the Yuno update. Private server developers took matters into their own hands. If you played on an eAthena server around 2004 you may remember the horrible night effect that was enabled by default: Enabling the blind effect on all players until it was "morning" again!

Looking into the snow effect seems handy, as it's used in Lutie. And the fog effect is required to add hue to the scenes anyway.

There's also clouds (that use the mislabeled "fog" texture), which can be seen on at least the following maps:

  • yuno
  • gonryun
  • thana_boss
  • 5@tower

Additionally, there's some "lens flare" effect for sunlight, but I'm not sure if that's actually used.

rdw-software avatar Nov 29 '20 02:11 rdw-software

I'm removing the draft document detailing the findings of researching the fog effect. Here's the points of importance, to revisit later:


Fog Effects

Fog Parameters

As of the 2013 client, there's no Lua file and the client still reads the TEXT file?

  • far (linear)
  • near (linear)
  • color (both)
  • density (exp only)
  • Is the exponential fog mode actually used?

Color format: AARRGGBB (Alpha is IGNORED?)

In 3rd party clients

RagnarokJS

  • FogFarLimit = 1200 (what unit?)
  • They used Three.js for rendering the fog
  • Does it look accurate? Compare pay_dun00, xmas_dun02 maybe
  • If yes, how does the fog rendered by TJS work?

Aesir

if(arr.length > 2)
{
	f.fogFar = arr[1].to!float * 240;
	f.fogNear = arr[0].to!float * 240;

	f.fogColor = Color.fromInt(arr[2].parseNum << 8).tupleof[0..3].Vector3 / 255;
}
else
{
	f.fogFar = 360;
	f.fogNear = 10;
	f.fogColor = Vector3(1);
}

rdw-software avatar Nov 29 '20 03:11 rdw-software

Looks like they've finally moved the definitions for at least some of this stuff to Lua:

image

The same is true for regular effects:

image

Source: Balfear, Dia

I wonder if there were any functional changes?

rdw-software avatar Nov 03 '21 16:11 rdw-software

If weather effects aren't used, does anyone even care? The fog is just a standard linear vertex fog, easily reproduced.

rdw-software avatar Sep 04 '23 23:09 rdw-software