Planetside Software Forums

General => File Sharing => Shaders, Materials => Topic started by: Volker Harun on July 19, 2007, 08:09:25 AM

Title: 'One For All' - Surface Shader Setup
Post by: Volker Harun on July 19, 2007, 08:09:25 AM
Hello,
two months ago, I had all my TG2 files stored on two computers and had a 4GB storage as a backup. Within a few days, I lost all data (do not ask!  8) )
The only files I was able to recover were those, that I shared here. So I will continue this tradition - for my own sake  ;)

Attached is a scene-setup which has two additional groups 'Sandstone' and 'Sandstone Small Scale (SC)'.
I use these as colour-functions of my surface shaders - you get a wider range of saturated colours with reasonable realistic results.

The 'Sandstone' group is for large scale surfaces or camera distances of 200m+.
The Small Scale version is for getting closer down to 20m.
For anything closer some additional variations could (should) be added manually.

Enjoy,
Volker

Edit - the full rendered version of the below file can be seen here: http://www.deviantart.com/deviation/60137523/ (http://www.deviantart.com/deviation/60137523/)
Title: Re: 'One For All' - Surface Shader Setup
Post by: rcallicotte on July 19, 2007, 09:13:22 AM
Thank you.
Title: Re: 'One For All' - Surface Shader Setup
Post by: Volker Harun on July 19, 2007, 10:15:14 AM
Calico, thanks for the constructive comment ,-)

I had an idea a few minutes after uploading this file. It concerns XFrog's trees. And it seems to work very good, I'll upload a preview later (tomorrow?).
Do the following:
- Desaturate the plant's textures - brighten them up by about 50%.
- Choose in the object's Default Shader a colour of your choice (i.e. RGB 194/189/142)
- Add as colour function the Shader 'Colour Var SC III' supplied with the file above.
- Get moodflow's soft light setup
- start rendering and begin to hop in wild circles (due to excitement) ,-)

Volker
Title: Re: 'One For All' - Surface Shader Setup
Post by: AndyWelder on July 19, 2007, 10:21:36 AM
My constructive comment: Thanks a lot, vielen Dank  :D This goes for the posted idea too!
Title: Re: 'One For All' - Surface Shader Setup
Post by: Volker Harun on July 19, 2007, 11:01:18 AM
I am still hopping around and 'll provide you with a small fraction of a preview - call it a teaser  ;D ;D ;D

Andy ... pass auf, sonst komm ich vorbei und knuff Dich!  :D
Title: Re: 'One For All' - Surface Shader Setup
Post by: AndyWelder on July 19, 2007, 11:06:47 AM
Wow...
Title: Re: 'One For All' - Surface Shader Setup
Post by: old_blaggard on July 19, 2007, 01:25:42 PM
Wow!  Diese Baume sehen sehr gut aus! (Just seeing if I remember any of my German... ;)).
Title: Re: 'One For All' - Surface Shader Setup
Post by: rcallicotte on July 19, 2007, 04:26:07 PM
Volker,

I've played around with the planete.tgd file this morning and your file here all afternoon.  I'm beginning to believe I'm missing some foundational understanding that's keeping me from grasping how all of this works.  Your work here is amazing to me.
Title: Re: 'One For All' - Surface Shader Setup
Post by: Volker Harun on July 19, 2007, 04:30:44 PM
Calico,
I will go into detail soon - but now it is the time for my wife ,-)
Volker
Title: Re: 'One For All' - Surface Shader Setup
Post by: Volker Harun on July 20, 2007, 01:37:32 AM
Attached is the finished preview.
It does look promising - but I hoped that it would have been much more interesting.
I used 2 populations of different grwoth states of a tree. Colours differ only in brightness.

Volker
Title: Re: 'One For All' - Surface Shader Setup
Post by: Oshyan on July 20, 2007, 01:43:27 AM
Frankly I think the tree colors blend in with the rest of the scene much better than any objects I've seen previously in TG2 (in some cases contrast is good though). I agree it's a bit dull, but that shouldn't be too difficult to improve with some texture variation in the procedurals that are being added to the image maps, eh?

