Planetside Software Forums

General => Image Sharing => Topic started by: Tangled-Universe on October 25, 2010, 12:06:56 PM

Title: Fake Stone Shaders; *V1 finished on page 3*
Post by: Tangled-Universe on October 25, 2010, 12:06:56 PM
Hi everybody,

Thought it was time to do some TG2 again after some time "off".

I'm currently working on a couple of fake stone shaders with the intention to release them through NWDA at some point.
Not only will you get access to these stones, but also to a in depth tutorial, as the .tgd file is not for the faint of TG-heart ;D

So far I'm pretty happy. It surely needs some improvements like perhaps a bit more colour-varation, better fractal to create small bumps and tweaking the main fractal to prevent exploding stones (as you can see on in the centre).

The stones are situated under a 30m tall tree. I've used soft-shadows with 0.5 radius and 25 samples to be absolutely sure to have grain-free soft shadows. A couple of samples less might have been sufficient, but I did have the time to render very long, so why not? :)

Martin
Title: Re: Fake Stone Shaders; version 1
Post by: TheBlackHole on October 25, 2010, 12:36:13 PM
I don't think Image Sharing is for photos. :D
Title: Re: Fake Stone Shaders; version 1
Post by: cyphyr on October 25, 2010, 12:42:19 PM
Lol @ TBH :)
Great stones there !
I definitely approve of the tutorial, I've heard complaints (well comments really) in the past about files being available with out any real guide to the "why's" of how they were constructed in the first place.
Side note: One repeated question on this forum is "how do I plug these nodes into my hierarchy without loosing my textures" I hope you'll be able to add this in to your tut.
:)
Richard
Title: Re: Fake Stone Shaders; version 1
Post by: FrankB on October 25, 2010, 01:58:45 PM
Martiiiiin, finally :)

Stones are looking great, especially the large ones. I also like the smaller ones, but would prefer them to not grow on each other, if you know what I mean. If you're looking for some hints on what to potentially improve, that'd be one thing to look after.

Cheers
Frank
Title: Re: Fake Stone Shaders; version 1
Post by: Mahnmut on October 25, 2010, 03:11:04 PM
When I saw your name next to some basic looking topic like "fake stones" I knew there was something going on...
Looks like sprained ancle terrain.  In my opinion, its just the way the small stones "grow" on each other that is more realistic (for some kind of terrain) than any fake stones I ve seen in TG so far.
So did you build your own fake stones, or is that just some really advanced use of the inbuilt ones?
Best regards,
Jan
Title: Re: Fake Stone Shaders; version 1
Post by: Naoo on October 25, 2010, 03:55:41 PM
Hi

Realy fantastic!
I aggree with TheBlackHole.


ciao
Naoo
Title: Re: Fake Stone Shaders; version 1
Post by: inkydigit on October 25, 2010, 05:40:59 PM
looking pretty awesome so far, Martin...fake stones are hard to get looking right, almost a holy grail (for me at least!), and these are looking 99.9% right, a tutorial and a tgd will be an excellent resource/tool!
cheers
Jason
Title: Re: Fake Stone Shaders; version 1
Post by: freelancah on October 25, 2010, 07:08:32 PM
Looks extremely realistic! Nice job.
Title: Re: Fake Stone Shaders; version 1
Post by: Seth on October 25, 2010, 08:02:04 PM
great job !!!
and impressive lighting too !
i really love the shadows ^^
Title: Re: Fake Stone Shaders; version 1
Post by: Gannaingh on October 26, 2010, 12:36:35 AM
Those are some very pretty stones! Excellent work!
Title: Re: Fake Stone Shaders; version 1
Post by: nvseal on October 26, 2010, 12:52:52 AM
Wow  :o
Title: Re: Fake Stone Shaders; version 1
Post by: Dune on October 26, 2010, 04:04:36 AM
Congratulations on these rocks, Martin. Absolutely stunning, definitely a must have. And the lighting and subtle grass adds to a perfect setting.

