-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update code for loading normal and albedo maps from image data #1068
Conversation
Signed-off-by: Ian Chen <[email protected]>
This is certainly better, but it looks like there still some differences |
I just also noticed that the some of the objects in the scene appear to have a metallic look? Or at least a black band that I don't think should be there. For reference, with all lights turned off and using #1067 And for additional reference, here's the render using Blender Cycles |
While testing with ogre built from source, I noticed that it also generates mip maps for the albedo textures (and maybe others) which we're not doing. It could contribute to the differences, and there could also be others. |
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
For that particular black band, I think at least partially it's because GI is low res and not working well. If I turn off GI, that part of the ceiling is dark since it's not lit by the spot lights. With GI enabled, it lights up part of that surface but not all, leaving the black band. If I change GI resolution to [64, 64, 64], that band is gone. However, there are still small artifacts in other places. |
I think the appearance is now closer to the result from loading textures files. Can we get this in first? |
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
🦟 Bug fix
Summary
Currently when we load a normal map from an image data (e.g. from a glb file that has an embedded normal map texture), we upload the image data as RGBA8 with 1 mip map level. This is different from what ogre's texture manager does when it loads a normal map from file. To make the process consistent, we follow the same steps: convert to an RG signed 8 bit format then generate multiple levels of mip maps. I found that the mip map generation process made a difference to the final appearance. It helps to make the visual look smoother when viewed from a distance.
Before: The visuals appears to have some artifacts / noise, e.g more evident on the cushions behind the tables
After: visuals appear smoother
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.