Ishiiruka
Ishiiruka copied to clipboard
Fog/VFX Forced Lighting Fix
Would it be possible for the Forced Lighting
(GFX tab 2) to include or recognize textures with an alpha channel? This would help some forced lighting problems when developing custom texture packs. If it is possible, could it also be made an independent option from tessellation settings?
can you give me more detail on a game where i can test this?
This was found through testing textures and material maps in Metroid Prime Trilogy. Our lead artist is testing textures and has Forced Lighting
turned up, but as a side-affect the alpha channel for textures are rendering solid like the rest of the texture:
thanks, I can advance with this info.
can you share some of those tetxures to test the issue?
~~Yes, but I will have to email them over. You should have one in your inbox shortly.~~
After some discussion last night, it was found that there was a clerical mistake with the art department. The game uses a chroma key and so traditional transparency used for the alpha channel was the cause of the visible boxes on the example screenshots. However, our lead artist is still interested in Force Lighting
to be enabled independently from tessellation.
It's not completely accurate to say that MP uses chroma key, those textures that are causing those boxes are blended additively (black means 0 alpha). You can tell because of the two strips on either side of the hud, those are used to block out the gauges.
can you try this version to see if it fixes the issue? https://drive.google.com/open?id=1E1hgYK_u8Xgbx4t3y9lm26Wo_UTC1y0_
can you try this version to see if it fixes the issue? https://drive.google.com/open?id=1E1hgYK_u8Xgbx4t3y9lm26Wo_UTC1y0_
I'm getting a 404, is it a public link or did you redact the upload?
https://drive.google.com/open?id=1yKqPFXkLCYIbUM-iVUTIGtIwN3-6mZyE
Thank you Tino, we will get back to you as soon as we can with our results.
Hi Tino, I tested the latest update you made to the emulator regarding decoupling forced lighting from Tesselation. However, the option no longer appears to be working at all now.
The Image Above shows forced lighting working properly with the Rim Lighting parameters. However, this only works when the tesselation option is enabled as well. Disabling tesselation disables any effect that Rim Lighting as on material maps (particularly Normal and Bump) essentially turning off the Forced Lighting as shown below:
This turns off the rim lighting from interacting with the normal map entirely. Due to the lights being static largely and not dynamic, we are relying on Rim Lighting implemented via Forced Lighting to make normal maps visible. This has been working great for us except the added requirement of tesselation creates issues with the geometry. One such issue primarily being the tesselation breaking the Fog volume geometry in some areas of the game as seen in the image below.
Please do let me know if you require any material maps to aid you with the process, I'd be happy to provide you with any number you need. Moreover, really appreciate your help with this project, things certainly would not be looking as good as they are now without your implementation of material maps and lighting into Dolphin. https://imgsli.com/MTUwNzg
Regards
my patch was not meant to detach teesselation from forced ligthing. that is imposible withthe actual code, I use the tesselation shader to calculate surface normals for the surcfaces that has no normals to force ligthing on them. this patch should fix forced ligthing with additive blending interaction to avoid the square artifacts. the fog issue is different will take a look and try to fix it.
Hi, I appreciate the really quick reply. I did try the test version with Tesselation as well, however, it didn't seem to work with tesselation enabled either. No need to worry about the additive blending interaction, I can have the art team that by forcing an alpha channel to the effect texture. I much appreciate your effort with regards to this. Thank You for looking into the fog. This has been a tremendous help. Here are some details that I have gathered regarding the fog: This type of fog volume occurs only in certain rooms. Those rooms being Root Tunnel in Tallon Overworld and any room with Lava in the Magmoor Caverns. Here is a 100% save file for you to free roam and explore with ease.
MetroidPrimeTri-100-Save.zip Here is a save state for Root Tunnel in Tallon Overworld: Hotkey: F5 https://drive.google.com/open?id=1E06gFpn2LAaTUjj8AE2Nqb4C4Ma_W0RT
Once again, Thank You for your help. If there is any assistance I can provide, do let me know.
Regards
https://drive.google.com/open?id=1ukXXwjp3WdV5guRXQeEkJuUDieXJ39lV can you test if this version make it work again with tesselation
Hi Tino, I tested the build and,
Yes, the Forced Lighting is working fine with tesselation enabled now and properly showcasing the material maps. Thank You :D
ok now will take a look at fog