Proposing A Node Usage Guide

Started by PabloMack, September 25, 2018, 05:23:25 PM

Previous topic - Next topic

PabloMack

Certainly, becoming proficient with Terragen requires a working knowledge of the node system. The trouble I've been having with the learning curve is that I don't have a very thorough understanding of what kinds of outputs can be fed into what kinds of inputs by what shaders and other nodes. I have tried to hook up inputs to outputs and have them rejected or to have no apparent effect.

I have this idea that we could come up with some diagrams with legend that shows what the data streams are composed of using a combination of color-coding and line patterns. This would be a nice aid to have akin to the famous maps made for "The Tube" or the London Underground. It doesn't have to be a job for TG folks but it could be a collaborative venture. If the node system follows a consistent set of rules then it should be possible to create such an aid to document what is allowed and what is not and why and what parts of the streams are used for what. I use Open Office quite a bit and I think that such a reference could be made with their "Impress" application (similar to Microsoft's PowerPoint). The suite is free and open-sourced. When the thing is finished, it could be turned into a PDF.

Just to make the intent clear, this guide would document the inputs and outputs to each kind of node.

What do ya'll think?

Oshyan

I appreciate the idea and willingness to contribute! In general nodes of particular types should accept and output the same types of data. In many cases this is multiple types of data, and what is read depends on the accepted input formats of the shader you're plugging into. Transparent data conversion happens in some cases as well, I believe. This should all be explained in the Wiki (it isn't adequately covered yet though). We're currently investing both time and money in updating the wiki docs and creating other educational content, so we'll add this to the list as I agree it's important.

- Oshyan

PabloMack

#2
Yeah. The idea is sort of a Quick Reference Guide that would condense much of the text into an easy to understand chart. I need to re-read much of the wiki that has already been written. A lot of the text seems to be pretty lean on hard information. I think much of the information in the Wiki is implied and it would be good to nail some of these things down.

The "Scalar to colour conversion node" has one input and one output. It seems to me that it should have four inputs (R,G,B,A) and one output, the one output being a combined RGBA stream which electrical engineers would call a "Buss" on a schematic. Conversely, a "Colour to scalar conversion node" (can't find it in the right-click menu options) should have one input and four outputs. I guess if the nodes that I am talking about were provided they might be called a Splitter and a Combiner. Seems that the existing conversion nodes only change the "Types" of the channels and don't allow you to split them out to use each channel explicitly. Sometimes I think trying to keep things simple by handling a lot of implied information can actually make it more complicated.

Matt

Just commenting on the colour/scalar conversion nodes. There are nodes that do roughly those things (except for the alpha part):

Combine scalar components into RGB colour:

https://planetside.co.uk/wiki/index.php?title=Build_Colour

Split RGB colour into scalar components:

https://planetside.co.uk/wiki/index.php?title=Red_to_Scalar
https://planetside.co.uk/wiki/index.php?title=Green_to_Scalar
https://planetside.co.uk/wiki/index.php?title=Blue_to_Scalar

At the moment the node system doesn't support multiple output channels so we have to use 3 nodes.

These are all in the "Convert" category:

https://planetside.co.uk/wiki/index.php?title=Category:Convert

Just because milk is white doesn't mean that clouds are made of milk.

WAS

Quote from: Matt on September 26, 2018, 10:31:21 PM
At the moment the node system doesn't support multiple output channels so we have to use 3 nodes.

I was just thinking about this yesterday. Whenever I add a Red to Scalar or what not, I always try and duplicate it for "Blue" and "Green", or add the wrong one I am thinking of. It'd be cool if it was just the RGB to Scalar shader and had a simple Red, Green and Blue channel.

Dune

That would be a handy one indeed, saves a few extra clicks. But as will all extra stuff, it's not really important, one can work with what's there. To save on importing node clicking, I've thought to make me a new default scene where I gather all nodes I frequently use on a sidegroup. But never came to it. Then again, there's the node popup, from which you can easily drag favorites, but which I actually also forget to use.

WAS

#6
Quote from: Dune on September 27, 2018, 01:42:57 AM
That would be a handy one indeed, saves a few extra clicks. But as will all extra stuff, it's not really important, one can work with what's there. To save on importing node clicking, I've thought to make me a new default scene where I gather all nodes I frequently use on a sidegroup. But never came to it. Then again, there's the node popup, from which you can easily drag favorites, but which I actually also forget to use.

If you mean the RGB shader, I am not sure it really constitutes extra, but proper use. Every program I've ever used it's RGB, with a drop-down of the channels, or radios, check-boxes, etc, they're always together as the represent data that's together, from images to 3D. Just more relation categorization. I think the way it's set up now is just a relic of development. Most the function nodes are behind the scenes work with input/output only besides input value where required.

N-drju

The most serious problem is that average, non-profesional user does not have ANY knowledge about mathematical procedures employed by the program. Which is essential if you want to build something that is based on mathematical procedures.

For one thing, whenever I see "boolean add scalar", "colour to scalar", "convert X to cotangens" et al. I instantly consider these nodes utterly useless. I just don't know what they do. Contrary to an item like, let's say, SSS which gives you visible output with just a few clicks.

I second your opinion PabloMack that many items get rejected because, upon usage, they don't make any change in the preview window. People really don't like wasting time. Also, you can't achieve an effect that requires, say, 25 blue nodes just by randomly connecting, disconnecting and rearranging them, so there is really no way to learn through experimentation...

I, respectfully, do not agree with you Ulco. Please bear with me while I explain.

You are saying that "one can work with what's already there". Well, yes. But they will never be able to do such wonders as professionals like you do. Some things simply cannot be done without the blue nodes. Unfortunately, without this knowledge many people are stuck in the "hobbyist" league in terms of realism and an image quality.

Now, to sum up...

I think there is a huge, gaping void between "what I would like to build?" and "what tools do I need for it?". In other words, many users simply cannot translate their imagination into a 60-item node network or so. There simply is not enough explanation of where we could start off and what steps should we take. Guys keep bragging about "dissecting" shared files but nobody understands them anyway... ::)
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Dune

