Blender Extended Expressive Rendering (BEER): Extending Blender Internal

Here’s a .blend file with my node group. My contribution to this is simply a request for “Half Lambert” to be added to the diffuse section of the material properties editor. It’s a pain to go back and forth editing nodes. I’m all about keeping it simple.

http://www.pasteall.org/blend/21317


Feel completely free to modify and adapt as needed. I have no desire for any credit. People a lot smarter than me figured this out long ago…


I have no idea if it makes anymore sense with a mock-up. I just think it would make more sense than a gradient map. Though, it might be that this makes certain curvature difficult to do :x

@daveleitz Nice!!! Added blend file to wiki and linked back to your post.

@Therahedwig can provide some input.

What you have made is near what I have visioned for the X-toon portion of extended toon shading. <–just trying on the name…

I feel that adding points and then deciding which direction and interpolation type as you have is what is ultimately needed. something simple, starting with 4 corner nodes, and then interpolating color between them. I would like to actually see vector between nodes, and then you could make even more complex gradients. I will try to do a mock up myself.

There’s also diffusion curves, but that might be cruel on the programmer :wink:


Here is my “Simple” approach. It is similar to mesh gradient in a way, but very limited controls.

Diffusion curves would be crazy, :slight_smile: but not if you were using an external program to make them. My image is doable in the Blender UI.

Here is my solution for 2D maps for X-toon = layers
Easy to understand and easy to setup.



What do you say? OK/KO?

Conclusion on 2D map creation: Currently, it will take MUCH work to put this into a useable, cohesive feature for this one item. I motion to move on from it, users will need to be creative on there own for now. We can focus now on our other objectives-- and mainly for X-Toon integretion, get the mapping coded, and probably settle for texture image until it gains popularity enough to get more UI goodies :wink:

A quickie:

The proposal now divided into 3 main sections (cel toon, soft toon, X toon),
with 1 optional section (hatching) because we are not sure if it is implementable.

Vicente Carro added his description for the controls that need to be exposed in the UI (cel toon)

For soft toon, you should watch Salesman Pete >> http://wiki.blender.org/index.php/User:LightBWK#Soft_Toon
Soft toon is awesome, almost 2D.
Need more discussion on what variables we should expose on UI for this part.

X toon, added 2D map creation.
But frankly we can already paint inside blender to make raster version of the 2D map.
Still we need gradient tool to aid in painting smooth colors.


@jikz, you are right. Wasted too much time there. Let’s move on to UI and controls… maybe
mock-ups!!! The fun stuff.

Yes, watch “Salesman Pete” and then watch it in slow motion (VLC is good for this). Amazing what little details are stuffed into this short. I would venture an opinion that “SP” is a hybrid of 2D and 3D techniques. Of course, the excellent art direction is what ties it into a seamless whole.

While we’re discussing improving BI materials, can we ask for a second specular component be added to a material. I know that this is pretty common among other biased engines. 3Delight comes to mind.

Perhaps 2-D texture lookup could be implemented simply in the first go around. Two color ramps, a “foreground” and a “background;” Let the software interpolate between them maybe with a ‘distance’ setting of some sort.

Yes, you GET it! XD I have exactly the same feelings. currently, one can setup a fake version of 2 ramps in material nodes, but the issue is the interpolation. right now you simply use another greyscale ramp to control how much each is blended in based on the distance. but a proper interpolation is certainly needed, especially when grading between hard and soft edge shading. blending just doesn’t do it as well.

From previous, here is an example of my statement. can mix ramps based on grey data from sources like proposed in the WIKI doc, but the interpolation and proper mapping is wacky. In the below case, I use the shader data with one lamp, and the normal data. you can see how they all work together.


@Charblaze,

The modifier stack is a great idea, Charblaze. I also agree with your previous comment that ‘half lambert’ is not a shader per se, but a modifier. Consistency with existing Blender UI conventions is a good idea.

We (Jikz and myself) had our little discussion.



Base on feedback from other artists, we roughly concluded the control and UI to something like this.
Why?

  1. Basic shader algorithm can’t solve current problem with toon shader, so the new toons have to be coded from the ground up
  2. Not possible with nodes, the setup that other artists need already too complex with nodes, also they have to animate them, they want a comprehensive yet intuitive UI.

Though we have a working concept, everything is still open for debate.

Better than leaving blender, this will be ok for the beginning i think–Until a good UI is hopefully made for more efficient creation-- I am hoping based on curves with gradients. The biggest issue I see is going from Hard to Soft edges, blending will not interpolate the transition properly.

Another point this brings to mind, procedural textures in the viewport. They do not seem to map properly, which sort of kills my “WYSIWYG” work flow idea for toon stuff.

But for now, it will serve well for some of the basic transitions!

–I will probably sneak into Diffusion Curves for some more elaborate ones though :wink:

@Charblaze,

Ramp modifier stacking: do you have other use cases for modifier stacking? Because I only see 1 case. Might not justify to put feature for 1 use case. I know you can come up with more. :wink:

2D map as texture: Not very intuitive to setup, also what @jikz wrote, preview is poor.

@jikz,

D-curves, do we really want to? That thing will kill weak PC.

Charblaze, cool node setup. I’ll have to try it out.
LightBWK, nothin’ ever stays simple, hehe. :yes: But it’s good to break down big projects into discrete components.

Just playing around in GIMP…


Pretty self explanatory. (Except I forgot to cut and paste the ‘hardness’ into the first specular. :rolleyes:)


One idea for adding basic modifiers to existing shaders. Would need to have settings un-clamped, where applicable. Scaling is multiplying the output of the basic shader, default: 1.000. Bias is adding to the scaling result, default: 0.000. Range of possibilities? 0-1 is obvious, but what about negative and/or values up to 2.000?

Also not sure if allowing a Factor of up to 2.000 would do what I think it may. What I want, at least in the case of ‘half lambert,’ is to multiply the color output of the ramp by 2. I may be showing my ignorance, but the only stupid question is the one that isn’t asked… (edit) I guess that if this is not feasible, then there is still a bit of node work to be done with the material. At least that part wouldn’t be something necessary to adjust constantly in the Properties editor.

No, not IN blender. If a good UI that is based on it could be made, then yea. But needs to fit the “Optimum Performance” mold. Actually, if one could set the “resolution” of the solution of D-curve style gradients, maybe you could have a preview mode that is very light, and stronger computers can up the res. Just a brainstorm on that, better keep trucking on main integration features and trouble with this after I suppose. :slight_smile:

I’ve been trying to replicate the x-toon 2D lookup algorithm in nodes (tried twice and failed in both cycles and BI so far), looks like all I’m really missing is a way to get the light angle vector in BI – maybe a ‘LIght Input Node’ (think cycles has one) would be appropriate?.

Was just gonna code up a new node type but Lukas and/or Brecht went and messed with the shader nodes and I can’t seem to find where they hid the exec functions to figure out how they do their magic. :frowning: That would be the easiest option, having an x-toon input node that feeds a vector into a texture node – with perhaps a ‘Normal’ input so people can do some trickery on the normals and zmin/zmax as parameters.

Those 2D node textures that Charblaze came up with will also help out a bunch with the experimentation…