NASA-AMMOS / NASA-AMMOS/3DTilesRendererJS
ImageOverlay: Add support for custom handling of overlay texture
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.5k
- Forks
- 416
- Avg merge
- 17h 52m
- Merged PRs (30d)
- 37
Description
Related to this tweet
When loading image overlays they are currently sorted and layered in the albedo channel. However there may be use cases that benefit from enabling manual processing or custom mapping of the loaded textures to materials:
- Mapping a texture value to another material channel (eg quant mesh water mask to specular channel)
- Custom shader transitions between overlays (eg over time, toggle, distance, etc)
One approach may look like so:
const overlay = new MVTImageOverlay( {
url,
layer: [ 'water' ],
handleTexture: ( texture, material, object, tile ) => {
material.specularMap = texture;
// return "true" to prevent albedo layering
return true;
},
} );
cc @shotamatsuda
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the MVTImageOverlay entry point and trace how loaded image overlays are sorted and layered into the albedo channel. Define the custom texture-handling behavior described in the issue, including mapping to another material channel and preventing albedo layering, then verify the overlay cases and custom transitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, three.js
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100