Rock generator script

It worked! Thanks Meta.

tell me when you believe its officially done, because I had fun testing it when it first came out :smiley:

@Evil Moon MOose: I’ll do that! Right now I have a more significant update almost ready (should be ready tomorrow), and then a couple small tweaks and I think I would place it a v1.0 status since I have not hit any major bugs nor can I think of any additional features for it ATM.

perfect, sounds great, I look forward to extended use of it, and to sending you any reports on how its working ;D

Ok, update is up. There are two main changes. A quick & dirty mossiness generation has been added, but still needs a bit of tweaking. Secondly I found a critical bug when “Scale Displacement Textures” is selected that causes the script to silently fail. It has been corrected.

So what I have left for v1.0 status is I have not finished tweaking the meshes I added a couple updates or so back, and everything about the mossiness needs to be tweaked to get it looking better.

alright sounds great!

When I tried the script “add_mesh_rocks_nonumpy-6-6-2011.py”, I get the error message: No modules named add_object_utils. I am running blender on mac. Any ideas?

glnngu:
I’ll bet this is an API issue. If you pull up Blender’s start screen, is your Blender revision before r36710? They changed the API for add_object_utils with r36710.

Edit: Below is where you’ll find your build revision:

Hi BrikBot, i would like to try your addon but get this error:

File “/home/pepo/zwei5new/install/linux2/2.57/scripts/modules/numpy/lib/type_check.py”, line 8, in <module>
import numpy.core.numeric as _nx
File “/home/pepo/zwei5new/install/linux2/2.57/scripts/modules/numpy/core/init.py”, line 5, in <module>
from . import multiarray
ImportError: cannot import name multiarray

I use your numpy from here: http://www.mediafire.com/file/y6x7xd.../numpy-x64.zip and use opensuse linux 11.4/64 and the latest svn trunk.
Thanks, mib.

I think this is because NumPy has some compiled code in it and the link I have is for a build I built for Windows. Unfortunatly, I don’t have the ability to produce a NumPy build for an OS other than Windows right now. So, if you are able to you can create a build of NumPy for your openSuse box from the source code (http://sourceforge.net/projects/numpy/files/NumPy/1.6.0/) or you will need to use the non-NumPy version. Sorry I can’t help more than that.

If you do build NumPy for your openSuse box, I would appreciate a link so it is available to others.

v1.0 is up. All links in the first post have been updated, as has the Blender upload tracker:

Right now, to my knowledge, the code is bug free and there are no more planned features. If you find a bug, want a feature, or have some other improvement for the add-on, please mention it and I will do what I can.

If you use the add-on in a project, I would appreciate if you share a render for others to see what the rocks might look like. Thanks!


:(I downloaded numpy-1.6.0-py2.6-python.org-macosx10.3 and attempted to install it and it told me this;
You cannot install numpy 1.6.0 on this volume. numpy requires python.org Python 2.6 to install.
I have python 3.2 from blender 2.57. So where is numpy for python 3.2

At the moment I don’t know/can’t find one but I’ll to try to build and post one tomorrow.

@ Reidh: So far I have not been successful in putting together a build for Mac OS X that runs with Blender (it runs with Python 3.2 for Mac, however). I need to do more research into the problem (there is a great big long traceback that Blender gives) and see if I can figure out what’s wrong . . . and hopefully I am not hitting a bug in Blender’s bundled Python and it is just my own ignorance.

@Brikbot only by the way (nothing against your nice script :wink: )
Did you have had a look at the addon “ANT landscape”, if you choose for “Sphere” you get a nice rock too!

I actually did, but was not happy with it on three points:

  • It does not allow the amount of control or various detail levels I wanted
  • It does not allow for generating 100+ rocks at once
  • It does not generate materials for the rocks.

The last two were the most important parts since my current project required about 200 rocks, and there is no way I was going to go build up 200 rocks and then devise materials and textures for each rock. Since it was not time critical, I figured I take advantage and learn some Python in addition to the Blender API since I have wanted to learn both for a couple years now, just never really had an excuse to.

But if are just looking for a couple quick rocks, the ANT Landscape does produce some pretty good rock-looking objects, and I think is probably the quick and easy way to go vs. my script.

You gave good comment, agree … :wink:

I have another update on the internals of the script. First, I have structured the script into a Python module so I can add presets in the future (someone somewhere in here asked for them, but I can’t find the post now). The preset values will be contained in a xml file so you’ll be able to manually customize and add presets.
This will probably make you happy, Meta :wink: . . . I have done some work to eliminate the two separate versions for Numpy/Non-Numpy. The script will now try to import Numpy and if it fails, will fall back onto Python’s built-in (though slower) modules. I should have done this way sooner, but I guess better late than never. The idea is that 1) I don’t have to manage the two separate versions and make sure I propagate changes between the two and 2) it should make it much easier for users. If they have Numpy working with Blender they’ll get the speed benefit, but if they don’t, the script will still run without blowing up on them.

Also, going back to Numpy on Mac OS X, I think Blender’s Python on Mac might have a bug. I built Numpy on a Mac and confirmed that it worked with the official Python 3.2 Mac distribution. When I pulled it into Blender, I received the error that others have been seeing:

ImportError: cannot import name multiarray

This might be something to investigate further. I might even put in a Blender bug report if it continues to appear to be a Blender issue . . . but I would like to have others confirm this first.

First post has been edited to reflect the changes and new download links. I have also uploaded the current to the external tracker so you can download it from there.

Just noting that I just uploaded an updated PDF to reflect that latest update. Link was updated in the first post.

Hi Brikbot, havent check this post cause i didnt got any notifications! here’s my Python version, you asked my to check it a while ago. Im working on a mac so perhaps thats all the problem

PYTHON INTERACTIVE CONSOLE 3.2 (r32:88445, Mar 1 2011, 21:58:29) [GCC 4.2.1 (Apple Inc. build 5664)]

Command History: Up/Down Arrow
Cursor: Left/Right Home/End
Remove: Backspace/Delete
Execute: Enter
Autocomplete: Ctrl+Space
Ctrl +/- Wheel: Zoom
Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, blf, mathutils
Convenience Imports: from mathutils import *; from math import *

i dont really seem to see where the 32 or 64bit part needs to bee you said something about in the top