Oren-Nayar-Blinn material model Blender version.
Moderators: jesterKing, stiv
Oren-Nayar-Blinn material model Blender version.
I have implimented an oren-nayar-blinn material model in tuhopuu, but I am not going to commit it because I have bigger plans for the material system. But I do want people to be able to mess around with it, so here it is:
http://www.brunslo.com/cessen/blender_s ... mic.tar.gz
Unluckily, I only have a Linux version compiled (my apologies to the rest of you who want to try it out).
A few notes:
1) the roughness setting applies to both the specular and diffuse roughness. Since this is not really meant to be a widely used modification, I didn't bother to add a seperate button.
2) at the moment hemilights do not light the material in a way that looks right (I'm working on it).
3) the IOR setting is analagous to the spec setting that was previously there, it's just that this has a true physical interpretation (it *is* the actual IOR, so incase you want to simulate real materials...). However, since there is no raytracing in blender, the IOR setting has nothing to do with refractions.
Comments and questions are welcome!
http://www.brunslo.com/cessen/blender_s ... mic.tar.gz
Unluckily, I only have a Linux version compiled (my apologies to the rest of you who want to try it out).
A few notes:
1) the roughness setting applies to both the specular and diffuse roughness. Since this is not really meant to be a widely used modification, I didn't bother to add a seperate button.
2) at the moment hemilights do not light the material in a way that looks right (I'm working on it).
3) the IOR setting is analagous to the spec setting that was previously there, it's just that this has a true physical interpretation (it *is* the actual IOR, so incase you want to simulate real materials...). However, since there is no raytracing in blender, the IOR setting has nothing to do with refractions.
Comments and questions are welcome!
Wow, that sounds great, Cessen! I remember you mentioned on elysiun.com that if Blender became open source, you'd add this shading method. It's great to see you're true to your word 
Would you be able to post some renders of it in action, for us poor windows/mac/etc. users that can't download the build itself?

Would you be able to post some renders of it in action, for us poor windows/mac/etc. users that can't download the build itself?
Re: Oren-Nayar-Blinn material model Blender version.
Thanks!cessen wrote:but I am not going to commit it because I have bigger plans for the material system.
I've a question: the new material system in your plans will be compatible with old material library?
And a request: it's possible modify the "emit" parameter in a
"real" phisical variable (I.E watt, or watt/s, etc...) to use the
radiosity in technic simulation?
Excuse for my poor english,
Manuel
Oh, perhaps I should have mentioned this in my original post: the Oren-Nayar-Blinn model I've implimented *replaces* the Lambert-Phong model. (This is one of the reasons I am not going to commit it, because it wouldn't render scenes of previous blend files correctly.)That's great news! I've always thought that the simple phong-only model was a bit of a shortcoming in the current renderer.
I suppose one thing I could do (for practice of implimenting new GUI elements in Blender) would be to make the material type switchable between Lambert-Phong and Oren-Nayar-Blinn. Then I could commit it, and simply replace it with my "bigger plans" when they are finished.
If someone would be willing to compile it for me, you could have it as soon as you want (I'd be happy to upload the source tarball). The problem is that I don't have a Windows compiler...It'll probably be just 6 months or so until I can get my hands on a win binary with your stuff in it, then?
I try.Wow, that sounds great, Cessen! I remember you mentioned on elysiun.com that if Blender became open source, you'd add this shading method. It's great to see you're true to your word

Certainly:Would you be able to post some renders of it in action, for us poor windows/mac/etc. users that can't download the build itself?
http://www.brunslo.com/cessen/blender_stuff/blinn1.jpg
http://www.brunslo.com/cessen/blender_stuff/blinn2.jpg
http://www.brunslo.com/cessen/blender_stuff/blinn3.jpg
http://www.brunslo.com/cessen/blender_stuff/blinn4.jpg
http://www.brunslo.com/cessen/blender_stuff/blinn5.jpg
http://www.brunslo.com/cessen/blender_stuff/blinn6.jpg
That's the plan. I intend to make the BRDF programmable (via a plugin system). Basicly, it will be a material-plugin system. And, of course, it will have a default of the standard Blender Phong model.I've a question: the new material system in your plans will be compatible with old material library?
But don't hold your breath, it's probably going to be quite some time before I have it done... heck, I'm still just getting familar with the code (the oren-nayar-blinn mod was an excercise to help me on that account). Also, there is the cross-platform issue. Someone would have to help me make the system work for OS's other than Linux.
I'm sure that could be done. However, there are some more complex issues as work. For instance, just because the values represent watts doesn't mean that your monitor will display them at all accurately, and thus the physical analogy wouldn't really be useful.And a request: it's possible modify the "emit" parameter in a
"real" phisical variable (I.E watt, or watt/s, etc...) to use the
radiosity in technic simulation?
In reality, there are two comparisons. The comparison between Lambert and Oren-Nayar, and the comparison between Phong and Blinn.A small question though. What is the difference between phong and oren-nayar-blinn (the big lines)?
Lambert is the material type you get in blender when "spec" is set to zero. Phong is what you get when "ref" is set to zero. The two are simply added together.
Now, Oren-Nayar is a more advanced version of Lambert:
It allows you to make things look much rougher than is possible with Lambert (see blinn3.jpg), via a user modifiable roughness setting. When the roughness is set to zero, it is exactly the same as Lambert (so there's really no reason not to replace Lambert with Oren-Nayar, since Oren-Nayar is capable of being identical to it).
Blinn is a physically based specular reflection model. Phong, on the other hand, has so real physical basis... it just happens to look ok to the human eye under many circumstances. Blinn takes into account many things that Phong does not.
For instance, at the microscopic level the roughness of a surface is really a bunch of bumps and valley's: those bumps and valley's can cast tiny microscopic shadows, which, all of them put together, can significantly alter the brightness of a given point on a surface. The Blinn model takes this into account via a statistical method (it doesn't individually calculate all the little microscopic shadows, of course: that would take forever).
(In case you're curious, the Oren-Nayar model takes those tiny shadows into account as well.)
It also takes into account what is called the "fresnel effect", which basicly is the phenomina (spelling?) of materials being more reflective at sharper viewing angles (think of it like a rock skipping: the light has a better chance of bouncing off--rather than being absorbed--if it hits the surface at a sharp angle).
One last thing that is nice is that the Oren-Nayar model and the Blinn model are compatable with eachother in the sense that they make the same assumptions about a surface. So, if they are both given the same roughness setting, they mesh together perfectly and represent an approximately physically accurate material.
(Neither model is perfectly physically accurate, but both are very close approximations. Lambert is physically accurate as well, as long as you assume a perfectly smooth surface.)
So, to summarize:
Oren-Nayar vs Lambert:
- 1) Can make rougher looking materials.
2) Fits with Blinn model.
- 1) Physically based; a very good physical approximation given it's assumptions about surfaces (such as being isotropic).
2) Can make much glossier-looking surfaces, and much rougher looking ones.
3) Fits with Oren-Nayar model.
I hope I didn't confuse people too much with the above explinations.

