Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

tzuvich

Rogk generation algorithm

This topic is 5445 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone happen to have (or know of) a reasonable algorithm for generating 3D rocks? I want to start with either a spherical or cylindrical mesh as a base, then perturb it through some process until it is a realistic rock shape. Ted Zuvich Home Page

Share this post


Link to post
Share on other sites
Advertisement
I have not done this but one way would be to displace each vertex a bit in a random direction. To make this look somewhat realistic you probably need very low polygon baseobject.
for each vertex:
v.x += rand( -1.0f, 1.0f ) * factor
etc...


____________________ ____ ___ __ _
Enselic''s Corner

Share this post


Link to post
Share on other sites
I wouldn''t suggest using the random approach, although it could work, if you used a variation of Perlin noise. That wouldn''t give anything with a proper surface though. One way could be to start with a base object. Now cut pieces off, then smooth if necessary, then maybe cut more pieces off. This would simulate erosion and how rocks are actually formed. By varying the spliting and smoothing, you could create different kinds of rocks.

However this would only create convex high poly rocks. If you''re looking for low poly, then an approach similar to the first suggestion would probably be better.

To slice a rock, you would create a plane, then disregard all vertices on one side, create vertices along split edges and then work out the faces.

Good Luck!

Share this post


Link to post
Share on other sites
The random displacement idea doesn''t work very well ( I already tried it ). I''ll try the plane-slicing idea; sort of an analogy to the fault-generation algorithm used to generate terrain blocks. Thanks for the replys.

Ted Zuvich
My Home Page

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!