- Oshyan
Title: Re: 'One For All' - Surface Shader Setup
Post by: Volker Harun on July 20, 2007, 04:08:29 AM
Aye aye, Sir!
The lack of contrast is due to the combination of moodflow's softlights and somebody else's fill lights ,)
Title: Re: 'One For All' - Surface Shader Setup
Post by: AndyWelder on July 20, 2007, 04:30:12 AM
"somebody else's fill lights" *ggg*
Though a bit dull it still looks 'Wow'. Only thing I would have done is raise the amount of variation in the populations; now there are trees that resemble. (sich zu viel ähneln)
I know , both my English and German suck  ;)
Title: Re: 'One For All' - Surface Shader Setup
Post by: Volker Harun on July 20, 2007, 04:36:28 AM
Hi Andy,
I understood both ,-) Do not ask me if I could speak Dutch - I can't!
And I agree - it'll get better! Promised!

One point was the quality of the populations - the above render goes with medium quality, the now running one has higher quality settings and it looks - more defined.
Title: Re: 'One For All' - Surface Shader Setup
Post by: mr-miley on July 20, 2007, 05:56:30 AM
Firstly... Volker, many thanks for sharing, both are superb  :) Secondly, I must be missing something, cause I think that the trees render is superb. I don't think that it looks "a bit dull", I think its spot on for realism. Unless you live on a deset Island or somewhere really hot, natural colours aren't always that bright and vibrant. I'm in the UK (and I'm sure that this goes for most of europe and a lot of the States too) and if I look out of my office window at the landscape that is more than a few hundred metres away it all looks a bit muted and dull (dull probably isn't the correct word to use, but I cant find my theasarus (bugger, can't spell it either  :) )) I'd say the colouring and contrast of the whole scene is incredibly realistic. Hats off to you Volker... if only I wore a hat  >:(
Title: Re: 'One For All' - Surface Shader Setup
Post by: rcallicotte on July 20, 2007, 07:21:05 AM
The only basic question (with more detailed questions to likely follow) is - how did you come up with your numbers in your PFs?  Were these calculated from an understanding of some basic grasp of graphic arts or is this from an understanding of procedural graphics?  I see no pattern I can follow to learn from what you've done, but perhaps I'm looking too intricately into what you've created.


Quote from: Volker Harun on July 19, 2007, 04:30:44 PM
Calico,
I will go into detail soon - but now it is the time for my wife ,-)
Volker
Title: Re: 'One For All' - Surface Shader Setup
Post by: Volker Harun on July 20, 2007, 08:21:47 AM
Hi Calico,
I might be wrong, but this is how I approach PFs (Powerfractals):
I get an overview of the object's size I want to texture (terrain, spheres, leaves).
This size will be my lead in scale (approx.).
The smallest scale is just how fine will the texture be in detail.

The feature scale for me is something that needs further explanation:
Make a feature scale the same size as the lead in. With Colour Roughness turned to 0 you will get some shallow, clean fractal.
Make a feature scale half the size of the lead in. With Colour Roughness turned to 0 you will get twice the noise. (Lead in is the maximum size of the noise, Feature scale is the distance between two noise patterns - or think basically of 100m sized hills [lead in] every 50m [feature scale]).

The colour roughness is giving this pattern the amount of variation that is sometimes needed. I reduce the roughness for blending shaders or for displacements. I push the roughness for surface patterns.
Colour Contrast just is the 'steepness' between lowest and highest colour and thus rather a fine tuning - or essential for getting smooth blend shaders.




So first I made a large scale fractal with contrasting colours and some medium roughness. Scale is from 3 to 100m, repeated every 19m. Just like large stone-like features.

The second one has a scale from 19 to 76, repeated after 17m (I just love multiples of 19,17,13 and so on). Less colour contrast but immense roughness. The detail comes from the blending shader at the edges. Like plaques sitting on the first PF.

