Add reflectivity map support for Side-Scan Sonar#87
Open
vsjays wants to merge 2 commits into
Open
Conversation
- Updated CreateLook and CreatePhysicalLook methods to include reflectivity map parameters. - Introduced new shaders for handling reflectivity in sonar input. - Modified ScenarioParser to parse reflectivity map attributes. - Enhanced OpenGLSonar to utilize additional shaders for reflectivity mapping.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for a reflectivity map used by the Side-Scan Sonar (SSS)
renderer. Previously the sonar return intensity was driven only by the surface normal
(and material restitution); a look can now supply a texture that modulates the returned
intensity per-texel, enabling spatially varying acoustic reflectivity across a surface.
What changed
New shaders (derived from
sonarInputUv.frag):sonarInputRefl.frag— reflectivity map only (geometric normal + reflectivity texture).sonarInputReflUv.frag— reflectivity map and normal map combined.Look / material plumbing — a
reflectivity_maptexture flows through the full chain:ScenarioParserparses the newreflectivity_mapattribute on<look>elements.SimulationManager::CreateLookandOpenGLContent::CreatePhysicalLookgained areflectivityTexturePath/reflectivityMapPathparameter.Lookstruct now holds areflectivityMaptexture handle; newTEX_MAT_REFLECTIVITY(Unit 18) texture slot added.Sonar rendering (
OpenGLSSS/OpenGLSonar):sonarInputShader_array expanded from 2 → 4 to cover the{plain, normal, reflectivity, normal+reflectivity} shader combinations.
Per object, the shader is now selected based on whether the look has a normal map
and/or a reflectivity map. When a reflectivity map is present it drives intensity;
otherwise the previous material-restitution behavior is kept.
Usage
Add a
reflectivity_mapattribute to a look in the scenario XML: