Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fog #410

Open
DirtGamer301 opened this issue Aug 17, 2015 · 16 comments
Open

Fog #410

DirtGamer301 opened this issue Aug 17, 2015 · 16 comments

Comments

@DirtGamer301
Copy link

Little request:
The ability of adding fog to a map and enabling/disabling fog in the settings would be nice :)

Edit: Or, as I just was told older RoR versions had fog, fixing it :p
It looked like this (creds to Hotrod for the pics):
https://lh3.googleusercontent.com/-it7sUFkMA98/VdHqvszgGMI/AAAAAAAANT4/wcw8lwDlf0A/s0/screenshot_110.png
https://lh3.googleusercontent.com/-BJUwebzGUHw/VdHr3KDdAhI/AAAAAAAANUA/wooyqt1XCy8/s0/screenshot_111.png

@Max98 Max98 changed the title [low priority Request] fog Fog Aug 17, 2015
@Max98 Max98 added the request label Aug 17, 2015
@Max98 Max98 added this to the Post-Nextstable milestone Aug 17, 2015
@Max98
Copy link
Member

Max98 commented Aug 17, 2015

Can you tell us what was that version ?

@ghost
Copy link

ghost commented Aug 17, 2015

It's 0.36.3.

@ghost
Copy link

ghost commented Aug 17, 2015

Then why was it removed from RoR? Also, moving fog would be realistic, and it should be able to be controlled like you control time in RoR.

@DarthCainRor
Copy link

Probably like most things, something else changed which broke it, and it was never fixed. :-\

@graysonk95
Copy link

Hopefully this might help.
Here is a screenshot from v37.126 showing what the fog looked like on Opmap.

screenshot_102

IIRC, fog was a part of some hardcoded Caelum settings. I have screenshots from v36.2 where there is very minimal fog, while screenshots from v37.126 show more fog.

@Hiradur
Copy link
Contributor

Hiradur commented Oct 18, 2015

Caelum provides some sort of fog. Haven't tried it yet but it's in the code. However, the future of Caelum is currently unclear due to the upcoming port to Ogre 2.1. We'll have to see how far compatibility goes...

EDIT: OGRE 2.1 port post-poned since it's not as mature as we'd like it to be.

@Hiradur Hiradur modified the milestones: Post-Nextstable, 0.4.6.0 Oct 24, 2015
@Hiradur
Copy link
Contributor

Hiradur commented Nov 22, 2015

Hm, the fog shader is only available in Cg shader language which we want to eliminate from RoR because it's outdated and Nvidia stopped developing it.
So what should be done about this?

@disloyalpick
Copy link
Contributor

Possibly code a fog thingy from scratch? Just a suggestion

@Hiradur Hiradur removed this from the 0.4.6.0 milestone Jun 12, 2016
@cryham
Copy link
Contributor

cryham commented Feb 17, 2024

Maybe with Ogre 14 and in RTSS there is fog?
Since fog has to be added to all materials/shaders the same way.

Also been long time, so what do you think of moving to OgreNext? Stunt Rally 3 showed it's rather mature and very optimized. But still quite problematic. I'm just saying, since such move would be a gigantic task.

@ohlidalp
Copy link
Member

Moving to OgreNext won't be a priority in near future. The priority is physics, gameplay and extended races (mission system). OGRE14 matters because of RTSS and SDL. OgreNext doesn't bring anything nearly as substantial and I'm dedicated to keeping all mods functional, which will be a challenge.

OGRE14 has Fog tutorial: https://ogrecave.github.io/ogre/api/latest/tut__terrain_sky_fog.html#autotoc_md23 - OGRE11.6 doesn't but the API is there: https://ogrecave.github.io/ogre/api/1.11/class_ogre_1_1_scene_manager.html#a4222a0689cb56011c11faa9976192f11

@cryham
Copy link
Contributor

cryham commented Feb 19, 2024

Allright, thanks for info. Good to hear about physics improvements (gameplay too), for me it's the best part of RoR.
Well then I think I should try again with Ogre14 branch.

@CuriousMike56
Copy link
Collaborator

CuriousMike56 commented Feb 20, 2024

No clue how I didn't know about this before, turns out Caelum fog is configurable through the terrn2 file:

def.caelum_fog_start = file.getInt ("CaelumFogStart", "General", -1);
def.caelum_fog_end = file.getInt ("CaelumFogEnd", "General", -1);

CaelumFogStart = 500
CaelumFogEnd = 2500

screenshot_2024-02-19_19-40-20_1

@cryham
Copy link
Contributor

cryham commented Feb 21, 2024

Great, it works.
Gets color from sky, and is gray on horizon. A bit sad. I'd prefer skyblue or so. Then orange on sunset etc.
I think it'd be better if fog distane didn't also set far clip for camera. Close fog cuts meshes, looks odd to me, it dis/appears back when I rotate.
0137](https://github.com/RigsOfRods/rigs-of-rods/assets/720641/3efe9193-f0da-4d3e-9403-47c8ace70ee8) ![0138

@cryham
Copy link
Contributor

cryham commented Feb 21, 2024

0137`

@cryham
Copy link
Contributor

cryham commented Mar 1, 2024

set far clip from above should be fixed with this
#3135

@cryham
Copy link
Contributor

cryham commented Mar 1, 2024

Fog doesn't get on water (not hydrax)
01_22-26-19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants