microsoft / MixedRealityToolkit-Unity

This repository is for the legacy Mixed Reality Toolkit (MRTK) v2. For the latest version of the MRTK please visit https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity
https://aka.ms/mrtkdocs
MIT License
6k stars 2.12k forks source link

Challenges Learning Texture Combiner #8079

Closed jbienzms closed 9 months ago

jbienzms commented 4 years ago

Describe the issue

Texture Combiner is a tool included with MRTK to pack multiple textures into a single image map. It's used for the Channel Map feature of the MRTK standard shader. It's already fairly well documented, but I still had issues using it with maps I've received from an artist.

Feature area

The biggest issue I struggled with is understanding what input values mapped to which output values. Here are some examples of things I had to figure out by trial and error:

These values may make perfect sense for someone with a PBR rendering background, but for someone who's just getting started these aren't entirely obvious. If you don't have this knowledge, troubleshooting can be difficult. For example, one of the first Occlusion maps I worked with maxed out at RGB 128,128,128. When I imported it, my model suddenly got very dark and I didn't understand why. As soon as I remapped 0 - 128 to 0 - 255 everything looked OK.

Next, it wasn't obvious to me at first that the "Uniform" sliders replace the maps. In fact I didn't figure it out until I realized that I couldn't drag a different image into the map slot when the slider was anywhere other than far-left. I thought these sliders adjusted a baseline for how the values in the map were treated, but that was not the case. I highly recommend noting this in the documentation.

Finally, I highly recommend adding a Documentation button to this panel like exists on many other MRTK inspectors.

Existing doc link

https://microsoft.github.io/MixedRealityToolkit-Unity/Documentation/README_MRTKStandardShader.html#texture-combiner

stale[bot] commented 3 years ago

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

Ayfel commented 3 years ago

How does it replace the maps? This is important if its a destructive process (scary!)

jbienzms commented 3 years ago

It doesn't actually replace any maps, it generates a new one. Though I agree that's not called out very well in the documentation.

The idea is that multiple maps can be combined into a single image with different channels representing the things you'd normally find in PBR (roughness, etc.). This saves on memory and could theoretically allow the shader to be more efficient. It would be great to get this explained better in the doc.

Ayfel commented 3 years ago

I was commenting on the following that you mention:

"...it wasn't obvious to me at first that the "Uniform" sliders replace the maps. In fact..."

What does the Uniform slider actually do?

jbienzms commented 3 years ago

Ahhh, gotcha. Yes, that was confusing.

image

If you supply an image for the map (in the green box), it will use that image. But only if the Uniform slider is set to -0.01. If you adjust the slider at all (red) and the number goes above -0.01 then the image in the green box is actually ignored and the slider provides a "uniform value" in place of the image. It's as if you filled the entire image with a shade of grey, and the shade of grey is linked to the slider.

Ayfel commented 3 years ago

Oh awesome, that was very confusing haha thank you for clarifying

stale[bot] commented 2 years ago

This issue has been marked as stale by an automated process because it has not had any recent activity. It will be automatically closed in 30 days if no further activity occurs. If this is still an issue please add a new comment with more recent details and repro steps.

IssueSyncBot commented 9 months ago

We appreciate your feedback and thank you for reporting this issue.

Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.

Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.

Please note that MRTK3 was released in August 2023. It features an all-new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visit https://www.mixedrealitytoolkit.org.

Thank you for your continued support of the Mixed Reality Toolkit!