Arrays Sketching script (v0.6 alpha)

This is a script for sketching arrays in Blender 2.5.

http://img148.imageshack.us/img148/1139/asketchvimeopic.png

DOWNLOAD:


(The blue download button)

The ZIP file includes the script, a PDF file explaining how to use it, and a blend file with the default brush (spheres) and the array brush shown in the video. Also the matcap used for the GLSL material.

UPDATE (7-May-2010): A video-tutorial was kindly made by Dimetrii . The voice is in Russian, but it clearly demonstrates the features of this tool, and it has some subtitles in english. (Here is the discussion thread for the tutorial)

Note that the script is on an alpha stage. I’ve tested it with SVN revision 26022, and may probably need changes for future Blender releases. If you want to report bugs, you can post them in this thread.

Run first the script ArraySketch.py, and then ArraySketch_hotkeys.py to register the hotkeys.

IMPORTANT: always use the stroke tools when working with strokes. For instance to delete a stroke use the “Delete” button or HotKey of this script instead of just pressing Del key. The same for enter or exit “Stroke Edit mode”.
Because they behave in a different way than the usual Delete and Edit mode.

A grease pencil video tutorial that may help get a grasp of the actual grease pencil features:

http://vimeo.com/8982749


Want to thank Campbell Barton (ideasman_42) for suggesting using Python and for telling me how to extract points from grease pencil strokes.
And special thanks to Crouch for his 2.5 Python examples thread, and the people who posted code there. It’s been a huge help. Very recommended thread for anyone interested in learning Python for Blender 2.5.

Some technical aspects for those who care:

Everything in the video was done in Blender, even the video editing, and the matcap for the GLSL materials.

This script uses actual Blender 2.5 features combined using Python. Essentially it takes advantage of the beautiful capabilities of the actual grease pencil, the speed and versatility of the Array modifier, together with Curve modifier, and all the curve editing goodnesses available, like curve radius control, tilt, etc.
This proves how a user with Python knowledge, but without deep math knowledge, can bring nice tools out of Blender 2.5 and its new Python capabilities.

The All quads meshing feature is a trick that works like this:

  • Metaballs along the curves
  • Convert them to mesh and use Decimate modifier to reduce polys quite a lot.
  • Convert Tris to Quads feature from Blender (which leaves some tris)
  • Add subdivision (which makes the trick for “All quads”).
  • And finally use Shrinkwrap modifier to get this new decimated/subdivided mesh to the surface of the original mesh obtained from the metaballs.

It’s slow, it may take a few minutes depending on the complexity of the model. Always check the console to see the progress, and get an idea of how much it will take.
The slow down takes place mostly in the metaballs creation process. And then when the metaballs are converted to mesh. The decimation and Quads convertion is relatively quick.

The good thing is that as result you get a mesh with fairly uniform distribution of quads, and a number of them that benefits the speed of sculpting, since actual sculpting speed increase a lot when the base mesh has enough faces.
And at the same time I tried to balance the number of them enough to get a result that reflects what was sketched with the arrays strokes, and at the same time don’t get too many of them.

Not sure what’s the state of Genscher’s Decimate modifier, but if it will be integrated into Blender it may give nicer results.

The meshing is done in 3 steps. This should be just one step in the future, but for some reason right now Blender doesn’t do some steps all in one operator, so I had to divide things into more than one. Not sure if I’m doing something wrong.

You can change the material of the strokes by changing the material of the brush object before adding the stroke, or after adding the stroke by simply selecting that stroke and changing its material.

Known issues:

  • You have to apply the scale and rotation of the main object before start adding strokes.
  • Right now the brush object must be in the same layer as the main object.
  • The metaballs convertion seems to get slower with each metaball created. This seems natural at first glance, because there are more metaballs. But after deleting those metaballs and doing a new meshing the conversion maintains its slowing down.
    This is solved by saving the file before doing the meshing and opening it again. It’s like something remains there in some place but don’t know what or where. Maybe a Dev knows better what happens here.

I’ve been learning 2.5 API while doing this, so some things of the code may not have the best practices. For instance, at the begining I didn’t know how to set custom properties, so the different elements are related by object-name conventions.
Don’t be shy to criticize suggesting better code practices.

Well… hope you enjoy it… I’m glad for the interest this script brought.

.

Wow man that looks so awesome! gonna download the stuff now :smiley:

I believe this is going to make some noise :slight_smile: well done :wink:

This looks incredible! I can’t wait to see some serious work done with this tool.

