Amerio.Stephane Posted Wednesday at 09:04 AM Posted Wednesday at 09:04 AM Hello, We are trying to simulate a short FOV sensor for sea Search and Rescue (SAR) missions in ocean. The camera has a short FOV (a few degrees). Usually, on land, I would simply use render_distance_scale with a value compensating the objects LOD distance settings (usually set for a FOV around 60°). So typically, I should have this code running in update: ConsoleVariableVec4 render_distance_scale_fov{ "render_distance_scale_fov", "<scale1 scale2 fov1 fov2> Map FOV scale to Distance scale", false, {1,10,60,6} }; // In update() const float fov = decomposePerspectiveFov(Game::getPlayer()->getProjection()); float k = inverseLerp(render_distance_scale_fov.get()[2], render_distance_scale_fov.get()[3], fov); float ds = lerp(render_distance_scale_fov.get()[0], render_distance_scale_fov.get()[1], k); Render::setDistanceScale(ds); This works correctly on land, but fails miserably with water in the world because it produces way too much triangles. What would be the correct way to fix this? Thanks.
silent Posted Wednesday at 11:38 AM Posted Wednesday at 11:38 AM Hi Stephane, Indeed, the ObjectWaterGlobal is not fully ready to direct distance scale changes. Maybe you can mitigate the performance drop by switching to custom water settings and decreasing Geometry Progression values when you change FOV. You can do it inside Editor as well in Windows -> Settings -> Water -> Geometry -> Preset -> Custom -> Geometry Progression: Thanks! 1 How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts