Oren-Nayar-Blinn material model Blender version.

General discussion about the development of the open source Blender

Moderators: jesterKing, stiv

Jamesk
Posts: 239
Joined: Mon Oct 14, 2002 8:15 am
Location: Sweden

Post by Jamesk »

By the way, I just luuuuuuhhve (Barry White-mode) the Blinn shader model. If I was, you know, "leaning the other way" I would kiss you, Cessen!

Hos
Posts: 185
Joined: Wed Oct 16, 2002 12:06 am

Post by Hos »

This stuff looks pretty neat.

One thing I don't like much though: when
you switch to blinn and then back to phong
it doesn't restore your old phong settings
(in particular, spec and hard have been
modified).

Chris

hannibar
Posts: 50
Joined: Wed Oct 16, 2002 3:02 pm

Post by hannibar »

I'm sorry if this is a stupid question, but I downloaded this file
http://hotlink.reblended.com/broken/tuh ... indows.zip
I installed it, and tried to find the new material settings, but I can't find them. Where exactly can you switch between phong, blinn and toon?

Jamesk
Posts: 239
Joined: Mon Oct 14, 2002 8:15 am
Location: Sweden

Post by Jamesk »

Hannibar: Look in the ordinary material window, just to the left of the texface button...

cessen
Posts: 109
Joined: Tue Oct 15, 2002 11:43 pm

Post by cessen »

One thing I don't like much though: when you switch to blinn and then back to phong it doesn't restore your old phong settings (in particular, spec and hard have been modified).
That is because variables are re-used in the material data-structure:
(blinn)IOR=(phong)spec
(blinn)SpecRough=(phong)hard
and since the ranges are different in the different material models, they will get changed to fit those ranges when the material model is switched.

I could fix the problem by giving them completely different variables in the material data-structure, but that seems like a waste of space to me. Of course, if there is enough demand, I will change it anyway. :)

Besides, in the plugin system the parameters will be completely dynamic anyway, so it will be a moot point. The current modification is really just something to keep people occupied and happy while I work on the bigger project of mine: the material plugin system.

Hos
Posts: 185
Joined: Wed Oct 16, 2002 12:06 am

Post by Hos »

cessen wrote:and since the ranges are different in the different material models, they will get changed to fit those ranges when the material model is switched.
Why not just map the values through an (invertible) function that
maps the one range onto the other when changing shading models?
Then a quick switch between models would be less destructive.

I would say that unless the new shading paramaters control something
very similar to what the old ones do you should use new variables
(waste or not)... or create 3 whole new "sub-class-like" material structures
(one for each shading model), and a "super-class-like" material
structure with a void pointer that points to one of these 3 types.
(a bt harder, and a bit more drastic, but probably a better design
in the long run).

Chris

hannibar
Posts: 50
Joined: Wed Oct 16, 2002 3:02 pm

Post by hannibar »

Hannibar: Look in the ordinary material window, just to the left of the texface button...
Nope, nothing there. I'll try reinstalling that version. Thanks anyway.

[edit]reinstalling worked. Yay. [/edit]

Oh, and the blinn is great ! That's already a big improvement on the rendering. Thanks Cessen.

cessen
Posts: 109
Joined: Tue Oct 15, 2002 11:43 pm

Post by cessen »

Why not just map the values through an (invertible) function that
maps the one range onto the other when changing shading models?
Then a quick switch between models would be less destructive.
That's what I was originally going to do. At the moment, though, I can't figure out a good way to determine when the material model is switched. At the moment, it is setup as follows:
  • 1) user selects material model
    2) button usage causes refresh of the material buttons window
    3) whenever there is a refresh, the material parameters are clipped according to the current material.
If I replaced step 3 with a mapping function(s), it would use them whenever the material buttons are refreshed, *even* if the material type has not been changed. This would be very annoying.