The third one is even smaller. Interesting is the negative colour offset in the blending shader. Due to the low contrast there is no white but heaps of black holes. Instead I could have typed in high-colour 0.75 and low-colour -0.25 - and this what the clamp colour is useful for.

The choice of the colours themselves was just try and taste ,-)

I hope this helped, feel free to ask and/or correct me.
Volker
Title: Re: 'One For All' - Surface Shader Setup
Post by: rcallicotte on July 20, 2007, 08:29:18 AM
Oh my God.  I haven't even read all of this yet and my mouth is dropping open.  So...yeah!  Thanks for explaining.

Back to the drawing board...with this new information.


:o
Title: Re: 'One For All' - Surface Shader Setup
Post by: Volker Harun on July 20, 2007, 08:59:39 AM
Quote from: mr-miley on July 20, 2007, 05:56:30 AM
Firstly... Volker, many thanks for sharing, both are superb  :) Secondly, I must be missing something, cause I think that the trees render is superb. I don't think that it looks "a bit dull", I think its spot on for realism. Unless you live on a deset Island or somewhere really hot, natural colours aren't always that bright and vibrant. I'm in the UK (and I'm sure that this goes for most of europe and a lot of the States too) and if I look out of my office window at the landscape that is more than a few hundred metres away it all looks a bit muted and dull (dull probably isn't the correct word to use, but I cant find my theasarus (bugger, can't spell it either  :) )) I'd say the colouring and contrast of the whole scene is incredibly realistic. Hats off to you Volker... if only I wore a hat  >:(

Hi, I agree to most points. The dull, tainted shadows are often a matter of haze. On summer days the high contrasting is visible - but you must watch, as the brain is used to washed out greens and has to be persuaded ,-) I was quite surprised the last weeks when I wanted to get a good visible reference of what I was remembering(!)
Title: Re: 'One For All' - Surface Shader Setup
Post by: bigben on July 20, 2007, 08:17:51 PM
Hi Volker

Iwork on a few computers and ocasionally I have version problems between them which can be almost as troublesome as losing files, so there have been times I've been glad that I've posted files here as well  ;)

Thanks for your files and also the explanation above. It was very helpful.

As for tree quality... as you've found, increasing the render quality of the tree populations does make a significant difference for trees close to the camera.  Unfortunately they also require more RAM to render. To get around this issue I use duplicate versions of a population with different render qualities, using a distance shader to separate them. If you use the same distribution shader for each population the trees will not move during an animation.

Attached a basic clip example.  I actually use 3 populations for trees, with a billboard object as the most distant population. The middle distance shader is then created by combining the near and far distance shaders.  I have some tests planned to try and figure out at what distances the various render qualities are indistinguishable yet... somewhere on my list of things to do  ;)
Title: Re: 'One For All' - Surface Shader Setup
Post by: Volker Harun on July 21, 2007, 02:51:31 AM
BigBen, this is a very good idea.
Well, heard about it years ago, when seeing a documentation about LucasArt, but forgot until your post. Thanks for the clip .
Volker
Title: Re: 'One For All' - Surface Shader Setup
Post by: AndyWelder on July 21, 2007, 06:12:54 AM
Maybe this helps in moving the 'Main Sun' around and keeping the cluster of suns intact.
A spread-sheet were you can fill in the new position of the 'Main Sun' and the new position of the other suns is automatically calculated.
You can then copy the values manually into the 'Heading' and 'Elevation' fields.
If I only knew how to get those values into the "SUNS" clip file.... A clip file is that an XML file?
Title: Re: 'One For All' - Surface Shader Setup
Post by: Volker Harun on July 21, 2007, 06:21:57 AM
That spreadsheet is a good way! - The clip is an XML that can be edited with any texteditor.
This would be a good post for the Soft-shadow-thread in the discussion-board ,-)

