Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
102 stars 0 forks source link

RenderVisibilityOverride feature request #1930

Open gameboycjp opened 2 weeks ago

gameboycjp commented 2 weeks ago

Is your feature request related to a problem? Please describe.

While RenderTransformOverrides and RenderMaterialOverrides are useful, they're not as good of a solution if you only want to hide something outright. They also have a number of edge cases that break them, though those will be separate bug reports that I'll make separately.

Describe the solution you'd like

I propose an RenderVisibilityOverride component as an alternative for this task, to simplify the workflow of hiding objects, to sidestep edge cases, and to reduce rendering workload.

Describe alternatives you've considered

A dedicated skip rendering material that minimizes resource utilization on unneeded materials and simplifies hiding a material would be a much more versatile feature. I don't know how possible that is currently, and it would need to be a separate issue. The closest there is to this is a cutout unlit, but it's still more setup and resource usage than the aforementioned idea.

Additional Context

No response

Requesters

gamethecupdog

Frooxius commented 2 weeks ago

Unfortunately this isn't actually possible with our current rendering pipeline.

Originally RenderTransformOverride had this feature during development, where you could disable something completely, but due to this working in a "late stage" part of Unity's rendering process to hook into different types of renders and cameras, it's "too late" to actually hide something fully - it wouldn't work consistently.

Because of that I had to drop that aspect.

Your only choices are the transform/material overrides right now, I don't expect to revisit this until we move away from Unity.

shiftyscales commented 2 weeks ago

I'll mark this issue as blocked by #1401 then. While it's not currently feasible, it may be in future/it sounds like there was interest in this being a thing.