---Dune
Title: Re: Fake Stone Shaders; version 1
Post by: domdib on October 26, 2010, 05:47:23 AM
Excellent work - very convincing colours and displacements - interesting that the smaller stones are much less angular than the big ones. Is that adjustable?

P.S. It would be interesting to see the same set-up both closer up, and also in long shot. When you've got time  ;)
Title: Re: Fake Stone Shaders; version 1
Post by: RArcher on October 26, 2010, 10:45:09 AM
This is great work Martin.  I really like the little ridges on the bigger rocks, makes them really seem natural.
Title: Re: Fake Stone Shaders; version 1
Post by: Tangled-Universe on October 26, 2010, 02:50:25 PM
Thanks guys :)
A new iteration is in the making, hope to post some soon!

Richard: Thanks, glad you like it. I agree with your suggestion to cover the implementation of fake stones into recent projects. I'll try to explain that as clear as possible.
The fun thing with this setup is that you'll only need to connect just one single surface layer into your current network to have the fake stones there. There are some conditions of course, but like I told you I'll try to cover these all.

Frank: Hey thanks dude :) I know what you mean, but it's not easy to prevent it completely. There might be a trick to solve it entirely, but haven't figured that out yet. So far I'm trying to avoid it using the correct blend-mode in the merge-shader and by carefully tweaking the density for each layer.

Jan: The stones on top of each other can look nice in some ways. Though like Frank mentions it sometimes can look odd as well. Perhaps also a matter of taste, although the "natural" way would be that most of the stones are separated. I used the normal fake stones shader, so no blue node wizardry :)

Dom: good point you make which I haven't covered in my starting post. I've designed these stones mainly for this type of view but also more close-up. I'll include these when I'll post my next iteration. I'll see if I can make this shader work from a greater distance, but there's no guarantee. I'd need to make some adjustments and include that shaderset as a separate stone shader into the package.
The reason why the smaller stones tend to look less angular, although I disagree they really do, is because of the displacement-scale and amplitude. It's very likely that a small stone will have very low variation of displacement-scale and same goes for displacement amplitude. You'll have a very evenly displaced stone then.

Cheers,
Martin
Title: Re: Fake Stone Shaders; version 1
Post by: Tangled-Universe on October 27, 2010, 06:18:25 AM
Ok made a cool bump-function and am rendering now.
It's quite a bit slower with this extra detail, so if one doesn't use these stones for close-up then disabling/deleting this part will increase renderspeed quite much. That will be documented of course :)

I'm open to suggestions from all of you on what kind of colour-setting you'd like to see in my next stones shader.
As I said I am planning to make 3-4 different shaders and pack these up. I have a couple of variations in mind, but I'd be happy to hear what you would like to see included. Maybe if things keep on developing as relatively easy as now I might be able to end up with more than 3-4 shaders, who knows :)

Cheers,
Martin
Title: Re: Fake Stone Shaders; version 1
Post by: domdib on October 27, 2010, 07:29:22 AM
Quote from: Tangled-Universe on October 26, 2010, 02:50:25 PM
I'll see if I can make this shader work from a greater distance, but there's no guarantee. I'd need to make some adjustments and include that shaderset as a separate stone shader into the package.
The reason why the smaller stones tend to look less angular, although I disagree they really do, is because of the displacement-scale and amplitude. It's very likely that a small stone will have very low variation of displacement-scale and same goes for displacement amplitude. You'll have a very evenly displaced stone then.

Cheers,
Martin

I appreciate what you're saying about the difficulty of making things work at different distances - I'm currently doing some work on rock surfacing that bears this out. And I understand about the small stones.

On the subject of colour settings - how about a nice pale yellow granite, and a subtle pink sandstone?
Title: Re: Fake Stone Shaders; version 1
Post by: Tangled-Universe on October 27, 2010, 07:42:39 AM
Thanks Dom,