-
- Posts: 254
- Joined: Wed Jan 28, 2004 7:39 pm
Thx for explanation. I think the energy in watt can be a good starting pointcessen wrote:I'm sure that could be done. However, there are some more complex issues as work. For instance, just because the values represent watts doesn't mean that your monitor will display them at all accurately, and thus the physical analogy wouldn't really be useful.And a request: it's possible modify the "emit" parameter in a
"real" phisical variable (I.E watt, or watt/s, etc...) to use the
radiosity in technic simulation?
to simulate a realistic situation. In particular, a more technic approach
can be offer a new possibilities of professional work, I.E. lighting system
simulation. I think (excuse for my poor english) that is not really hard
for you modify a little the interface to enable some features like lightscape.

However, I don't want load you with my request...
Cessen you make already a great work!
Thanks!
Thanks!
Thanks!
Ok. I'll do that. Besides, then it can be incorperated into the official tree sooner. It might take a while, though. I'm still not very familiar with the GUI code: but this will be a great excircise to help me get used to it.Now if you could keep both models, and let the user select (per material) which one to use - that would be saaawweeeet!
As I said earlier, my plans are to impliment a plugin system. I am not going to hard-code any more material models into Blender. But the plugin system (once finished) will allow anyone to impliment an anisotropic material model.And, oh.... by the way... I guess you're just dying to start implementing something anisotropic soon then?!
Something that could be done relatively easily would be to allow the emit value to have a range much larger that 0.0-1.0. Then you could interperete the values as watts. After all, you can interperete the values however you want to. Calling them "watts" is just an issue of adding a labelThx for explanation. I think the energy in watt can be a good starting point to simulate a realistic situation.

To use this method, I must know this:cessen wrote: Something that could be done relatively easily would be to allow the emit value to have a range much larger that 0.0-1.0. Then you could interperete the values as watts. After all, you can interperete the values however you want to. Calling them "watts" is just an issue of adding a label
max emit value = watt ?
Mhh...I want sell my work. A client can ask me to simulate a
illumination using a exact model of lamp. I read all lamp documentation,
and use some paramenter in Blender. This is my idea:
http://www.elysiun.com/forum/viewtopic.php?t=9680
I know python (http://www.kino3d.com/~MakeHuman/),
but not C

Anyone can help me?