Shading Problem

Hello to Untiy Support

Look down below: Sunglases: in the upper picture you see the glass has a unwanted shape on its specular channel. The picture down shows the same setting but with a grafic emulation (DX7) on. Now it looks just fine.

But fact is: In the runtime version even on a DX10 graficboard (nVidia GTX285), it shows those unwanted shapes on the glasses.

Whats going wrong here?

You are using Parallax + Specular shader with no textures. Hence it runs slower than it should (because it’s doing whole parallax bumpmapping effect out of… nothing), and looks wrong. What if you used a simpler shader (e.g. Transparent/VertexLit)?

As you can see in the screen there is now all setted as it should be. But still, it shows that funny special effect. The same it does with the FX Glas effect shader.

But if I activate the grafic emulator (from DX 6 on) the shader works just fine. I got that effect with differend nVidia an ATI boards which are not older than one year. (Within Unity3D workspace and on the runtime application)

May be it is something very simple: Perhaps, to activate those shader effects it must be switched on in the Unty3D preferences? (Quality settings?)

I got today a demo with a customer, but with that shader problem I must shift it to a later date…

132030--4902--$funnyspeculareffect_130.jpg

If it works just fine and just like you want it to work in DX7/DX6 settings, that probably means you do not want or need the bumpmapping. Hence, switch shader to be Transparent/VertexLit (which is what is used on DX7/DX6 as a fallback) and it will work.

If you do need parallax bumpmapping – is your mesh properly UV mapped? Bumpmapping needs texture coordinates to compute the tangent space. Right now it looks like your tangent space is kinda wrong.

…and possibly you want entirely different shader for glass. cgoran just posted a nice (and fast) glass shader here: http://forum.unity3d.com/viewtopic.php?t=20435

Hello

Thanks for your quick support. (I’ll never say any more, there ia almost no support…)

That funny specular effect is with all shader which has a bump option activated. In Cinema 4D I only have maped a blind material with a solid color to the glasses (quadermapping, no UVs).

What it neets now is a Transparent shader with Specular with out Bumping but with Distortion.

Roman

Try UV mapping the glasses and then using the Refraction shader that comes in the Pro standard Assets.

Though a correct UV set made within Cinema 4D, it looks now worse than before…?

132685--4913--$uvs_on_glasses_666.jpg
132685--4914--$uvs_on_glasses_c4d_946.jpg

It’s a “slow” day here at UT… if you send me the glasses in a Unity Package with any textures/materials you may be using to “ethan at unity3d dot com” I’ll have a look :wink:

[Edit] FBX format for the Glasses would be preferred as I think the issue is with the UVs.

Yep, many thanks.

I try to attache here only the fbx file, which was exported from Cinema 4D.

Nice weekend
Roman

132727–4915–$3d_glasses_119.zip (242 KB)

The UVs were not getting exported… probably because you had no texture on the material when exported from C4D. Anyway, here’s a package that should get you started in the right direction. It uses a reflective/refractive shader for the glass (same one used in the Sewer demo).

132742–4916–$glassespackage_659.zip (1010 KB)
132742--4917--$picture_18_502.png

Man you guys are really bored aren’t you? :stuck_out_tongue:

Nice result though, Ethan :slight_smile:

We’re done man… just doing support and waiting until tomorrow when we all fly out to GDC! :slight_smile:

No there was a material mapped to this geometry’s UV-mesh on Cinema4D (with a grey color in the color channel). But it seems always to be the same problem anyway (this is broing yes) with the interchange between Cinema 4D and Unity3D.

Thanks Ethan for your (straight and uncynical) support.

Roman

But still: By importing your fbx-file of the glasses back into Cinema4D there is also no UV mesh at all. The question is >:How I get the same nice resault with Cinema 4D my self for using within Unity3D, without to prosecute you all the time…

Sounds like a trip to the C4D forums or contacting C4D support is in order because their FBX importer has some issues. If C4D can’t export UVs in the FBX format without a texture assigned to the mesh/material it figures that it won’t import UVs for the same reason. The Glasses FBX I posted obviously had UVs so this is a C4D issue and they need to fix this on their end (Unity relies on the FBX implementation of the external 3D app).

Anyway, glad to help today… just straight and uncynical support :wink: