Archives for March 2019

Unity3D Refraction Transparency Z-buffering Ghosting Issue

I’m posting this just to supply an image to the Unity3d forums of the issue when using refraction shaders with transparent materials. The refraction process in this scene is to mimic underwater FX. However it seems to apply the effect before getting to the transparency Z-buffer part, because I guess transparent objects need to be done last? Anyhow, it causes the transparent objects to ghost, or be shown offset from what they should be as the refraction shifts the objects to a new location but not if it is transparent. This seems to be a common issue with any refraction based shader as I have tried a few and they all do the same thing.

So my solution is to turn off the refraction setting in the underwater system and apply flag style distortion script to the main camera, which gets it looking pretty close to the refraction method but without the transparency ghosting issue.

Under The Sea Daze

Of course I never live up to my New Year Resolutions and haven’t contributed to this blog in a while. I just get too damned wrapped up in my projects and stuff going on. I also easily get sidetracked into other projects. Like this one, a visual screen saver concept that is to go with the new Junior Desktop for children friendly Kiosk systems. This is a personal journal entry in my blog to go over the project, what it is about, my goals and solutions.

Building on the framework for the Windows Screen Savers which supports multi-monitor configurations. This image above shows a panorama view of the program spanning across 3 displays.

I had made lots of screen savers in 2017, I basically spent that entire year tweaking the engine and coming up with new concepts for screen savers to add to my site WindowsScreenSavers.com. It had always been a goal, since I started that project, to make an aquarium version. I will admit that it isn’t as visually beautiful as some of the others, nor does it really compete with the video versions of similar aquatic screen savers, but what it does have is character.

Every day there is something new to be witnessed in this program. Special holidays included, like Christmas, Easter, Halloween, and Columbus Day. Not just those major holidays but obscure ones I didn’t even know existed until I began researching this project. Such as Popcorn Day, the Ides of March, Submarine Day, Goth Day, Kite Day, Ask a Stupid Question Day. The list was daunting, but I have finally closed in to near to handful of the last ones and the end is in sight.

A lot of the assets I had or were easily obtained through Unit’s Asset store or places like TurboSquid. However as I added more assets to the project the file size grew, and grew and when it peaked 1.5 Gigs I knew I needed to reign this madness in. Using tools like Rhino 3D I decimated the meshes taking some like the bust of George Washington from over a 300,000 vertices down to 52,000 (and I could probably crunch that more with little loss of detail.) Then I had to crunch the texture maps, because there was a ton of them and a high quality map of 2048×2048 usually resulted in eating up over 2.7 MB. When you consider most material texture requires a Color Map, Normal Map and often Occlusion and Metallic map all at 2048×2048 that one material is then eating up 10 MP of space. So crunch crunch crunch down to 256 or 512, or if it is close to the camera and the detail is needed it got to be 1024×1024. I also would ditch the occlusion and often the metallic maps. Eventually I got the entire thing down to just under 450 GB. Not bad, more than 60% reduction in space required and more importantly it will fit on CD-R media disc for easier distribution. Of course there will be a download option too.

I created a lot of the models and fish skins myself using Rhino 3D, Corel Draw and Substance Painter. Yeah I have the Adobe Suite with Photoshop, but my god it just too bulky and clumsy to use unless absolutely needed, and it is sometimes, especially when assets come with textures in PSD format, stop that people…just STOP! Use PNG or TGA!

As this project winds up, my son Nick is bugging me to finish work on another project we had dabbled on while in Breckinridge skiing for a week, The Boom Game. That one I’ll write up another journal on I would imagine. I just hope it doesn’t take as much time as this one did, 3 months so far. I also have my major project the dungeon crawl game which was coming along well and looking amazing when it got put on hold to do this silly thing. Ok it’s not silly, I hope it will help drive the new Kid Computers site. Let’s face it hardware is dead, I have to re-energize that company with software solutions.

That’s about it for now. Hopefully I will post again before 2020. HAHAHAHA.