Functions...Arrrrgh

Started by bobbystahr, July 06, 2008, 09:40:12 AM

Previous topic - Next topic

bobbystahr

Help...I am a simple math impaired hippy guitarist who has not a clue what all these elegant math terms mean in layman's english. Is there some resource that explains all these terms, yea even shows images of the results that I can access as I am most certainly missing out on a good 75% of this amazing program by not having a clue.
Yeah I know ...get educated but it's a bit hard when there is no tutorial to educate myself with. Sure search the forums is an answer but after following numerous threads in that spirit I find myself knowing even less than I started with out of frusteration at my inability to understand what the heck Scalar means in terms I can comprehend...Wiki was no help as they assume some mathematical understanding at the get go, which I'm sadly, as said, lacking.
I'm thinking that a complete manual dedicated to Functions For Dummies is almost an essential at this point. Sure ,there are those in the community who do in fact understand these terms but they make as little sense to me as if I asked you to grab a G flat diminished 5/flat 9 chord...all alpha-numerics but they're greek to you and poetry to me...please...I want to read and understand the poetry of TG2.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Mandrake

I know where you at with this higher math business, Bobby. And I just ordered WM to boot. That ought to be a trip and a half.

DeathTwister

Ya I hear ya on many levels, and yes I have been learning that Geek speak as well, but I also know what a G flat diminished 5/flat 9 chord is so I can do that as well ROTFL /on maybe 12 instruments over all /winks...But ya right these Maths things give me a headache as well rotfl

Maylock Aromy DeathTwister Stansbury
ATOMIX Productions

old_blaggard

You guys might want to check the documentation section, which has pretty good documentation of all of the functions.
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.

PG

http://forums.planetside.co.uk/index.php?board=18.0;sort=subject

Yeah they tell you what they do in theory but for those who aren't mathematically literate it's not the most helpful thing, they give no application to projects. I read these a while ago and understood the concepts but couldn't peg how I can use the value of the difference between two colours for....well, anything.
Figured out how to do clicky signatures

Mandrake

PG's right, it only makes sense, to Nikita's type group and the rest of The Star Bellied Sneetches. If you don't understand every concept, in depth. You don't understand, how to apply anything.

bobbystahr

Like PG I as well have read that most impressive list which is chock full of words and concepts I have no inkling about. I'm barely literate as to using boolean functions in my mesh modeling app to cut things apart and that has no math attached. Simply select one as the cuttee and one as the cutter, and click on slice. Now that's a whole lot different than the list of obscure [to me] options available in TG...sigh...I still say it needs a a laymans translation. It's like I know what a house fly is but if you asked me what a Musca domestica [courtesy of Google] was I'd have to google it. Having said that Google is little help with Math functions as they wind up being explained at great length in more words I'd have to look up...tried that and forgot what I had started to try and understand...LOL..Functions For Dummies is really the answer...someone please write it and I promise we'll read it.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Christopher

Any wonder i stopped using this application. Good concepts for terrains but poor execution of functionality and terminology.    :'(

dandelO

#8
I'll second this too.
I've just used some(rudimentary) functions for the first time in an image that I hope to be done with in the next day or two. Simply using an inverted(although in the function node jargon this turns out to be 'complimented' which just sounds so much more elegant, and right) voronoi function to produce a caustic light mask to use as a luminosity function of another shader.

I found the help required to apply the voronoi function to a scene in the 'Building a terrain from functions' http://forums.planetside.co.uk/index.php?topic=195 tutorial. I really need help understanding most of the others.

'Functions for dummies' would be appreciated greatly.(I also understand the contradiction in that term :D, but a little help with the general application of these functions would be nice).

old_blaggard

While this is a shameless plug for my own stuff, I spend a fair bit of time detailing the functions used in my waterfall image: http://www.ashundar.com/index.php?action=tpmod;dl=item427

Also, I do a tutorial on creating a canyon with functions that you can find here: http://www.ashundar.com/index.php?action=tpmod;dl=item212

While they don't deliberately give a general explanations of how functions work, they show how simple function networks can be extremely useful and integrated well into shaders.
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.

Mandrake

OB, did a fine job all right, of explaining functions used in his waterfall project!! To get back to Bobby's request, Maybe we just need a thread here, on, Functions for Dummies. With pointers and feedback on well written tutorials like OB's waterfall.

jo

Hi,

I always suggest that people check out Texturing & Modelling: A Procedural Approach :

http://www.amazon.com/Texturing-Modeling-Procedural-Approach-Kaufmann/dp/1558608486/

It isn't a cheap book, but it's a great way to get a start out with understanding and creating shaders, or in TG2 parlance, working with functions. If you are serious about wanting to learn to use functions, then I recommend it. Not all of the book is useful, but there a few chapters which make up for the less interesting stuff.

There is something you need to understand about using functions - they aren't intended to be used by everyone. They're there for people who already know a bit about making shaders, or people who are prepared to learn using the huge amount of knowledge available in books and on the web etc. They have always been intended for "high end" users. It is basically a graphical way of programming shaders, similar to writing RenderMan shaders but without the typing. If we don't provide some effect, chances are you can create it using functions.

