Volumetric factor for pseudo-volumetric material (Charcoal for Cycles)

@RickyBlender: Yes, View Distance is the “real” distance to the camera. If you create an edge in between the camera and a point at the surface of your mesh, its length displayed by Blender will be the View Distance provided by the node for this specific point.

The Ray Length of the Light Path node is the distance in between the point in question and the last point where the light bounced. It can be the camera or another surface of the same object or of an other object. (In my Blender 2.68r58816, there also “Ray Depth” but I don’t know what it is… yet.)

The Geometry node provides vectors in World coordinates. It gives you information about the surface of your object. It doesn’t acknowledges the camera, except for Incoming. In theory, if you calculate the distance in between Position and the camera, you should get the View Distance.

Now, the color ramp. Mathematics have nothing to do with the choice of the colors which is entirely yours. In your blend file, the colors were going from yellow to red. I set that… and I added another control point in the middle because the orange of the word in the middle was a bit off. No logic in here, just a choice.

As for AA instead of A^2, the programmers who know how computers work will use AA because it’s faster in every way. No need to retrieve a float in memory (The CPU has a lot of work to do for that.) and no need to use complex math formulas to deal with exponents. Just a simple multiplication that the CPU can do directly by itself. Whatever the language you use, everything is reduced to a rather limited set of basic CPU instructions. So… A*A. :wink:

for the X^2 thing
the X^2 curve has a certain specific curve variation DY/DX or gradient
with power curve you can adjust this DY/DX to give more control over how it varies and how fast it varies!
but i can see that X^2 is faster to do but offers less control on the gradient

color ramp
i tought it was based on the gradient of the image UV or not
but cannot find where i saw this
and between 2 peaks it subdivide it functions of colors added

scripting
any good knowledge here or not ?
looking for some good doc on nodes group for scripting for cycles

thanks

@RickyBlender: I only kept the distance squared to have the same result than the original material. I also agree that it’s not a very flexible solution. Using an RGB curve on the factor driving the color ramp is the way I’d choose.

And no, I’m too much of a maniac to allow anybody or anything build my node trees… :smiley: Besides, I think that building node trees by a script has a very limited use. Eventually, you can produce little variations of a node tree but the greater the variation, the more useless a script becomes. You end up spending more time on scripting than what building the tree by hand would last.

The only thing I’d like to script for the file manager is a new display mode for the node groups (or anything you can append/link). It’s a real PITA to retrieve one node group lost in a jungle of files. I would like a flat list of all the node groups available in all the files of the current folder. When I import, I’m first interested by what I want import. Which file it comes from is secondary.

That’s my holy scripted grail. :wink: But with my todo list long enough to go three times around the Earth, don’t hold your breath. I’m not expecting any progress until X-Mas 2015. :smiley:

All this to say, no, scripting Blender isn’t a big thing in my toolbox. All I know for sure is that, when I’ll be ready, I’ll go to blender.org and follow the breadcrumbs across the wiki. That’s where all the knowledge comes from.

http://lists.blender.org/pipermail/soc-2013-dev/2013-July/000091.html

i would not suggest to go to wiki for any intermediary or advance knowledges on scripting!

but good basic intro !

better ask questions in python forum and hope someone help !

i’m trying right now and having problem to find info on gorup node for cycles!

thanks