Could you supply me with a link to what you have in mind, especially in regard to the yellow granite? When I google for examples I get quite some different looking results.

Martin
Title: Re: Fake Stone Shaders; version 1
Post by: domdib on October 27, 2010, 10:47:45 AM
Well, maybe something like this (although it is perhaps more pinkish than yellow). But of course, making detailed colour prescriptions in TG is somewhat idle, as the lighting conditions and atmo colour have such an impact. Perhaps we need to create a TGD with reference lighting - I have a vague recollection that dandelO might have done something along those lines.
Title: Re: Fake Stone Shaders; version 1
Post by: TheBlackHole on October 27, 2010, 10:57:47 AM
Quote from: domdib on October 27, 2010, 10:47:45 AM
Perhaps we need to create a TGD with reference lighting - I have a vague recollection that dandelO might have done something along those lines.
We already have one that comes with TG2. It's called the default scene. :D
Title: Re: Fake Stone Shaders; version 1
Post by: Tangled-Universe on October 27, 2010, 12:02:42 PM
Exactly TBH :)
I've used the default scene to create it. So no adjustments to lighting and atmosphere.
Title: Re: Fake Stone Shaders; version 1
Post by: domdib on October 27, 2010, 12:40:33 PM
Doh!

P.S. I've been working on a granite-like pattern recently - quite simple. I can send a .tgc if it's any help.
Title: Re: Fake Stone Shaders; version 1
Post by: choronr on October 27, 2010, 02:48:20 PM
A fine project Martin. Color variation as relates to regions can produce a kaleidoscope of types. Near rivers sometimes the colors seem to be a mix - near the oceans, they generally are dark gray to a sand color. Here in the lower desert we have a mix of grays and browns; whereas in the high desert, we see a lot of reddish sandstone and pinkish granite. In the area of Quartzite, Arizona (a rock hound's paradise). The rubble seems to run the spectrum.

Looking forward to the final results of your project.   
Title: Re: Fake Stone Shaders; version 1
Post by: Tangled-Universe on October 28, 2010, 12:35:20 PM
Thanks guys so far :)

So, here's a next iteration. I changed some seeds and scales of the smaller stones. I need to improve that a bit more.
The bump-texture looks nice now I think :) There's a couple of little things I want to improve as well, so I hope to finish this shader tomorrow.

You can view the full-size here by the way:
http://tangled-universe.deviantart.com/art/Stones-Shader-version-1-184221698 (http://tangled-universe.deviantart.com/art/Stones-Shader-version-1-184221698)

Stay tuned ;)

Martin
Title: Re: Fake Stone Shaders; version 1
Post by: Henry Blewer on October 28, 2010, 12:49:04 PM
Martin, this looks much better. The stones have better separation. Did you use a merge shader?
Title: Re: Fake Stone Shaders; version 1
Post by: dandelO on October 28, 2010, 12:59:16 PM
Looks cool. I think I prefer the first iteration, there's a very apparent voronoi pattern that appears to be in the specular areas that aren't in direct light, that's much more noticeable all over the second one because the larger displacements aren't as big there to disguise it. The tiny bump displacements look good and I love the little gold 'flecks'. Getting there, I'd say, nice. :)
Title: Re: Fake Stone Shaders; version 1
Post by: Tangled-Universe on October 28, 2010, 01:30:04 PM
Thanks Henry :)

Quote from: dandelO on October 28, 2010, 12:59:16 PM
Looks cool. I think I prefer the first iteration, there's a very apparent voronoi pattern that appears to be in the specular areas that aren't in direct light, that's much more noticeable all over the second one because the larger displacements aren't as big there to disguise it. The tiny bump displacements look good and I love the little gold 'flecks'. Getting there, I'd say, nice. :)

