vircadia / vircadia-native-core

Vircadia open source agent-based metaverse ecosystem.
https://vircadia.com/
Other
531 stars 175 forks source link

Feature Request: Materials - Proximity Transition (Create or Material Entities, Renderer) #1559

Open Aitolda opened 2 years ago

Aitolda commented 2 years ago

A setting in the create menu (same general area as render with zones) or perhaps a material entity feature.

As a user approaches an entity, gradual transition a material property within an entity from their current level to 0 based on the settings below. The opposite would be happen when moving away from an object, or when the invert toggle mentioned below is selected.

From within the create menu, add an optional setting "Proximity Material Transition." and if initialized, more settings would appears

  1. Material property to transition - select which property (Opacity/Alpha, Roughness, Metal, Emissive) (perhaps multiple checkboxes?)
  2. Inner Radius -determines the inner radius from the axis point in which property reaches 1)
  3. Outer Radius -determines the outer radius from the axis point in which propert reaches 0)
  4. Invert toggle -flips the inner and outer radius to have the opposite effect on the model (gradually increases vs gradually decreases)
  5. Radius from parent -If model has a parent, use the radius from parent instead to affect the child material opacity

Use cases

  1. Mesh lighting effects that appear and disappearing depending on your distance ("god rays, false lights).
  2. False glow from within a building using a false window mess with an emissive glow. Are you approach the building said glow could fade as oppacity lowers revealing the actually internal mesh beneath.
  3. Get creative! There is probably a million other users as well.

Thoughts: This could potentially be a part of material entity instead of the object settings itself, but still needs to work in tandem with "render with zones" Perhaps this could prototyped with script in a material entity using user data for settings.

stale[bot] commented 2 years ago

Hello! Is this still an issue?