I understand you not agreeing with me, but if I can do what I do, so can others, in principle. I learned by experiment, reading, and thinking, and using and adjusting stuff that has been posted over the years. Granted, I spend a lot of time in TG.
But most importantly, I don't use that many blue nodes. A lot can be done without them, and for most users red nodes are the main nodes to use. The ones you mention are beyond me too. I just use some of the simpler ones and couldn't think up something like Jon (Hetzen) does with his square noises, e.g.

N-drju

#9
In principle? This is what I think too - if they can do it, I could learn that. Unfortunately this is principle only, and nothing more. I am a complete anti-talent mathematics-wise, and can't wrap my head around blue node science, even when staying focused on this field.

Funny you mention Hetzen's work, because this is something I would like to try next - rock walls with blocky square and rectangle displacements. If I can't even grasp an idea of lateral displacement  :P :P I guess there is no way for me to do this with blue nodes either...

Adjustments of existing setups can indeed help. But even if I can pinpoint which node does what (usually it's constant scalar that does most) I could have never build any blue network myself.
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Oshyan

As has been said before, Blue Nodes are almost entirely standard mathematical operators or things that are familiar to anyone who understands how math turns into graphics, which is a subject largely separate from how Terragen works (though there are some Terragen-specific details which we *should* cover properly, that part I agree with). The basic point is that we literally cannot teach people how to use Function (Blue) Nodes without potentially giving them a thorough grounding in intermediate-to-advanced math and computer graphics shading principles, which seems like a pretty big ask for us to do alongside documenting the things that *are* actually unique and specific to Terragen (e.g. Terragen shaders/nodes like Power Fractal, Fractal Warp, Strata and Outcrops, etc, etc.). In fact there are whole books on this stuff.

So if you are serious about wanting to understand and take advantage of Function Nodes in Terragen (and much more, the info is applicable to a wide range of graphics programs), I would recommend one or all of these books:
https://smile.amazon.com/Math-Primer-Graphics-Game-Development/dp/1568817231/
https://smile.amazon.com/Mathematics-Programming-Computer-Graphics-Edition/dp/1435458869/
https://smile.amazon.com/Graphics-Shaders-Theory-Practice-Second/dp/1568814348/

This is the advice I almost always give when this subject comes up and it remains the same, yet very few people seem to ever go for it. I think they hope there is a shortcut or easy answer, a way that we could somehow just tell them the minimum they need to know in order to build exactly what they want. But that's just not the case. Effective use of Function Nodes - anything beyond simply dissecting an existing node network - fundamentally relies on a reasonable understanding of non-trivial (for many of us) math, and how that works in a computer graphics shading system. So you either learn that through a lot of trial and error, as Ulco has (look up his early posts on the forums, he was no math expert to start with, and as far as I know hasn't read the books I recommended either), or you read the books and get a more thorough grounding in how all this stuff works. If you do that I guarantee you'll be a Function Node Wizard by the end. :D

