Glass Shader Deployment Problem

I am a newb with Unity Pro but not new to graphics, GPUs, 3D engines.

My compliments to the OTEE/Unity guys. Incredible product you have for both authoring and truly scalable deployment, both of which I can appreciate from experience with other (much higher priced) tools.

Description:
I am using the FX/Glass/BumpDistortedSpecular shader on a cube and on a custom mesh. I supplied custom textures for Tint Color and Bump as inputs for the shader, then tweaked the settings to achieve the look I wanted. It looks and performs great in the editor.

Problem:
When I deploy the project on the same machine (so this is not a scalability or GPU capabilities issue) as a web player or standalone, the objects using the glass shader described above show the tint texture but no distortion and no specular highlights of any kind.

What I’ve tried:
I know what to expect from other machines with lesser GPUs but this is the exact same machine the editor was running on so I expected the player to look the same. Yes, I turned off Unity first, just in case having multiple OpenGL windows was the issue.

In the standalone version I’ve tried every graphics quality setting during startup and none give the distortion or specular on the objects with that shader, as it does in the editor. I’ve verified the editor that the graphics quality setting for Editor is “good” and I’ve tried setting the default webplayer quality setting from “good” to “beautiful” to “fantastic”, none of which fix the shader in the web player.

The machine I’m editing/developing on is a Mac Pro Octo with Quadro FX 4500.

I appreciate any input on what I’m missing.

Thanks!
Ricko

I thought I’d “bump” this topic now that the holidays are over and add some simple repro steps.

  • Start a new project with standard and pro assets.
  • Change (or verify) Quality settings to make sure editor and web player have the same default settings.
  • Add a simple Plane game object and rotate it perpendicular to the main camera as a background.
  • Apply any material to the plane (I chose diffuse red for this example)
  • Add a Cube game object.
  • Apply the FX Refractive material to the cube, which uses the FX/Glass/BumpDistortedSpecular and any two textures for diffuse and bump spec.
  • Build and Run for webplayer or streamed webplayer, or stand alone, and the specular and bump never show up except in the editor.

Am I missing something? Shouldn’t this look the same in the web player on the same machine?


59589--2184--$testineditor_182.jpg

What is the quality setting of the Web player build vs. the in Editor quality. Check Edit->Project Settings->Quality. It is possible that the web player is on a low quality which disables some shader features.

I thought I mentioned it enough times in the first two posts, and I even listed it in the repro steps. They are identical. I’ve tried setting them both to Fantastic, then Beautiful, then Good, etc. Are you saying you tried the five or six repro steps and did not end up with the same results?

Ricko

put a light in the scene?

Yes, directional. Otherwise the example in the editor would not look like it does.

Ricko

just a thought. i’ve had it happen where once i add a light if i remove it or turn it off scene view still shows specular and bumps. i’ll try reproing it later (don’t have pro on this machine). or maybe post your project - could be something you didn’t realize you did.

I appreciate the thought but making it happen again in a simple scene just for this post helped me rule out the accidental add/remove of the light. It is still there.

Ricko

hey ricko finally got around to trying this. it works here on a last gen 24" imac with a 7300. well at least from my drive. i put a web player online here:

http://www.oculardgi.com/refractionTest.html

but i’m getting a player can’t download it error. maybe it’ll work for you? here’s a package with the content. double click on the scene in project view and it should be set up exacty as i have it. anyway from my drive it looks identical to my editor view.

60239–2201–$refractiontest_176.unitypackage (501 KB)

nevermind on the webby prob. it should work fine. i made an ooooooppps! and put the wrong file on my ftp. looks as it should in safari on mine.

Thanks Pete for trying. I’m using 2.0 pro so I’m not sure if testing it on an older version applies to the current shaders. I’m not seeing any specular highlight on you web player version on this NVIDIA Quadro 4500 on XP. I’ll test the Mac later tonight.

I’ve almost given up on refraction with specular from that shader. I tested it at six locations with five different NVIDIA and ATI cards and received the same results. I’ll file it as a bug with my test project after I finish the currect development cycle I’m in.

I’ve moved on to a workaround faking refraction with a bumpy reflection. It’s not transaparent (since there isn’t a transparent/reflective shader combo in Unity and I don’t have time to learn the difference between GLSL and shaderlab at the moment) but it does look the same deployed as it does in the editor. If anyone knows how to make a reflective bump map shader translucent please post it, otherwise it is near the end of my list of TO DO items for this project.

Thanks!
Ricko

i didn’t looked… did this shader get a bug when updated or not get updated to the new 2.0 syntax maybe? thought it would just throw warnings but still work. just a thought…

Specular highlights don’t show up on your example on any PC or Mac I’ve tested with this evening which included both NVIDIA and ATI cards. Your example from 1.6.2 did have refraction though.

Here is a web player made completely with 2.0 pro with the repro steps listed above (so it has a static camera), and it doesn’t show refraction or specular, even though both are present in the editor. Yes, there is a light in this scene.

http://o-zonegames.com/Content/WebPlayer.html

Can anyone see specular highlights or refraction in this example?

Ricko

P.S. See my picture in an earlier post for exactly what it looks like in the editor.

I can’t see refraction here (MacBook Pro, Radeon X1600). File a bug with the project folder.

Bug submitted. Thanks.

Ricko

that’s because I.CAN’T.READ.™ i used the wrong shader (no spec). i updated the player and poof looks like it was broken in 1.6.2 as well. same results as you. the bumped/distorted works but the one with specular doesn’t. no bug report since ricko already did. let me know if you want one from 1.6, aras.

http://www.oculardgi.com/refractionTest.html

Ok, it’s indeed a bug. It was fixed during early 2.0 development; but then a later almost unrelated change un-fixed the bug again. Uh oh :slight_smile:

As a workaround for now, make an invisible (disabled) object and assign the material that uses “FX/Glass/Stained Bump Distort” shader. Refractive glass+specular shader uses the refractive glass shader, yet the refractive glass shader is not included in the build because of this bug.

Thank you for the workaround!

Ricko