problems understanding the functions

Started by al91, December 01, 2009, 11:30:24 am

Previous topic - Next topic

Henry Blewer

Nice find! Can I just buy it, or do I need an EBay account? I really do not want an EBay account.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Oshyan

Sadly I think you do need an eBay account.

- Oshyan

FrankB

Hi Oshyan,

all your point are valid. However, there's an additional species of users beyond either the ones who are great at math and the ones who are not great. They're like me, I can do just some math, and just like to experiment with the functions - for fun. For me it started really simple with adding a sine form displacement to a steep canyon wall. I remember that very clearly. That's when I understood how functions in TG2 have to be constructed and applied. I then found the sine displacements too regular and thought about how I can deform the curve more. With that, I learned another bit. The next learning was how to create and use voronoi noise, which is actually very easy. Then I learned that voronoi can be useful in some situations, when they're strechted. And so it went on and on. I once made a ploughed field through functions. Trouble is, that I already chose my POV, and the clouds in the sky were ideal, but the field rows pointed into another direction. That was the first time I tried rotating a vector. I did not recall exactly what i.e. a cross product was, so I looked it up and it gave me an aha moment. These previous learnings led to the "cracks" clip that I shared here, that I still find in many renders that people show in the image sharing area and elsewhere.

All the while I had fun, and my little learnings contributed to the scenes I was working on.
It's true that nobody has to learn functions, though, to be great at TG2, or rather to be great at making realistic renders.

Still learning it is fun and useful.

Cheers
Frank

PorcupineFloyd

You don't have to use functions to make some decent renders but on the other hand, how will you make voronoi displacement or sinusoidal wave without using functions?

Henry Blewer

 Here hear. Anyway, what I have learned is that every function I tried needs a get function. Usually a Get location of ____. You can use the Get Camera Location for random seeds and scale. (Not so much for scale, tends to get caried away with itself) Then there are the scalar functions and clamp functions.
Scalar functions seem to enlarge or decrease the scale input. Clamp functions seem to work like a constraint. This is probably all wrong. But I am making guesses again from what I observed using them.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Oshyan

Certainly there is basic information that would be helpful for anyone willing to experiment. My point though is that no matter how much someone tries to teach "how to do stuff with function nodes", success will always depend on a lot of experimentation. I've seen a lot of people who seem to be looking for simple instructions that will allow them to "unlock the secrets of function nodes", and maybe that's possible with some solid foundational information, but again it's important to remember that a lot of testing (and failure, and going down the wrong path) will need to happen. By their nature function nodes require experimentation, just as you have done Frank. As long as people are inspired to do that after getting the foundation, they have a good chance of success.

- Oshyan

Henry Blewer

I am hoping to provide enough information on function nodes to make things a lot easier. One of the problems I have using them, is they do not follow the labels I learned in math. I graduated in 1982. But my real math teacher was my Grandmother. She began teaching math in 1930. Trig was an easy subject, but I have not used math much since 1995. So I need to relearn.

What I want to do is provide explanations of the functions. Then give good solid examples of their use. Sometimes things make more sense when someone can see how a thing is done. It will be a while, but I will get there. ( I made some excellent dunes the other night. But I think it was more by accident than knowledge.)
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Hetzen

December 05, 2009, 08:36:22 pm #22 Last Edit: December 05, 2009, 08:40:43 pm by Hetzen
I'm not sure you've got Scaler or Clamp functions absolutely right there chap.

Scaler is another word for "single number". So functions with the scaler name use numbers. Colour uses shades of grey (which from true black to true white equates 0 to 1, BUT, these colours in TG can in fact go into negative black and plus white. ie a value of 1.1 or 3 or 25 or 100,00 still looks white, anything below 0 will still look black). Clamp functions in their simplest form cut off anything above white or below black, or 1 & 0 in numerical terms. There is a clamp function that allows you to set the numerical cutoff points if you want a wider range.

The 0 to 1 concept is quite usefull to get your head around, because all the trig functions like Sine, Cosine, Tangent etc always output a value between 0 and 1, regardless of their input. The 0/1 concept is also usefull for creating logic arguments.

So if you wanted to increase the 'height' (amplitude) of a Sine wave, (as it's basic maximum value is 1, which in TG terms is one metre), you would have to multiply the output of the sin node.

If you want to increase the 'spacing' (frequency) of those peaks, you would divide the input to the sin function.

I'm warbling now, but another little gem to use is the modulo node. What this does, is break up an input value into divisional sequences. So if I wanted a Get Position to give me values between 0 & 360, I would set up the input2 of a modulo node to be 360, which would result in 361=1, 721=1, 381=1 etc. This is usefull if you want to have control of the phase into a trig function, where this number has to be converted from degrees into Radians. eg, if I want something to happen at halfway through a Sine cycle, I could use a conditional scaler node to check for values >= 180. Which is one of the methods I'm trying to use in generating shore waves at the moment.

I think one of the best ways of finding out what you can do with these functions, is grasp what is happening in a simple set up, then go through the wiki and have a look at all the other function descriptions (some are better than others, wink/nudge). It's a good way of understanding possible solutions to a problem you've had or imagine.

If I get some time, I could have a crack at doing a step through with pics.

Henry Blewer

That is very helpful, Hetzen Thank you!
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

Dune

I totally agree with njeneb, very helpful indeed to have this kind of explanation. I'm terrible at maths (hated it during my biology study), but TG has rekindled my interest (thanks, staff). And I understand the power of it in TG. Some examples (or indeed explanations) of interesting combinations would help a lot of us, I guess. I am especially interested in the shore waves you describe, and perhaps have another go at it with your description. Thanks.

---Dune

Seth

damn, I only wish I could understand all this mathematical discussion in here :)
maybe i'll have to do some more testing on those function nodes... I still don't understand how they work !

Cyber-Angel

What ever gets developed for this could it please be explained in a manner that visual learners can understand and for those not skilled in abstraction, if it can that's grate? ;D   

Regards to you.

Cyber-Angel

Henry Blewer

That is my aim here. I also am in the fog with functions. So, I intend to experiment. When I think I have something that works consistently, and I can remember what I did and why; then I will write and post what I learned.
It's nice to look at a clip file or a node tree and say gee that's nice. My mind says, "Hey, what are you looking at?" "I don't know," is usually the answer I get. So I will have the node trees, but each part of it will have an explanation of what it does, why I used it, what is the whole doing, etc...
I may have some answers at the end of the month.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

bobbystahr

December 07, 2009, 06:42:00 pm #28 Last Edit: December 07, 2009, 07:16:26 pm by bobbystahr
What I'd like is a cross reference from the math terms to layman's English so I could sort out wtf I'm going to get with a given function. From not having had the benefits of any higher math teaching I have a very difficult time trying to figure this out and a dictionary doesn't always help.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Henry Blewer

If you have any clips or tgd's with functions, please post them here.

http://forums.planetside.co.uk/index.php?topic=8199.0

Or PM me. I will keep your secrets. But I do need help to get this tutorial off the ground. RIght now I am still trudging through mud up to my hips.
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T