View Full Version : Brazil skylight= no specular reflection
Vossiewulf 05-21-2003, 07:43 AM Posted first in another forum, apologies all around...
After some very frustrating hours with Brazil, I realized that its sky light will not create a specular reflection. Honestly that irritates me, as it is simply wrong. Look at any photo of something capable of specular reflection and any that you see is just as likely to have come from the sky dome or an indirect source as it is from a direct source. Especially in the subject matter I'm working in; these aircraft were covered in doped linen that had relatively low gloss but very high specularity, most of which (in photographs from the period, that is) comes from the sky dome.
The only way I've come up with for getting correct lighting effects is to surround the object with many low intensity Brazil lights that are set to affect only the specular channel, not diffuse.
See the WIP below. It's lit with a single brazil area light that's coming almost directly down, but is slightly to the left foreground of the aircraft. There should be a specular reflection on the cowling; there is none. I ran some tests this afternoon, and yes, using the surround the thing with lights does work. It's just a massive pain in the butt. Plus it increases render times exponentially.
Just to be clear, the specular reflection on the prop is from the area light; its surface normals happen to be pointed in such a way that the area light gives the reflection. And the reflection on the undersurface of the wing has nothing to do with specularity or glossiness, it's simply a Brazil advanced material with reflection notched up to 35,35,35 or so. In other words, this is the "before" image. I haven't run a full render using all of the extra lights yet.
Is there an easier way to do this? And why is it that the latest state of the art GI renderer is missing this effect, which you can see, well, everywhere in the real world? TIA:)
|
|
As long as specular is a fake for special kind of reflections you
can't expect realistic results from only skylight.
Specular needs a light vector to be calculated, skylight and GI light doesn't creates those cause they have no single direction..
two solutions:
- like you already do light it with spec only lights
- a bigger hit on rendertimes: use low level hdri enviroment and tweaked raytrace reflections instaed of spec
:beer:
Mauritius
05-21-2003, 12:46 PM
Actually, not the latest state of the art renderers miss st. usually, but only their users do. This also applies here, I think. :)
Maybe you should have spent these frustrating hours thinking about what a specular reflection actually is -- that is: by comparing 'the real world' with CGI.;)
Specular highlights are a fake.
Lightsources in CGI are usually points (in the math sense of the word). Infinitesimal points can't create any highlight -- they have no "size" --; hence it is faked by simulating the reflection of a finite size lightsource in the BRDF.
If you ask yourself again now: what is a specular highlight, the answer should be obvious: a mirror reflection of the lightsource.
So the solution to your problem is to crank up the reflectivity of your shader resp. use your skylight texture as an environment map also on those materials that have some specularity.
The roughness of the specular highlight btw. becomes the blur of the reflection.
I cannot talk for Brazil, but usually this should do it.
Cheers,
.mm
ZeBoxx
05-21-2003, 03:21 PM
me too! http://www.pointzero.nl/smileys/thehand.gif
Vossiewulf
05-21-2003, 03:39 PM
Well Rex, you hit right on why I'm confused. HDRI lighting is essentially nothing more than an environment-mapped sky dome that casts light based upon luminance data from any given section of the map.
Sky light, it seems to me, is exactly the same thing only simpler, because it is a single color. Why can't they simply cast rays orthoganal to the normals of the inward-facing sky dome? That gives the vectors required for correct specular reflections.
I've resisted HDRI as it seems to be an incredibly arduous process, but I imagine, if things remain as is, that's the way I have to go. But I admit to scratching my head as to why a single-color "light from all directions" source doesn't work correctly while the HDRI complex luminance map "light from all directions" does.
Mauritius, I know you were trying to be helpful, and I appreciate that. But that was 1) an enormously condescending reply and 2) wrong.
One, you assumed I don't know what a specular reflection is. If you want to talk about "reflected" photons vs. photons that are absorbed by molecules, exciting electrons that jump to higher orbitals, which then release that energy in the form of a new photon, in the process returning to its original state and thereby creating a "diffuse" reflection, we can.
Besides, you didn't read very closely. I'm NOT using point lights. I am using AREA lights that should create correct reflections based upon their area, luminance, color, and spread angle. And the sky light is the ultimate AREA light. It should cast shadows (which it more or less does correctly) as well as affect surfaces in both their diffuse and specular reflection types.
As to your suggestions: have you tried environment mapping Brazil's sky light? I have. If it worked I wouldn't be asking these questions.
In that image I posted I used Brazil advanced materials with their own environment maps and reflectance notched up. There's only one problem with that method; it generates totally wrong results. Environment maps on a single object don't know anything about the world around them. They just reflect this map thing as if they were floating in space, alone.
See attached "wrong" image below, using the object-based environment mapping technique. And then the follow-on post which shows what one gets surrounding the subject with area lights that cast light which objects reflect correctly.
Vossiewulf
05-21-2003, 03:40 PM
"Right" image.
Khepri
05-21-2003, 05:37 PM
hi there, ok,
actually, an arealight isnt the same a a skylight, totally different techniques, but asside from that:
there are no speculair highlight from lights!
do you see speculair highlights appear from a blue sky? no? why not? oh because its not direct lighting! the sky merely reflects/absorbs light that is "emitted" by the sun.
if you have read your manual and asked this question to the support crew of splutterfish which I am sure you havent, you might not have put up such a loud voice as to saying its wrong. because the only one here that is wrong is: ttatatatataaaaa: you.
on this website you can enlighten your "mind"
http://www.neilblevins.com/cg_education/metal_and_refs/metal_and_refs.htm
and seriously now: do more than 1 arealights appear outside asside from the sun?
I think not.
the "speculair highlight" you see outside is a mere reflection of the sun.
nothing more and nothing less.
cheers and learn
Vossiewulf
05-21-2003, 07:18 PM
Khepri, I'd love to know what you're smoking, and/or what world you live in.
"the "speculair highlight" you see outside is a mere reflection of the sun.
nothing more and nothing less.
cheers and learn"
LOL. Okay, try this on for size...I just took my digi camera outside on this gray, sunless day, and shot this:
Vossiewulf
05-21-2003, 07:24 PM
Now I just tilted my camera down off my deck and shot this car in the parking lot. Good lord! Where did that reflection come from? That's not the sun, it's....SKY LIGHT!
And I quote Khepri again:
"do you see speculair highlights appear from a blue sky? no? why not? oh because its not direct lighting! the sky merely reflects/absorbs light that is "emitted" by the sun."
First, try learning to spell the word specular. That's twice, but then again it seems you are talking about something from some other planet.
According to you, that reflection of the sky that "merely reflects/absorbs" sunlight shouldn't be there. I'll go outside right now and tell the car it's violating Khepri's laws of physics. That'll fix it right up, I'm sure.
Vossiewulf
05-21-2003, 07:32 PM
Now for some topic-specific demonstrations. This is an Albatros D.III, construction methodology is the same as my subject aircraft. Doped 4-color lozenge fabric on the wings.
Note the shadow shows the sun is coming from RIGHT FOREGROUND.
Now take a look at the lower left wingtip. ANOTHER specular reflection from that magical light-absorbing sky! Or maybe the sun rays are really just being refracted through about 310 degrees to the camera. Wonder what the IOR on THAT material would be.
Vossiewulf
05-21-2003, 07:45 PM
ANY source of light can create a specular reflection. A specular reflection can look like anything from a mirror, to a big white spot highlight; the factors controlling what that highlight look like are the amount of light directly reflected by any given surface, with "specularity" increasing as the angle becomes more acute. If the light source is the sun, or a light, you'll definitely get a nice white blown spot. If the light source is the DIFFUSE REFLECTION of light coming from trees, it'll should look green and depending on the reflectivity of the material, you'll see varying levels of detail of the trees themselves.
I can't believe how obtuse you were there, Khepri. You say that the sky isn't a source of light at all, even though every GI system has a "sky light" function. They seem to think that the sky is a source of light.
But you're right; photons in the visible spectrum coming from the sky (we SEE the sky you know, that means light is coming from there) behave completely differently from photons in the visible spectrum coming from the sun. Those coming from the sun can be reflected off a surface, while those crazy sky light photons can't. I'll call the physics department at my local university and let them know right away.
Cheers and learn.
Mauritius
05-21-2003, 08:08 PM
Maybe you should read more closely. I never said you used/should use a pointlight. I said the specular BRDFs used in today's renderers are for creating a fake reflection of an infintesimal [point]light.
I also stated that I can't tell what the exact solution for Brazil is; I only use RMan renderers and MRay at times, but if you use a HDRI texture for casting the light and use that same texture as an environment map (which doesn't mean, objects in the scene itself are excluded from the reflection in the least way, to comment the 'wrong' image you posted first), then you get the correct behaviour.
All your renderer has to do is shoot a bunch of rays (how many depends on your specular roughness aka reflection blur and the amount of noise you are willing to trade against image quality) into the scene. If the rays hit no geometry, they should return the resp color from the environment map.
This way occluding geometry is considered correctly. You also should get a specular highlight from the sun and/or the sky in your HDRI texture.
If you don't have a HDRI texture, you have a problem, as the dynamic range is simply not big enough to get reflections bright enough to be recognized as specular ones by humans, unless you turn reflectivity up so high in the resp shader that it will look like chrome.
There is a trick that ILM uses to turn LDR images into fake HDR ones described in the SIGGRAPH RMan coursenotes from 2002.
This trick is simply to expand the dynamic range for all values above 0.5 luminance by raisning them to a power (the example shader uses 2).
This works well under many circumstances but honestly: what we do where I work is to run a diffuse convolution filter on the HDR texture in HDRShop to get a texture without highlights; then we derive a lightsource position from the specular convoluted map and create a directional light matching it. This way we can use a HDR light map/environmant map taken on set and still have independent control over our specular highlights using the old school 'fake' approach (and of course by rendering them into a separate layer for comp, which would be much more involved otherwise -- one had to use a threshold imaging shader to 'guess' what parts of the image where highlights / do the diffuse convolution as a post process).
At least where I work, everything is about controlling the look of the image -- the more knobs to tweak, the better.
In CGI there is a difference between how specularity and reflection are modeled -- st. that happens to be the same phenomenon in reality which you decribed so eloquently.
I'm sure there is a way to tell Brazil to consider occluding geometry before doing a lookup into an evironment map w/o using a dome of lights, as in your second, 'right', image.
If there's not I suggest to switch to another renderer.
And sounding a bit condescending was not intentional. I'm not a native speaker and I tried to make clear where I was saying something a bit sarcastic by using smilies. Sorry if I offended you.
Cheers,
.mm
ZeBoxx
05-21-2003, 08:39 PM
Dear Vossiewulf,
Please learn to walk before you run.
You speak of physics and photon phenomena when you appear not to understand the most elementary level of what speculars are.
Fex, Mauritius and Khepri all explained to you that :
1.
Speculars, as you know them, are nothing more than a coding trick designed to fake (non-perfect) reflections of the light sources that point lights represent. Since point lights have no true dimensions, they would not show up as real reflections.
( Brazil r/s will also perform this trick with Area Lights, with some notes. This is all detailed by yours truly in one of the Example Files. )
2.
True 'speculars' are actually (glossy) reflections of bright surfaces. Lights in the real world generally have bright surfaces (due to fixtures or reflectors), the sun is a bright surface, and so is the sky.
Yet you choose to practically ignore their information and keep yourself locked in the mindset you are in.
If that was the worst part I would've just passed this off as you being ignorant.
However, you then continue and start to support your train of thought with blatently wrong examples.
First: You apply a local environment map to a material, and say that the results are wrong as the environment isn't obstructed by surrounding geometry.
Imagine that - that's Environment Mapping 101. If Environment Mapping was accurate, we wouldn't need raytracing.
Given, there has been a proposed method* for local environment map obstruction which would at least get you partially to what you'd want there. But in the end only full raytracing will yield the results that you desire.
( * http://zj.deathfall.com/reflocc.htm )
Second: You wouldn't look in the mirror and think to yourself "wow! what nice Vossiewulf-light!" would you ?
So I have no clue where you are getting the strange notion that the reflection of the sky in the roof of the car outside your window is actually 'skylight'. It may be light from the sky that is being reflected, but the reflection is not 100% diffuse. Without any reflectivity on your material your material -is- 100% diffuse, and you would not see the sky reflected. You would merely get a blue-ish wash of light - exactly what Skylight in Brazil r/s gets you.
Third: You seem to believe that a single color from all around can make for a 'specular' in the traditional sense.
Imagine a perfectly reflecting sphere inside a room that is painted entirely red. What the sphere would reflect is.. well.. red. Red and nothing but red. Effectively, the entire sphere is red. You can't even -see- the sphere anymore since it reflects the same red as the room around it.
So where is your 'specular' now ? You can't point it out as being a single point or area on the sphere anymore. The reason is simple: the specular is everywhere on the sphere.
Now you use a HDR map, or even an ldr map. For all I care, you place a bright white cube at the top of the room. Now the sphere reflects not just red, but also the white cube. You may then point that out as being the 'specular' simply because it is the brightest part of the reflection. Same with with a HDR map of e.g. the beach probe. You see a 'specular' of the sun because that is what reflects strongest.
A single color, however, will reflect evenly, so there is no discernable 'specular' to create.
Fourth: You seem to claim that
1. Skylight shadows are only 'more or less' correct. I'll tell you that they are correct, period.
2. Environment-mapped Skylight doesn't work. I'll point you to the tutorials available. It works just fine.
Fifth: Since I started this post, both you and Mauritius have replied. You even state something yourself.
If the light source is the DIFFUSE REFLECTION of light coming from trees, it'll should look green and depending on the reflectivity of the material, you'll see varying levels of detail of the trees themselves.
So if you do understand that it is a property of the reflectivity (glossiness) of the surface, then why do you insist that this should work without making the surface reflective ?
I think that is how your side of this entire thread can be summarized.
To Mauritius :
Perhaps Brazil r/s will add a simple occlusion pass for local environment maps in the future. But should that be the case, I doubt Mr. Vossiewulf has the Account to download it or he would've come to us, and we could've spared him the public display.
Back to Vossiewulf : Good luck now that you, hopefully, understand how off-track you really are.
Vossiewulf
05-21-2003, 09:15 PM
Mauritius thanks, and I apologize for taking offense. You caught me at a bad moment. Khepri, on the other hand, plain pissed me off;)
Your HDR methodologies sound wonderful, but are unfortunately well beyond the limited time and resources I can put into these projects. I wish it were otherwise.
Vossiewulf
05-21-2003, 10:23 PM
Ok Zeboxx, we'll take them one at a time.
1. Where did I disagree that point sources required "coding tricks" to generate reflections?
2. Again, I don't know what you're reading, but it's not what I said. My point is that ANY light source, be it direct or indirect, should be able to create glossy reflections. Of COURSE the received light must be sufficiently bright for the human eye to detect; and the receiving surface must have some degree of reflectance. Since there's no such thing as a perfectly diffuse surface, everything is capable of creating a reflection of some type with any incoming light. Again, angle and even the wavelength of the received light will affect how much of that light is reflected and how; almost all could be a diffuse reflection (the mechanism of which I mentioned) or it could be your perfectly mirrored ball. The point stands. Incoming light from any source can and should be reflected to some degree depending on the properties of the receiving material. If the source is sufficiently bright and the angle is correct, the diffuse color of the receiving material will be overtaken by the color and brightness of the light source.
3. Where did I say I didn't know that environment mapping wouldn't work perfectly, or that I didn't understand your (and I'm sure you're the only valid source) Environment Mapping 101? I tried it as your sky light didn't work as it SHOULD. After rendering, it was clear that environment mapping wasn't going to cut it, but it was worth a shot. I used it as an example when compared to my second method, which did achieve far more accurate results.
As for looking at myself in the mirror and saying what a nice light I am, who here is confused? If I see myself in the mirror, I am a light source. Light is coming from somewhere and being both diffusely and specularly reflected from me, hitting the mirror, and returning to my eye. If I were not a light source, well, I wouldn't see myself now would I? Would that make me a light source capable of creating a white bloom "specular" reflection? Of course not. That's blatantly obvious to me, perhaps not to you.
"So I have no clue where you are getting the strange notion that the reflection of the sky in the roof of the car outside your window is actually 'skylight'. It may be light from the sky that is being reflected"
Ok, YOU read that sentence a few times and see who has strange notions. It's light from the sky and it's being reflected but it's not reflected sky light. Maybe instead of Environment Mapping 101, you should have gone for Logic 101. Besides, again, WHERE did I say that reflectance/specularity/glossiness was NOT required to generate a reflection? Nowhere.
"Third: You seem to believe that a single color from all around can make for a 'specular' in the traditional sense."
Once again, WHERE did I say that? The only place I mentioned a single color was that I did not, and still do not, understand why luminance data coming from all directions with an HDR map can not only correctly light a scene diffusely, but also generate reflections, whereas your skylight, which is a single color and therefore, crazy that I am, seemingly somewhat simpler than that HDR map, CAN'T manage to make reflections of ANY kind.
"Fourth: You seem to claim that
1. Skylight shadows are only 'more or less' correct. I'll tell you that they are correct, period."
I did not say ONLY. I said they seem to be more or less correct. Which means, to anyone who can follow basic syntax, that I have seen no problems with skylight shadows, but since I have not spent 1000 hours with Brazil, neither could I say they were perfect. I'm glad they're perfect. Good for you.
If necessary, I will post yet MORE renderings which show my original and standing point that you have chosen not to hear (being inconvenient to do so):
1. No matter whether you're using a Brazil basic material or advanced material;
2. No matter what your settings for specularity or glossiness;
3. No matter what your setting for REFLECTANCE are;
Your sky light will NOT create reflections of ANY kind, and that is very much inaccurate, as even the briefest glance around the real world verifies. Sky dome light is an important, often primary source of light in any outdoor scene, and your implementation makes it almost useless. To get the correct reflectance, one has to use a dome of instanced lights set to only affect the specular channel, or an HDR environment map.
Now if I am WRONG about that, please show me HOW to get reflections from your sky light, and I will be more than happy to say that I was wrong.
And I have to say your answer in general is astounding. I've been in software development and games development for many years, including a couple year stint (as a newbie) in product support, and you just managed, in one SUBMIT, to violate every single principle of product support that I was taught.
You:
1. Took personal offense that someone could find any fault whatsoever with your product, and even tried to generate arguments (accuracy of sky light shadows) that didn't exist.
2. You put words in the mouth of the customer.
3. You made ad hominim attacks against a customer. In every company I've worked for, that would get a support person fired instantly. In fact I've fired product support personnel instantly for exactly that reason. I've responded in kind, which I shouldn't have, but your response was so far beyond the pale that I could not let it pass.
drewbie
05-21-2003, 11:35 PM
You are completely confusing two separate things in this case, I believe. (I say 'believe' so I may hold the right to be incorrect.)
The skylight itself is simply a way of generating scene lighting. It could be compared to the point lights in max. The only difference is that the point lights have the faked 'specular' highlight. If you remove that fake, there is no reflection whatsoever of the light. There is no fake for skylight because it is not a point light. The current fake speculars only work for that case. If you want a real specular REFLECTION, make your materials reflective.
The reflection of the sky on that car is a REFLECTION of the ENVIRONMENT around it. All cg is not 100% physically accurate, so you are not going to have the same principles as real life all the time. It's true that in real life you are seeing light bounce off the clouds, off the car, and hitting the lens in your eye, etc. You need an environment (be it through the environment in max, through environment mapping, or through actually modelled objects in your scene) to reflect on your plane.
If your plane's texture was correctly set up, you would have some specular component, i.e. reflections, set up to reflect the environment as it is in real life.
Skylight will never work the same way as a point light, so if that's what you're expecting, you're out of luck. The fake is a case-specific thing, so you might as well just change your materials to be more physically accurate.
P.S. I didn't read everything in this because most of it is bickering back and forth. One thing I did notice, you said . . .
"You say that the sky isn't a source of light at all, even though every GI system has a "sky light" function. They seem to think that the sky is a source of light."
The sky is NOT a source of light. The sun is a source of light. The sky reflects light. It's not the source in the true sense of the word. It is the source of the reflection, yes. These rendering systems use skylight as another, dare I say 'fake'? Skylight is by no means a physically correct source of light. It 'fakes' the light bouncing off the atmosphere, clouds, whatever you have in your skylight's map.
drewbie
05-21-2003, 11:47 PM
On a side note, if you really wanted support for the product, I would have gone to the official support forums, chat, etc. There are many questionable posts made on forums like this just because anyone can post here. If you had an earnest concern about the product you purchased, why not go to the source?
Mackan
05-27-2003, 06:34 PM
hm i havent read the whole thread, but i have a small question about brazils skylight..
the thing is, ive heard from people that brazils skylight is considered to be kinda of a "beginners light".. so if i would post a model that is lit with skylight everyone would think i was a beginner :) (alltho', i am.. just dont want people to think i am ;))
i can understand that since its a very easy task just to check the "sky light" option in brazil..
but how about using sky light in a wip then?.. is that agains the "rules"?
i think ive seen quite many wips with sky light on these boards
ZeBoxx
05-27-2003, 08:55 PM
I think it depends on how you use the skylight feature.
If you simply apply a default Standard material to your object, enable skylight, and hit render, then yes.. it may be looked down upon since it's such a common setup.
If you were to combine it with some regular point lights, perhaps map the skylight for some subtle colorshifts, then I'm not sure how it would be considered 'newbie'. That's how studios are likely to use it, after all.
Note that I disagree with the first notion, regardless. If your WIP is of an object being modeled in progress, then skylighting can act as a fairly effective method to find smoothness problems/folding issues. One point light just to make sure you get a different lighting on entirely smooth areas is a good idea, though. A Sphere, for example, would just be a single color under skylight (ignoring any shadows coming from the 'floor').
Hope that helps!
Mackan
05-27-2003, 10:15 PM
yes, thanks zeboxx that helps alot :)
thats about how i thought it was too..
i kinda liked how the model looked with skylight, but i didnt want to use it if it was considered "cheating"
am going to fool around with it abit, and see if i can use it in combination with other lights as you said
thanks again :)
Tigerdog
01-26-2004, 03:17 AM
Hi all
Im using max and brazil and as you all know as soon as i only use a hdri for lighting i lose any specular effect, glossiness and specular level stop affecting the material.
I counter this by using a blurred version of the lighting hdri in the enviro slot and bumping up the reflectiveness of my material, I blur the reflected hdri alot as i am trying to make a skin material and obvioulsy dont want the skin to gvie hard reflections or to look too glossy. This all seems to give a resonable result.
There is a major flaw with this though, if there are any other objects in the scene they are also reflected but these ARE NOT blurred :( - I cant just exclude these reflections either though because these objects are part of the scene and therefor should affect the specular reflections of other objects.
Hope what im saying makes some sence :)
So im wondering if there is a way to blur all reflections that a material recieves, This also would mean i woudnt have to blur the hdri in the enviroment slot.
I did give using point lights that affect only specular a go but this has its flaws aswell.
Any IDEAS? or am i going about his all the wrong way?
Ian Jones
01-26-2004, 03:50 AM
Tigerdog: Check your brazil materials more carefully, there are options for 'glossy' reflections and refractions. I'm not sure how this works in conjunction with HDRI as I don't know anything about that subject. Look in the Brazil advanced material for example...
Tigerdog
01-26-2004, 04:28 AM
Ian Jones - Hi I only have the public test version of brazil.
Ian Jones
01-26-2004, 11:51 AM
:( Guess you gotta look for alternatives. Sorry bout'
the misunderstanding.
CGTalk Moderation
01-15-2006, 04:03 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.