Yes the voronoi texture (colour) is not good here. I'm thinking of deleting it entirely maybe. In general shading is very difficult in Terragen 2. Things tend to look fantastic when lit directly, but as soon as it is in shadow it look butt ugly.
Anyhow, I've finally managed to get the voronoi warped, so that should be a big improvement already.
The "gold flecks" are in a very early stage. They are meant to be litchens, but I didn't pay much attention to it yet, just made it to get an idea of how it would/could look.
Thanks for your input Martin :)
Title: Re: Fake Stone Shaders; version 1
Post by: FrankB on October 28, 2010, 02:19:56 PM
I think the voronoi shading and displacement is a step in the right direction, as long as you a) make the voronoi lines narrower, and b) decrease the voroni displacement amount even further. If the voronoi patterns just show ever so slightly, then I reckon this will be great!
Title: Re: Fake Stone Shaders; version 1
Post by: dandelO on October 28, 2010, 04:00:17 PM
QuoteAnyhow, I've finally managed to get the voronoi warped, so that should be a big improvement already.

It's pretty counter-intuitive, isn't it? You need to warp the space that the voronoi appears on, as opposed to warping the actual generated voronoi noise afterwards. Took me lots of trial and error working that one out, too.
Title: Re: Fake Stone Shaders; version 1
Post by: Tangled-Universe on October 28, 2010, 04:05:52 PM
Quote from: dandelO on October 28, 2010, 04:00:17 PM
QuoteAnyhow, I've finally managed to get the voronoi warped, so that should be a big improvement already.

It's pretty counter-intuitive, isn't it? You need to warp the space that the voronoi appears on, as opposed to warping the actual generated voronoi noise afterwards. Took me lots of trial and error working that one out, too.

I warped the voronoi after the voronoi scalar itself...there's a work-around for this.
Title: Re: Fake Stone Shaders; version 1
Post by: dandelO on October 28, 2010, 05:40:19 PM
Ah ha! Well done with that! Hmm, I suppose making the noise a colour function of a following shader would allow that to then be warped. Anyway, good job! :)
Title: Re: Fake Stone Shaders; version 1
Post by: Tangled-Universe on October 28, 2010, 05:44:02 PM
Quote from: dandelO on October 28, 2010, 05:40:19 PM
Ah ha! Well done with that! Hmm, I suppose making the noise a colour function of a following shader would allow that to then be warped. Anyway, good job! :)

Yes almost exactly like that. I create the voronoi noise, warp it and then convert that function to a colour function using a distribution shader. That's it :)
Title: Re: Fake Stone Shaders; version 1
Post by: Tangled-Universe on October 29, 2010, 09:41:40 AM
Here's a crop from a 4000x3000 render:
Title: Re: Fake Stone Shaders; version 1
Post by: Tangled-Universe on October 29, 2010, 09:42:22 AM
And another one from a 8000x6000 render :)
Title: Re: Fake Stone Shaders; version 1
Post by: Tangled-Universe on October 29, 2010, 09:45:01 AM
The bump and detailing is ready, now I only need to fix the main displacing fractal scale and amplitude in such a way that I do not get oddly displaced stones or blown up stones.

I'm further planning to work on:

lava rocks
granite
sandstone
Title: Re: Fake Stone Shaders; version 1
Post by: domdib on October 29, 2010, 09:53:03 AM
That's a mighty fine bump function you have going there!
Title: Re: Fake Stone Shaders; version 1
Post by: inkydigit on October 29, 2010, 10:47:48 AM
nice details, are the rocks or stones real world scales?
Title: Re: Fake Stone Shaders; version 1
Post by: Tangled-Universe on October 29, 2010, 02:40:46 PM
Quote from: inkydigit on October 29, 2010, 10:47:48 AM
nice details, are the rocks or stones real world scales?

If you mean that they have meaningful scales/sizes...yes. The stones are approx. 2m.
Title: Re: Fake Stone Shaders; version 1
Post by: Oshyan on October 29, 2010, 04:18:47 PM
That lichen is looking really fantastic, along with the bumps. Nice work!