From a personal perspective, I think we do need to have documentation about how you work with functions, how and where to hook them up and all that. We need to explain how our functions work as compared to what other people might be used to, I myself find some of what we're doing counterintuitive. However I don't believe it's our job to actually teach you how to create shaders. It isn't our job to teach you how to combine things to create effects ( although some basic examples to get you started would be good ), because that's a huge topic and there is lots of material out there to do that. The Texturing & Modelling book is a great way to start IMO, it's how I learnt. You can translate what you see into the book into TG2 function networks. The same goes for books about RenderMan shaders, I'd say. There are certain underlying concepts common to creating shaders which are widely applicable, even if the ways of putting them into practice vary. There are resources out there you can use to learn about this stuff.

Someone mentioned they might now know how to find the difference between two colours, but they don't know what to do with it. Using functions is a creative process, we give you the building blocks, you decide what to do with them. While you will find books which give examples of shaders/effects, you won't find books which tell you every way to use every concept. Examples of basic effects often inspire you to do something else, or take the shader in a new direction.

What could you do with the difference between two colours? You could use it to fade out some other colour, or control displacement of something. You could use it for complex control of distributions, based on the colour channels in loaded images. There are lots of things you could do. Each node is a tool which you can use to give the final result.

I wrote the function node documentation, and tried to give the key information you need to make use of the node. I have tried to give examples of how to use some of the nodes, check out the Modulo scalar documentation for example. This is a big, big job though. I essentially wrote the function node documentation when I had some spare time. To write examples of how to use all the nodes, you're essentially talking about writing a small book. I don't know what the plans are for the documentation for the final release, but it is a lot of work. Thing is, the basics of how to use this stuff is covered lots of other places.

Do you need a bit of ability at maths to work with functions? Yes you do. That's unavoidable, computer graphics at its basic level, such as you're getting to when using functions, is all about maths. However, I'm not tremendous at maths by any means, and there is a big difference between coming up with some new noise pattern and using noise patterns and the basic building blocks of the functions to create the effect you want. You don't have to be a mathematical genius to do that, you can do a lot just with basic maths skills like addition and multiplication and understanding a bit about what sort of numbers you get from things like the sin or gain nodes. There are certain things you need to know about working with colours and such. Problem solving skills are also valuable, if everything works right first time you're doing very, very well ;-).

One thing I hope to add to some of the nodes is a graphical example of what they do, for example have the gain node show a gain curve. I'm more of a visual person than a maths person, and I often create shaders by thinking of the shapes ( otherwise known as graphs ) of the functions that the nodes use. Picture a sine wave for example. When I can see a bias curve I can see how I might use values generated from it to achieve something. For example in Sorta Surf from WaterWorks ( my TG v0.9 plugin ) I use a bias function ( like the bias node ) to fade off part of the surf effect, because a certain bias value created a curve which looked like it would give a nice looking fade. To get what I wanted I had to invert the values from the bias function and then multiply the relevant part of the surf effect by that value.

BTW, a scalar is essentially just a single number, like 1 or -2.5. A vector is a group of, in TG2's case, three scalars ( for example, x, y and z coordinates ).

Finally, I think it's fair to say that while using functions really adds to what you can get out of TG2, we're giving people who know how to use them the capability to program their own stuff inside TG2, you don't have to know how to use them to get a lot out of TG2. I think Oshyan is someone who says "I never use functions" and I don't think Luc uses them much either, for example. If you really want to use them though, that's great, but if you haven't done anything like this before there is some learning to be done. There are lots of places to learn it without Planetside teaching you it. I don't say that to blow people off, but using functions/shader writing is a big field and important to the CG industry and there are lots of learning resources. We aren't doing anything especially different with TG2's function nodes, basically we're letting you do stuff graphically with the mouse in the node network that you used to have to know how to program in C to do with TG v0.9. The idea of doing it graphically is not exactly new either. That being said, this is pretty hardcore stuff and if you get good at creating shaders you're definitely in the minority and you shouldn't feel bad if you don't get it.

Regards,

Jo

bobbystahr

Very elegant piece of writing Jo, but you do admit it is kind of a closed shop if you don't know any more than say, like moi, grade 10 shop math...LOL. Still it left me feeling a bit discouraged and a lot confused till near the end you say:
"BTW, a scalar is essentially just a single number, like 1 or -2.5. A vector is a group of, in TG2's case, three scalars ( for example, x, y and z coordinates )."
I would call this an excellent entry for a Functions For Dummies book/manual/whatever. I mean most of us really need basic terms explained. I have played with networked shaders[VuePLE has a killer implementation with good graphic feedback] and like them a lot, was pleased they were in TG2TP and deflated when I couldn't get past the math and strange terms. So back to  the upside...statements like the Scalar explanation, as dumbed down as you may feel they are, may well be quantum leaps for us confused strugglers. Thanks again for putting such thought into a reply, it is appreciated.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

bobbystahr

Quote from: jo on July 06, 2008, 10:44:59 PM
Hi,

I always suggest that people check out Texturing & Modelling: A Procedural Approach :

http://www.amazon.com/Texturing-Modeling-Procedural-Approach-Kaufmann/dp/1558608486/


Jeeebus..if I could afford that I could afford TG2, heh heh heh, kin I borrow yours....LOL.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

jo

Hi Bobby,

I think I got my copy of Texturing & Modelling for free :-), from Ken Musgrave who is one of the authors. It is an expensive book though, no doubt, it used to more so. It's been a lot of use to me though.

I take your point about the "scalar" thing by the way, and the need to explain it. It's definitely a higher math sort of name for a number, and perhaps not I would have chosen. I should say I think the network view still has a lot of scope for usability improvements. I've tried to add a few bits and pieces but generally I think our nodes are pretty "dumb" compared to some other similar interfaces.

Regards,

Jo