Great work.

–Colin

very clever use of what is already there, I wonder how many other great tools can be made from combining pre-existing ones in different ways, hmmm…

bump, this is aWeSoMe! :smiley:

Thank you for sharing Eclectiel. This is an awesome gift! :RocknRoll:

P. Monk

Great script, I guessed 3 for 3 on how you were doing it for the creation, but didn’t guess the quading method.

LetterRip

This looks soooo great! :slight_smile: Can’t wait to play with it. Thanks Eclectiel.

!!! stunning work Eclectiel!

Thank you for sharing, cant wait to get into this script!

Looks like zSpheres are coming to blender!! Awsome!

before i installed something new

can you tell me what is this 4 share desktop file ?

i would definitively like to try what i see in video
looks awsome and powerfull

to do this manually with other tools would require lot’s of time
so if this can be debugged totaly i mean
it could become a new tool in 2.5

keep up the good work

Thanks

It seems to be some sort of download manager from 4shared, but you don’t need to download that. The file download link is the blue button left to that one.

Hey, id check jaevixa-asyliax’s decimator. Its alot faster than 900000 faces in 0.1s.

Hi,
This looks awesome!!

Thanks,
shul

just click the blue download button :wink: not the green one…

Thanks
sorry i press the wrong button for download !

i’m gone try this afternoon this thing
but the video looks so cool!

Thanks

i began trying to use this and a bit difficult !
cause the video does not have any voice or show panels in 2.5

so here are some suggestions to improve the video

1 - can you please add some voice if you can
saying which keys you are selecting may be showing a bigger screen
where we can see which buttons are selected

would be a lot easier then to guess what your doing !

2 - at the beginning of video your adding some grease pencil lines but don’t know
which buttons you use to do it
and is this adding objects to a plane only ?

3 - if would be easier to have sort of a button which would start the 2 scripts
there must be a way of doing this by may be by adding a panel in tool bar to add and run the new scripts then you can work with the new panels

4 - there is a blend file but where is it use in the video
is it from beginning or you added a plane at the beginning then got rid of it ect…

this should be explain in the video too

i know this is still a WIP and with time it will improve

i like the way this is being retopo to the surface
have to test some more to better understand this

keep up the good work

Thanks

He is using surface, and when he does the head i think he is using endpoints also,

LetterRip

Thanks everyone for the kinds comments, really appreciated and welcome.

@effstops
If this is useful in any stage of Durian, that would be really nice!

Yeah, is good to realize of the power of the work been done in 2.5’s Python API.

Hehe, I saw the post… well guessed. The all quads trick was a difficult one to guess. Was right the one who said that it was a videoediting-accellerated algo ;).
But the funniest part was that remesh software called “Eclectic”… What are the odds??!

You should be able to do it. I tested it on SVN 26510, and everything seems to work fine.
It will be nice if some day you use it for any of your sculpts!

If you get any result that you would like to share, feel free to post it in this thread.

@alonzo.gfx
Thanks for clearing it up with the pic!

My crappy spoken english would not help much. If I get some time I can try to do a video showing the toolbar while using this tools. In the meantime try with the PDF file included in the ZIP, it gives some guidelines, and explains each button and slider, and gives the hotkeys for every function.

Any help on this would be greatly appreciated. If anyone decides to do a videotutorial, count on my help if you need to know how anything of this script works.

2 - at the beginning of video your adding some grease pencil lines but don’t know
which buttons you use to do it
and is this adding objects to a plane only ?

I believe that is more about the use of grease pencil than the use of this script. For drawing grease pencil strokes you can hold DKEY while you draw.

There is a video tutorial at vimeo that may help people with the new features of grease pencil:

I will add them to the main post, and the vimeo page of this script.

3 - if would be easier to have sort of a button which would start the 2 scripts
there must be a way of doing this by may be by adding a panel in tool bar to add and run the new scripts then you can work with the new panels

I separated them on purpose, because I don’t know if it’s a god practice to have the keymaps included in the main script. At least not without a validation checking if they are already registered, and I don’t know how to do it yet.
But luckily, I forgot to delete the lines where the script registers the Hotkeys. So there is no need to run the script with the hotkeys, it’s all in the first main script.

4 - there is a blend file but where is it use in the video
is it from beginning or you added a plane at the beginning then got rid of it ect…

The blend file is just to share the scripts, matcap and brushes. To start you need first to create an object and select it. These instructions are included in the PDF, please try this help doc first.
[/quote]