Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - Zotoaster's Rock Generator

Author
Message
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 11th Oct 2013 18:26 Edited at: 13th Oct 2013 08:24
I found this little gem from Zotoaster's 2006 post.
See the original here: http://forum.thegamecreators.com/?m=forum_view&t=90402&b=1

All I've added is random x/y/z scaling, as well as texturing and a save feature. (Sorry for the sloppy in-loop coding.)



I'll be using this a lot for landscaping.
Thanks for sharing this, Zotoaster!



D.D.
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 12th Oct 2013 20:21 Edited at: 12th Oct 2013 20:25
@Derek Darkly

Nice and quick way to make our rocks. When I see this code,that remember me to my old rock program. Instead of scaling object, what I did, is play vertexdata with a heightmap for modeling the mesh.I hope you do not mind, and you like my example.


You can add a save object function ...









Cheers.

I'm not a grumpy grandpa

Attachments

Login to view attachments
Derek Darkly
12
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 13th Oct 2013 08:48
Excellent Chafari!

Limiting the heightmap range also gives us good control over the smoothness of the rocks.... something like c=100+rnd(155) or equivalent.

This is definitely going into my app library!
Thanks a bunch!

D.D.
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 13th Oct 2013 21:24
Quote: "Limiting the heightmap range also gives us good control over the smoothness of the rocks.... something like c=100+rnd(155) or equivalent."


You're right...it give us a smooth rock...we can combine . I'm glad you like it

Cheers.

I'm not a grumpy grandpa

Login to post a reply

Server time is: 2024-04-20 03:48:36
Your offset time is: 2024-04-20 03:48:36