Author Topic: Function: cracks & gashes for rocks (fake stones)  (Read 17751 times)

Offline FrankB

  • Member
  • *
  • Posts: 3603
Function: cracks & gashes for rocks (fake stones)
« on: August 08, 2007, 02:04:19 PM »
Hi all,

following my experimentation around cracks on rocks, I have developed this further to accomodate for two otherwise distinct effects in parallel:

1 - Make Gashes

I'm using the term "gashes" to refer to a type of cracks that happen with rocks that exist in environments with a big cold/hot gradient. These stones 'crack' open, leaving deep gashes on the surface.

2 - Make Cracks

In this context, I'm referring to sediments, layers of stone that chip off entirely.


Now, the function can generate both effects at the same time, and allows to favour one or the other, or mix them equally.

Note that the function is currently optimzed for fake stones of other objects with an average size of 3 meters. If you require another scale, you'll have to fiddle with the functions accordingly. It's best to change only one parameter at a time to understand their effects. (I know you will most likely change them altogether, but then, you have been warned ;-) )

The contant scalar on the voronoi accounts for the size of the 'cracks' pattern.
The "Adjusting the deeper gashes" node controls the gash structures, obviously.

Then, the "Make gashes and cracks" node controls how visible and deep the structures become. This is done in the displacement tab of the node.

Finally, there are a few other displacement-generating nodes which control the larger overall  shape of the fake stone.

Oh, and there's an image map shader providing texture. I suggest you either use your own texture file, or use other ways of providing color to the stones.

Have fun,
Frank

PS: I'm continuing to work on a separate and more perfect "gashes" function together with Volker. Watch out for that.

Offline Tangled-Universe

  • Terrevangelist
  • *
  • Posts: 6183
    • CGScenery.com - Terragen Tutorials!
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #1 on: August 08, 2007, 02:52:41 PM »
Hi Frank,

Thanks a lot for sharing this with us! I'll go play with it right away  :)
I did get a number of error messages when opening the file. It seems the tgd has been created with a tg2 version with softshadows included?  ;D

Martin

Offline Volker Harun

  • Member
  • *
  • Posts: 1490
  • Let there be Rock!
    • NWDA-Net
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #2 on: August 08, 2007, 03:11:40 PM »
LOL

Offline FrankB

  • Member
  • *
  • Posts: 3603
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #3 on: August 08, 2007, 03:24:46 PM »
Hi Frank,

Thanks a lot for sharing this with us! I'll go play with it right away  :)
I did get a number of error messages when opening the file. It seems the tgd has been created with a tg2 version with softshadows included?  ;D

Martin

You're welcome. And yes, the version I used to develop it was based on a newer version than yours. However, none of the new features is relevant for the project I made available to you.

Cheers,
Frank

Offline Tangled-Universe

  • Terrevangelist
  • *
  • Posts: 6183
    • CGScenery.com - Terragen Tutorials!
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #4 on: August 08, 2007, 03:28:04 PM »
Yes I already realized that myself, nevertheless funny to encounter  :)

Offline old_blaggard

  • Member
  • *
  • Posts: 2524
    • http://sdcarpenter.free.fr/paul/
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #5 on: August 08, 2007, 05:05:00 PM »
Hehe, nice clip, Frank ;).
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.

Offline moodflow

  • Member
  • *
  • Posts: 1245
    • moodflow.com
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #6 on: August 08, 2007, 08:09:12 PM »
You guys... you just keep pushing the limits... excellent work.

You need a paycheck.
http://www.moodflow.com
mood-inspiring images and music

Offline FrankB

  • Member
  • *
  • Posts: 3603
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #7 on: August 08, 2007, 08:57:11 PM »
You need a paycheck.

now that you mention it.... yeah, you're damn right ;-)

Offline rcallicotte

  • Member
  • *
  • Posts: 9542
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #8 on: August 09, 2007, 01:50:54 PM »
Thanks Frank.  I had errors on-load yesterday and just now tried it again. COOL!  This is something to add to my understanding of this whole "crack & mutilate rocks" thing.   8)
So this is Disney World.  Can we live here?

Offline monks

  • Member
  • *
  • Posts: 286
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #9 on: August 09, 2007, 04:23:33 PM »
A perfect little tut  ;D love it!

monks

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #10 on: August 10, 2007, 11:02:13 AM »
Thanks Frank.  I had errors on-load yesterday and just now tried it again. COOL!  This is something to add to my understanding of this whole "crack & mutilate rocks" thing.   8)

Saving after opening it gets rid of the errors, but when I attempt to render it or add lighting to the preview the virtual memory blows out to 1.7Gb in a matter of seconds and TG crashes :( The only change I made was replacing the image map with a fractal
« Last Edit: August 10, 2007, 11:06:37 AM by bigben »

Offline rcallicotte

  • Member
  • *
  • Posts: 9542
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #11 on: August 10, 2007, 12:40:52 PM »
Cool.  Thanks, Ben.  I'll try this now.
 ;D

Saving after opening it gets rid of the errors, but when I attempt to render it or add lighting to the preview the virtual memory blows out to 1.7Gb in a matter of seconds and TG crashes :( The only change I made was replacing the image map with a fractal
So this is Disney World.  Can we live here?

Offline FrankB

  • Member
  • *
  • Posts: 3603
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #12 on: August 10, 2007, 01:00:00 PM »
..., but when I attempt to render it or add lighting to the preview the virtual memory blows out to 1.7Gb in a matter of seconds and TG crashes :( The only change I made was replacing the image map with a fractal

Really? That's not so on my PC. tgd.exe grows up to 300gb, and virtual memory rises very conservatively here.
I'm running xp with 2gb ram.

Frank

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #13 on: August 15, 2007, 10:46:00 PM »
Yep.  RAM only goes up to 250-300Mb, but VM maxes out in the blink of an eye and then TG dies. Also running XP with 2Gb RAM... tried a couple of machines. Hopefully it's a sign of happier times to come with the next update ;)
« Last Edit: August 15, 2007, 11:02:55 PM by bigben »

Offline otakar

  • Member
  • *
  • Posts: 1232
  • Procrastinate later.
Re: Function: cracks & gashes for rocks (fake stones)
« Reply #14 on: August 16, 2007, 05:44:04 AM »
same problem here. I guess we'll have to try again with the update. But thanks for sharing  :D

 

anything