I think in the end as Ulco said, part of the problem is the belief - and at times observation - that important and useful things that people want to do actually require Function Nodes to do. Often times there are other ways that don't involve them. Where that is not the case *and* it is something that would be commonly used, that would ideally be a feature we could implement, since it would benefit a lot of less advanced users and we want Terragen to be easier to use. So I think the best approach to these issues would be to ask how to do something *without Function Nodes*, and if there isn't a solution, then to suggest a feature be added. We'll consider it but will have to weigh its value to the overall user base. Obviously getting more people to chime in supporting the idea is helpful.

- Oshyan

N-drju

And thank you Oshyan for this post. I was about to ask you what do you recommend for someone who is serious about learning more about function nodes, so it's surely nice of you to provide these three titles.

I remember that when I started using TG I had no idea what a mask is or why would I ever need a painted shader. I know so much more now. Thanks to my own persistence and some of the talented people that grace this forum.

I think that most of the people do not actually demand you to translate maths into graphics for them. Most of them (me for example) would just like to know what the first steps should be. How do you even begin a blue node network. I just know that it usually starts with "Get position". But that's it... I am totally confused about what is it that I should add afterwards.

I agree that a lot can be done without blue nodes and this is also a reason why I don't miss them that much. There is a lingering discontent that I can't operate them, but nothing I can't take. Granted, up to this point I have made lots of features that look just as if they were mathematically "programmed". Which makes me feel proud of my dabblings if I may say so myself.

An idea for the future would be to create additional red node shaders to make some effects and shapes easily accessible to users. "Strata and Outcrops" shader is one of the examples of a very interesting and beautiful terrain type made easy. A terrain that would have otherwise been too much for some to achieve. I am sure the same can be done for block walls, overhang cliffs, rock arches etc. But it certainly requires time and proper research into what is it that hobbyist users would like to obtain.
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"

Oshyan

Agreed. :)

As far as how to start a Function Node setup, yes it may often begin with a "get" node, but really it depends quite a lot on what you want to create...

- Oshyan

sboerner

This is a great discussion. Following closely.

Blue nodes rock. This is from someone with no formal math training beyond high school and who wouldn't recognize a dot product if it bit me. But every node-based system that I've used has a library of basic math functions. In Terragen I use them extensively for combining and manipulating masks and for basic surface displacements. Many others here use them in more sophisticated ways. But the point is, don't be intimidated by them. Create an empty scene then start building basic function networks and experimenting. Gradually your understanding and abilities will grow.

Perhaps a library topic dedicated to blue node networks – such as the topics dedicated to materials and clouds – would help me and others learn more quickly. I'd be happy to contribute one or two simple examples that I've cobbled together.

I'll definitely look up those reference books, Oshyan. Thank you for the links.

And per the original topic: +1 for a node usage guide.

WAS

Quote from: sboerner on October 04, 2018, 02:33:25 PM
This is a great discussion. Following closely.

Blue nodes rock. This is from someone with no formal math training beyond high school and who wouldn't recognize a dot product if it bit me. But every node-based system that I've used has a library of basic math functions. In Terragen I use them extensively for combining and manipulating masks and for basic surface displacements. Many others here use them in more sophisticated ways. But the point is, don't be intimidated by them. Create an empty scene then start building basic function networks and experimenting. Gradually your understanding and abilities will grow.

Perhaps a library topic dedicated to blue node networks – such as the topics dedicated to materials and clouds – would help me and others learn more quickly. I'd be happy to contribute one or two simple examples that I've cobbled together.

I'll definitely look up those reference books, Oshyan. Thank you for the links.

And per the original topic: +1 for a node usage guide.

There is a whole lot you can do with blue nodes for sure. I use them a lot too. This lateral displacement example here is all blue node based besides the sedimentation lines I used a PF for, but was planning on replacing with a blue node voronoi anyway.