Volker
Title: Re: 'One For All' - Surface Shader Setup
Post by: bigben on July 21, 2007, 09:02:13 PM
TGDs and TGCs are also tab delimited, so you could easily set up something in Excel to save as text.  I'd put all of the suns into a group first so that they're easier to select and delete before inserting the new clip.
Title: Re: 'One For All' - Surface Shader Setup
Post by: Volker Harun on July 22, 2007, 06:24:07 AM
Hi Bigben,
I reduced the render quality for the populations to medium quality. Imagelink (http://forums.planetside.co.uk/index.php?topic=1880.0)
Title: Re: 'One For All' - Surface Shader Setup
Post by: Matt on July 22, 2007, 10:39:10 AM
Quote from: bigben on July 20, 2007, 08:17:51 PM
As for tree quality... as you've found, increasing the render quality of the tree populations does make a significant difference for trees close to the camera.  Unfortunately they also require more RAM to render.

I didn't realise this was the case. Theoretically the populator quality setting shouldn't have any significant impact on RAM usage, only render time.

Quote
To get around this issue I use duplicate versions of a population with different render qualities, using a distance shader to separate them. If you use the same distribution shader for each population the trees will not move during an animation.

The quality setting is primarily a means of reducing detail in the distance to increase render speed, and the reduction in detail is progressive. If you find it better to use lower quality settings for distant trees then perhaps I need to think about changing this progression.

The level of detail is also controlled by the master detail level in the renderer.

Matt
Title: Re: 'One For All' - Surface Shader Setup
Post by: bigben on July 22, 2007, 04:30:25 PM
Quote from: Volker Harun on July 22, 2007, 06:24:07 AM
Hi Bigben,
I reduced the render quality for the populations to medium quality. Imagelink (http://forums.planetside.co.uk/index.php?topic=1880.0)

At this distance increasing the quality would probably be only very subtle. Once the trees get to about 1/3 to half of the image height the extra detail becomes more noticeable.
Quote from: Matt on July 22, 2007, 10:39:10 AM
Quote from: bigben on July 20, 2007, 08:17:51 PM
As for tree quality... as you've found, increasing the render quality of the tree populations does make a significant difference for trees close to the camera.  Unfortunately they also require more RAM to render.

I didn't realise this was the case. Theoretically the populator quality setting shouldn't have any significant impact on RAM usage, only render time.

Quote
To get around this issue I use duplicate versions of a population with different render qualities, using a distance shader to separate them. If you use the same distribution shader for each population the trees will not move during an animation.

The quality setting is primarily a means of reducing detail in the distance to increase render speed, and the reduction in detail is progressive. If you find it better to use lower quality settings for distant trees then perhaps I need to think about changing this progression.

The level of detail is also controlled by the master detail level in the renderer.

Matt


Firstly.. I will have to verify the following statement, but from watching the TGDCLI output, the RAM usage climbed steadily while the populator was doing its thing.  I'm assuming that lower detail = fewer triangles overall = less RAM.  My leaves also used extra TG surfaces to enhance the bitmap textures so that may have been the cause of the extra RAM usage and noticeable quality differences. (early sample node network attached)...

But as I said I'd have to verify this.
Title: Re: 'One For All' - Surface Shader Setup
Post by: rcallicotte on July 23, 2007, 03:32:00 PM
Not to interrupt this discussion, but I want to illustrate what I have learned from Volker's TGD from this thread.  I took your work, Volker, and reproduced something of my own.  I changed some elements, but I have left many of the numbers the same until I understand this better.  So, it's a work in progress.  If anyone wants to use the TGD, you'll need an image texture for the fake stones.

Title: Re: 'One For All' - Surface Shader Setup
Post by: Mavcat on July 23, 2007, 04:37:01 PM
About the RAM thing, I found out the same thing. When i used the standard terragen grass in different qualities my RAM used on the lowest quality was around 250.000-450.000 kb while populating, with higher quality it easily could get around 1 gigabyte