I am thinking of simply putting a variable into the material data-structure that indicates the material-model before the last refresh, and then on each refresh it would only do the mappings if it is not equal to the current material-model.
(And, of course, that would also give the neccessary information to reverse the mapping of the previous material. Perhaps there would be single intermediate mapping range of zero to one.)

Anyway, thanks very much for the feedback, Hos. It is very helpful! :)

green
Posts: 81
Joined: Sun Oct 13, 2002 8:04 pm

Post by green »

You can have a function that executes every time a drop down list box (the phong, blinn, toon drop down button for example) gets used.
Ie the button has an event number that gets used where you can call a function from.

Might be worth looking into?

kflich
Posts: 30
Joined: Wed Oct 16, 2002 11:53 am
Location: israel

Post by kflich »

just downloaded the windows version and ... wow ! this is amazing !!! it took me minutes to replace my old cell shaded (using textures) scenes to new toon shading, and the results are excellent. no crash yet, release seems stable enoght. :lol:

sten
Posts: 177
Joined: Sun Oct 13, 2002 7:47 pm

Post by sten »

Hey all!!

Cessen, look at this!

http://www.deathfall.com/article.php?sid=2081

yours and mine testrender !!

very cool =)

Do you have a very late Tuhopuu for Linux ?

cessen
Posts: 109
Joined: Tue Oct 15, 2002 11:43 pm

Post by cessen »

kflich wrote:it took me minutes to replace my old cell shaded (using textures) scenes to new toon shading, and the results are excellent.
Could you post the results? I would absolutely *love* to see some scenes rendered with my material additions. :D
ztonzy wrote:Cessen, look at this!

http://www.deathfall.com/article.php?sid=2081

yours and mine testrender !!

very cool =)
Wow, publicity! :)
ztonzy wrote:Do you have a very late Tuhopuu for Linux ?
That depends on what you mean by "very late". I have a build that's about a week old (so it's pretty recent):
http://www.brunslo.com/cessen/blender_s ... mic.tar.gz

I suppose I should probably re-name the file to "tuhopuu_linux_dynamic.tar.gz" or something, but I'm too lazy to change it at the moment. ;)
green wrote:You can have a function that executes every time a drop down list box (the phong, blinn, toon drop down button for example) gets used.
Ie the button has an event number that gets used where you can call a function from.
Well, I think it might be easier to do the other way I mentioned: especially for an arbitrary number of material models (as it will be with the plugin system).

But I will keep it in mind as an alternate possibility if my idea doesn't work out. Or, perhaps, I will use it in combination with the other method.

Thanks for all of the feedback! :)

kid_tripod
Posts: 35
Joined: Sun Dec 15, 2002 10:52 pm

Post by kid_tripod »

I'm so looking forward to this finding its way into a stable release. I must say, I really think you're on the right track with the open shader thing. If the whole Blinn thing can be done so somehow the parameters translate into the standard renderers or Yafray seamlessly that would be brilliant, but one step at a time.

You're certainly giving me faith that Blender will develop in ever more useful ways now the source has opened, I was concerned no one would know what to do, but this has had me bouncing up and down with excitement!

I'm dead impressed. Keep it up.

LethalSideParting
Posts: 71
Joined: Mon Oct 21, 2002 12:53 am
Location: Bucks, England

A small bug, but great nonetheless

Post by LethalSideParting »

Wow, just downloaded the demo Tohupuu (I think that's how it's sopelt...) branch, and those new shading models are great!! Very good work Cessen.

One little bug I've found though - when using the Toon shader, even if you switch anti-aliasing on, you still get jaggies on the edge of toon shaded objects (to see what I mean, insert a light, a sphere, give the sphere a toon material, put OSA on - any value will do - and render). Is this to augment the toonish look of it, or is it jjust something that hasn't been implemented yet?

LethalSideParting

Money_YaY!
Posts: 442
Joined: Wed Oct 23, 2002 2:47 pm

Post by Money_YaY! »

Me again. I question. Has an OSX version been compiled ?
I failed at trying. Thats all.

Post Reply