RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.01k stars 178 forks source link

Fog #410

Open DirtGamer301 opened 9 years ago

DirtGamer301 commented 9 years ago

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 commented 9 years ago

Can you tell us what was that version ?

ghost commented 9 years ago

It's 0.36.3.

ghost commented 9 years ago

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 commented 9 years ago

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

graysonk95 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

Possibly code a fog thingy from scratch? Just a suggestion

cryham commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

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 commented 7 months ago

No clue how I didn't know about this before, turns out Caelum fog is configurable through the terrn2 file: https://github.com/RigsOfRods/rigs-of-rods/blob/32c257fe24debc612d681e194b2372f28c32352c/source/main/resources/terrn2_fileformat/Terrn2FileFormat.cpp#L69-L70

CaelumFogStart = 500
CaelumFogEnd = 2500

screenshot_2024-02-19_19-40-20_1

cryham commented 7 months ago

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` 0138`

cryham commented 7 months ago

0137`

cryham commented 7 months ago

set far clip from above should be fixed with this https://github.com/RigsOfRods/rigs-of-rods/issues/3135

cryham commented 7 months ago

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