PDA

View Full Version : Unrealistic specular/reflections


Lightweight
02-05-2011, 04:55 AM
Im modelling my bathroom and I've come across something that I really dont know how to solve.

This is the reflection I get from the lightbulb above the mirror, which don't look right.
The lightbulb itself is a simple surface shader set to white since it's supposed to look all washed out and over exposed. Infront of it, there's a point light which helps light the room.

The material for the tiles are mia_material_x with reflections and glossyness set to maximum, but with a distance falloff.

http://img717.imageshack.us/img717/9130/reflectionbug.jpg


This is how the reflection looks like in real life:

http://img528.imageshack.us/img528/2289/reflectionbugreality.jpg


In the second picture, there is just 1 bright lightsource in the reflection.
The problem disappears of course if I uncheck "emit specular" on the point light, but that won't do of course since then the walls look like cardboard.


Any input on this would be greatly appreciated.

Regards

Bitter
02-05-2011, 07:36 AM
Technically a specular reflection in CG is a hack to simulate the actual reflection of a light source. Since light sources in CG are often delta lights (lights without area) you need this hack to look "realistic".

In reality what actually happens is you get an actual reflection of the light source.

In theory you may be able to get an actual reflection of this light source (the glass enclosure) without using the distance falloff and using a pure reflection and no specular. Also be sure your scene is in the correct physical dimensions and that the tiles are the correct shape.

ganzo
02-05-2011, 10:10 AM
On the mia settings on the tiles....all the way near the bottom....there is a specular slider....turn that all the way down.....and the surface shader on your light....put a value > 1 on that shader. That should fix it.

Lightweight
02-05-2011, 04:37 PM
I tried setting the specular balance in the mia_material to 0 and turning up the V-value of the surface shader, and I totally see how that could work out in a way. What bothers me is that instead of the lightsource being reflected as 1 big light shared by X amounts of tiles, in Maya the reflections are visible as multiple reflections, 1 in each tile instead.
In my mind at least, this cant have anything to do with how the tiles were modeled, at least not in this case since they are simply flat, extruded back with a slight bevel.

InfernalDarkness
02-06-2011, 01:42 AM
I believe it's your geometry causing the 9 reflections instead of one here. What happens if you duplicate the shader onto a purely flat plane, in the same position? I can practically see the shape of your tiles causing the multiples...

I do a lot of custom tile work in my arch/viz career - it's basically my main job. I rarely model the tiles anymore though at all - just use textures, because of all kinds of issues that may arise, and a severe and massive lack of any dynamic way to work with physical tiles. Not saying you SHOULD only use textures, but if you were working on new tile sets and scenes daily, texture-only is the way to go. Modeling them may look slightly more accurate, in some instances, but a quick displacement/normal/bump map will handle all your grout, etc.

Anyway, give it a shot? Check the reflections with a flat, simple plane. If you get one, it's your geometry. If you still get 9? Well... That's just nuts!

Lightweight
02-06-2011, 10:00 AM
I believe it's your geometry causing the 9 reflections instead of one here. What happens if you duplicate the shader onto a purely flat plane, in the same position? I can practically see the shape of your tiles causing the multiples...

I tried this and as expected, just 1 reflection. This confuses me a bit, because when I create new geometry with the same tile material and put infront of the problematic areas, the reflections/specular behave as I want it to, so _obviously_ there is something strange with the meshes of the tiles on that wall. Only procedural material with no spec/bump maps so UV shouldn't matter. (Tried UV-mapping them anyway but didnt help). I checked the normals as well, and they are pointing correctly.
It's all very strange to me, and I can't figure out what can cause this problem, since the normals are OK, and the same material is applied. :) Maya works in mysterius ways!

The "fix" I did was simply creating 9 new planes and putting them right in front of the original meshes, with the same material. No UV mapping, no nothing. Very confusing.

InfernalDarkness
02-06-2011, 11:34 AM
It appears that your normals, while proper, are "smoothed" too much. You may not have actively done anything to make this happen. It wouldn't take much to make the tiles slightly convex or concave, producing this result. I've had similar issues with image-mapped tiles as well, if my bump maps aren't proper or my displacements aren't clean enough. It's just a bit more extreme in your example.

Perhaps post a screenshot of the tile model itself, wireframe and shaded, and we can analyze it with you? Just so you don't have to worry about it again, or go through such a brutal workaround...

Lightweight
02-06-2011, 12:05 PM
It appears that your normals, while proper, are "smoothed" too much. You may not have actively done anything to make this happen. It wouldn't take much to make the tiles slightly convex or concave, producing this result. I've had similar issues with image-mapped tiles as well, if my bump maps aren't proper or my displacements aren't clean enough. It's just a bit more extreme in your example.

Perhaps post a screenshot of the tile model itself, wireframe and shaded, and we can analyze it with you? Just so you don't have to worry about it again, or go through such a brutal workaround...


http://img193.imageshack.us/img193/2854/tilewfs.jpg



Fullsize @ http://img193.imageshack.us/img193/2854/tilewfs.jpg

Regarding the normals, I havent really touched them so you could be right, that they are b0rked even though I don't know about it. They look like they should I think.

The look of the reflection/spec changes quite alot when I previewsmooth the tiles, for the better, but not quite what to expect when comparing with the real photo.

Tobbe
02-07-2011, 11:45 AM
Look at your vtx normals.... for the flat part, they should line up perpendicular to the surface.

Lightweight
02-07-2011, 05:50 PM
Look at your vtx normals.... for the flat part, they should line up perpendicular to the surface. Hmm.. isn't that what they are doing? Or am I misunderstanding "perpendicular"? :P
The normal of the big face is pointing 90 degrees from the surface, that is, straight upwards from it.

I tried unlocking the normals of every tile, then using Set to Face, which made it look alot better, but Im still not sure if thats how it _should_ look like.

InfernalDarkness
02-08-2011, 09:55 AM
Vertex normals are different from face normals. If you check yours for this tile, I think you may find some weirdos around the edges which would account for this rendering behavior.

This, among other reasons, is why I use file maps almost exclusively for doing tile-work in Maya. You can simply update your files from Photoshop and you don't have to mess with so much geometry. Too much margin for error, especially on a quick deadline.

I think if you tried texturing your tile instead, you'd find that you couldn't really tell the difference rendering most scenes, and also that you'd save a LOT of time. Although you have to have a clean UV-map, you'd have far less geometry to deal with as a benefit.

alienpioneer
02-11-2011, 10:46 AM
Hi!

just go to Normals->Set to face .Your normals are smoothed, so the tiles look like half shperes from the renderer point of view.And I agree with InfernalDarkness.A texture with bump in most cases is enough.Except the cases where you have extreme closeups.Cheers !

Lightweight
02-15-2011, 09:58 AM
I solved my problems and never thanked you guys for it, so cheers.
I will definitely try textured tiles in any future project and compare the result and ease of getting it done. The project is about 1 week from finish, currently trying to optimize materials and lights. Getting alot of speckles using FG right now, so will look into the portal light.

Regards

pixelranger
02-15-2011, 10:08 AM
Yes it is the normals. You could have fixed it by extruding the main face of the tiles once or twice inwards (no outwards extrusion). In essence, your tiles were "round", or slightly convex so the normals of the edges of the neighbouring tiles faced slightly towards the center tile.

joie
02-15-2011, 10:55 AM
Yes indeed, you need three edges to interpolate the smooth operation on face normals, not just two (what you have).

So, insert one edgeloop more before the bevel and you are done.

CGTalk Moderation
02-15-2011, 10:55 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.