Comments (10)
It appears App::GetCameraManager()->GetCamera()->setFarClipDistance(fogEnd / 0.8);
culls far away objects.
This is latest master:
And here's with the above line removed:
Clouds are fully visible now, but notice the much higher triangle/batch count and subsequently lower FPS.
Also BTW, I think 5000 m isn't much for max far distance. And it's not really a key setting nowadays IMO.
Pretty sure 5000 is actually unlimited, on extremely large maps such as Grenoble the entire heightmap is visible:
from rigs-of-rods.
Okay. Well right now it's either fog or clouds, can't have both. So I think this should be fixed.
Can't have far flat plane clouds with near camera distance.
As for more batches, I think it'd be up to user or graphics presets to set this if it drops Fps.
Anyway 140 Fps sounds pretty high already, and over 2000 batches like way too high regardless.
from rigs-of-rods.
Yeah the FPS is only because I'm on a high end PC (13700k, 4070ti), the difference will be much more drastic on the average player's lower end CPU with integrated graphics. High batch count is another pain point in RoR, Petr is aiming to fix it with his TerrnBatcher project (#3030)
I'm sure there's a proper way to fix the clouds, maybe with a patch to Caelum sources?
from rigs-of-rods.
Looking at Caelum source, the cloud entity is named Caelum/FlatCloudLayer/Entity/
+ random ID. Would it be possible to apply the culling to all objects except the cloud entity?
from rigs-of-rods.
I don't think it's possible. This is camera far plane, it works for all.
from rigs-of-rods.
@paroj Can you advise please? Intuitively I'd expect some option to override the near/far clipping per render queue or maybe even per entity.
from rigs-of-rods.
Intuitively I'd expect some option to override the near/far clipping per render queue or maybe even per entity.
yes, you can set the max rendering distance per entity:
https://ogrecave.github.io/ogre/api/latest/class_ogre_1_1_movable_object.html#afe1f2a1009e3f14f36e1bcc9b1b9557e
note that using the far plane for this was wrong all along, as not rendering the objects is merely a side effect. The main purpose of the far plane is controlling the depth precision. The visibility system in Ogre is the intended tool for this.
from rigs-of-rods.
I don't think we're on the same page, or maybe I don't get it, I didn't look much inside code.
Am I right here ?:
- One cloud layer here is done with a plane, which is basically 2 big triangles.
- All triangles are culled by HW on GPU (during rasterization?). From camera far parameters also?
- Setting camera FarClipDistance, does change its frustum culling, which works well (on CPU) for many single entities,
meshes with small triangles. - rendering distance per entity also does the same, disable or enable rendering basing of distance.
- even if clouds had a plane with many triangles these would also get cut off and culled in HW
from rigs-of-rods.
all above statements are correct. you want different CPU culling distances for different objects (cloud/ terrain - the rest). FarClipDistance can only be set globally and influences HW and CPU culling. Therefore you need to use rendering distance.
All triangles are culled by HW on GPU (during rasterization?). From camera far parameters also?
yes, see:
https://paroj.github.io/gltut/Positioning/Tut04%20Perspective%20Projection.html#idp2563
from rigs-of-rods.
Okay.
So I think the solution is still like like wrote in 1st post. To have far visibility of clouds.
But also to have less trees, adding maybe own distance to Gui or some other way to have them visible less far.
From what I know trees etc are in paged-geom and controlled by track file in .tobj like so:
trees 0, 360, 1.30169, 1.57545, 1.0, 300, 1000, treeD-22desMed.mesh none Des17-NileCity-veget4.png
here 300, 1000,
is distance1, distance2,
so it should rather be controlled by user from Gui for all tracks rather than by each track itself.
I'd also BTW add a multiplier (for that 1.0 before or a new thing) for trees multiplier to reduce (or get more) trees by user, from Gui too. We have such multipliers for trees, grass and their distance in StuntRally since a long time.
from rigs-of-rods.
Related Issues (20)
- Flares3 Behavior HOT 2
- lib/libXt.so.6 file too short error HOT 9
- Add input sources for cruise control for the dashboard system HOT 3
- Rigs of rods repository HOT 16
- in-game repository is not working HOT 5
- Keyboard steering sensitivity HOT 11
- Some cars can't start race HOT 4
- Tuning system glitches and shortcomings HOT 7
- Race improvements HOT 8
- Lights=None in RoR.cfg crash air vehicles loading HOT 3
- More grass layers do grass blades in same places. HOT 13
- Favorite vehicles/terrains HOT 4
- Add release on flathub.org (flatpak) HOT 8
- Waves on water is broken HOT 9
- Display Scaling is COMPLETLY BROKEN. HOT 28
- setEventSimulatedValue does not work in multiplayer while server bot is present
- Texture conflicts between mods HOT 2
- Alternative mods folder location HOT 5
- Videocamera Mirrors Flipped HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rigs-of-rods.