- Oshyan
Title: Re: Fake Stone Shaders; version 1
Post by: Seth on October 29, 2010, 05:00:47 PM
amazing Martin !!!
Title: Re: Fake Stone Shaders; version 1
Post by: Tangled-Universe on November 03, 2010, 05:08:25 PM
Ok, done with this one :)

See full resolution image here:
http://fc05.deviantart.net/fs70/f/2010/307/4/8/fake_stones_shader_v1_final_by_tangled_universe-d323md9.jpg (http://fc05.deviantart.net/fs70/f/2010/307/4/8/fake_stones_shader_v1_final_by_tangled_universe-d323md9.jpg)

Now let's proceed to V2 ;D

Cheers,
Martin
Title: Re: Fake Stone Shaders; *V1 finished on page 3*
Post by: Walli on November 04, 2010, 03:17:24 AM
really fantastic work!
Title: Re: Fake Stone Shaders; *V1 finished on page 3*
Post by: inkydigit on November 04, 2010, 07:05:32 AM
quality stuff Martin....cheers for the scale info!
Title: Re: Fake Stone Shaders; *V1 finished on page 3*
Post by: dandelO on November 04, 2010, 08:11:36 AM
Very nice! I love what you've done with the blotchy voronoi in the shadows now, now those parts look awesome too! Did you replace that with a Perlin or is it still voronoi but warped like you said you were doing? Shame about the displacement stretching/cutoff on a couple of the little stones but that's a TG problem, not yours. The full sized version is fantastic! :)
Title: Re: Fake Stone Shaders; *V1 finished on page 3*
Post by: Tangled-Universe on November 04, 2010, 09:00:11 AM
Thanks guys :) I'm glad you like it!
I have gathered some reference for sandstone boulders/rocks, so tonight I will start with those.

@Dandel0: Thanks Martin! I did not replace the voronoi and I finally also decided not to warp them because it would get too complicated and it didn't look that well either. I added a bit of billow fractal to the current ridged fractal.

You are right about the cutoff and "exploded" parts. In general you can prevent this a little by working with displacement offsets and by keeping displacement relatively mild. I've tried to be fair here, because I could also have chosen to either postwork it or to search for a POV without any of these artefacts.
One of the reasons this happens, I think, is that not every fake stone has the same base shape and size. Some stones already look a bit "sunk" from the beginning (without any texturing/displacements I mean here). I think these stones are relatively more "blown up" by the displacements I'm adding and therefore could explode or have these weird effects. Some stones look a bit facetted because of this. There's no way I can prevent this completely, but I did the best I can I think/hope :)

Cheers,
Martin
Title: Re: Fake Stone Shaders; *V1 finished on page 3*
Post by: RArcher on November 04, 2010, 12:13:40 PM
Great work Martin.  I really don't think there is any way for you to completely eliminate the occasional messy looking stone, but you've certainly gotten it to 99% or so anyway!

I'm hoping you expand on the lichen for one of your next sets, something like:

http://www.archer-designs.com/zp/index.php?album=photography%2Fhead-smashed-in&image=DSC_0033.jpg (http://www.archer-designs.com/zp/index.php?album=photography%2Fhead-smashed-in&image=DSC_0033.jpg)

or

http://www.archer-designs.com/zp/index.php?album=photography%2Fhead-smashed-in&image=P1010341.jpg (http://www.archer-designs.com/zp/index.php?album=photography%2Fhead-smashed-in&image=P1010341.jpg)

or

http://www.archer-designs.com/zp/index.php?album=photography%2Ffall-2008&image=DSC_0009.jpg (http://www.archer-designs.com/zp/index.php?album=photography%2Ffall-2008&image=DSC_0009.jpg)

or here for a close-up

http://www.archer-designs.com/zp/index.php?album=photography%2Flille-ghost-town&image=DSC_0149.jpg (http://www.archer-designs.com/zp/index.php?album=photography%2Flille-ghost-town&image=DSC_0149.jpg)