Planetside Software Forums

General => File Sharing => Rocks => Topic started by: FrankB on August 08, 2007, 10:04:19 am

Title: Function: cracks & gashes for rocks (fake stones)
Post by: FrankB on August 08, 2007, 10:04:19 am
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.
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: Tangled-Universe on August 08, 2007, 10:52:41 am
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
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: Volker Harun on August 08, 2007, 11:11:40 am
LOL
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: FrankB on August 08, 2007, 11:24:46 am
Quote from: Tangled-Universe on August 08, 2007, 10:52:41 am
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
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: Tangled-Universe on August 08, 2007, 11:28:04 am
Yes I already realized that myself, nevertheless funny to encounter  :)
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: old_blaggard on August 08, 2007, 01:05:00 pm
Hehe, nice clip, Frank ;).
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: moodflow on August 08, 2007, 04:09:12 pm
You guys... you just keep pushing the limits... excellent work.

You need a paycheck.
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: FrankB on August 08, 2007, 04:57:11 pm
Quote from: moodflow on August 08, 2007, 04:09:12 pm
You need a paycheck.


now that you mention it.... yeah, you're damn right ;-)
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: rcallicotte on August 09, 2007, 09:50:54 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)
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: monks on August 09, 2007, 12:23:33 pm
A perfect little tut  ;D love it!

monks
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: bigben on August 10, 2007, 07:02:13 am
Quote from: calico on August 09, 2007, 09:50:54 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
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: rcallicotte on August 10, 2007, 08:40:52 am
Cool.  Thanks, Ben.  I'll try this now.
;D

Quote from: bigben on August 10, 2007, 07:02:13 am
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
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: FrankB on August 10, 2007, 09:00:00 am
Quote from: bigben on August 10, 2007, 07:02:13 am
..., 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
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: bigben on August 15, 2007, 06: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 ;)
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: otakar on August 16, 2007, 01:44:04 am
same problem here. I guess we'll have to try again with the update. But thanks for sharing  :D
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: Matt on August 22, 2007, 12:51:42 pm
Quote from: bigben on August 10, 2007, 07:02:13 am
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


That may be due to a bug that has been fixed in the alpha version that Frank is using. That fix will be in this month's public update. There are some shaders that can't be used as part of a displacement calculation, and you may need to isolate those shaders until you discover which is to blame. Unfortunately I can't remember which shaders they are.

Matt
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: Volker Harun on August 24, 2007, 10:38:17 am
Just to let you know that Frank and I are still on (y)our way.

This is a function that still needs some tuning ...

Volker
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: moodflow on August 24, 2007, 11:14:55 am
This is looking really good Volker!  Finally, those voronoi straight lines are becoming broken up a bit.  Nice work!   8)
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: Seth on August 24, 2007, 11:23:41 am
wow !
as soon as i get back from holidays, i'll try to understand how the voronoï works !!! ^^
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: old_blaggard on August 24, 2007, 11:46:52 am
Looking mighty fine, Volker!
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: sjefen on August 24, 2007, 02:01:57 pm
This is absolutely fantastic :o
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: rcallicotte on August 24, 2007, 03:48:04 pm
I'd be more help, but I'm busy learning other stuff.  Sometime next week I'll get back into TG2 learning mode.  As usual, I expect to need to run for a couple of weeks before I even catch a sniff of trails like this one.

This looks nice, Volker.  Really good.



Quote from: Volker Harun on August 24, 2007, 10:38:17 am
Just to let you know that Frank and I are still on (y)our way.

This is a function that still needs some tuning ...

Volker
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: nvseal on August 25, 2007, 02:10:02 pm
I hope you are going to share that Volker.  ;)
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: Volker Harun on August 26, 2007, 09:52:48 am
@nvseal: Nope.  :'(

But attached is the improved and cleaned version  ;D

After importing the Clip, you should check the internal network of 'Voroni Cracks'.

It has again a group of modificators.
Patch size, Constant vector ('Same as Patch size') and the scale of the Powerfractal should have approximate values.

Have fun ... and watch for updates,

Volker
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: old_blaggard on August 26, 2007, 12:20:22 pm
Thanks a whole lot for sharing, Volker.
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: rcallicotte on August 27, 2007, 09:28:03 am
Thanks, Volker.  You're a good educator.   ;D
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: cyphyr on August 27, 2007, 11:59:51 am
Thanks, looks really useful, but I don't get how to plug it in. When I view the group there are no node junctions and when I view the internal network I cant access the nodes from the rest of the scene ???
I know I'm missing something but I cant seem to find it.
Richard
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: Volker Harun on August 27, 2007, 12:07:56 pm
Hi Richard,

this is my way to keep a scene setup clean ,-)
Look here for an example: http://forums.planetside.co.uk/index.php?topic=1909.0

If you want to use the cracks as a child of a surface shader, then right-click that little triangle on top of that shader which is for the child-input.
A little menu appears, choose asign shader --> VoroniCracks/Output

Got it?

Volker :)
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: RealUser on August 27, 2007, 12:42:45 pm
Hey, hey! Way cool guys!
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: rcallicotte on August 30, 2007, 02:11:41 pm
Volker, I can't get this TGC to open.  I'm getting a couple of errors about intersection something or other.
Title: Re: Function: cracks & gashes for rocks (fake stones)
Post by: old_blaggard on August 30, 2007, 02:18:00 pm
That's because it was made with an alpha version.  You should still be able to open it, though....