Surface Sketching script v0.8 Beta

This looks great!

I am new to blender so which folder do you place this in and how do you set this up to work?

Btw, what are the keyboard short cuts you are using for mesh selections and move?

Thanks,

It would be cool to add the script of bartius crouch to add the ability to rebuild the curvature of the curves. your tool could the mimic some nurbs fonctionality.
very good job.
dagobert

I saw the vid example of this script on BlenderNation and logged on here just to say, “HOLY CRAP AWESOME WOW!!!” How you come up with these is beyond me, let alone program them. keep up the incredible work, absolutely luvin it!! and a huge hearty THANK YOU!!
note: I haven’t tried it yet, but I will. I’m just amazed by the video, which demonstrates clearly that it works, and is awesome, and looks pretty easy to use.

Amazing script. For precision work, is it possible to make a pen tool with bezier node like adobe illustrator pen tool instead of grease pencil sketches ?

Woow, played around with it and it’s great!

Just a tip, put the surface_sketch.py in the ui directory and it while open all time, no need to run it in the editor :eyebrowlift:

This is really cool. It’d be awesome if you wrap it in add-on.

could someone do a tutorial on how to set it up properly,

Thanks again for the enthusiastic comments.

I am new to blender so which folder do you place this in and how do you set this up to work?
Btw, what are the keyboard short cuts you are using for mesh selections and move?

Welcome to Blender. You can open them in a Text area and hit “Run Script”, or follow the tip at post #46.

About the hotkeys for selecting, in the video I used simple loop selection (ALT + right mouse button) and G for move. Check this page for basic keys in Blender:http://wiki.blender.org/index.php/Doc:Manual/Interface/Keyboard_and_Mouse

It would be cool to add the script of bartius crouch to add the ability to rebuild the curvature of the curves. your tool could the mimic some nurbs fonctionality.

I think LoopTools script and this will complement each other well, since this one generates quadrangular grids, and LoopTools as its name well indicates gets along well with loops.

I saw the vid example of this script on BlenderNation and logged on here just to say, “HOLY CRAP AWESOME WOW!!!”
Heheh… thanks

Amazing script. For precision work, is it possible to make a pen tool with bezier node like adobe illustrator pen tool instead of grease pencil sketches ?
That’s a bit beyond my scope right now. Things that seem simple may be more difficult to do or may need more technical knowledge (i.e. deeper maths). But right now it’s possible to use curves as input for the surface, without the need of using grease pencil, just doing the curves as you were doing strokes with the pencil. (Check post #32.)

Just a tip, put the surface_sketch.py in the ui directory and it while open all time, no need to run it in the editor :eyebrowlift:
Thanks for the tip. Maybe a dev could confirm if that is a good practice or is better something else. But thanks anyway, good for people that wants it run automatically.

This is really cool. It’d be awesome if you wrap it in add-on.
Don’t know how to do that right now. If someone could sheed some light on the best way to have them running automatically, pls share.
Right now the best solution seems to be Lguillaume’s tip.

Firstly, AWESOME stuff! :slight_smile:

About making it an add-on. hmm… Seems like you basically need to create a header and the “register” and “unregister” functions.

Here is a header template:

........# ##### END GPL LICENSE BLOCK ##### 
 
# version 0.8 Beta 

bl_addon_info = {
    'name': 'Surface Sketch',
    'author': 'Eclectiel',
    'version': '0.8',
    'blender': (2, 5, 3),
    'location': 'View3D > EditMode > ToolShelf',
    'description': 'Draw meshes and re-topologies with Grease Pencil',
    'url': 'http://wiki.blender.org/index.php/Extensions:2.5/Py/' \
        'Scripts/Mesh/Surface_Sketch',
    'category': 'Mesh'}

And here are registration functions:

def register(): 
    bpy.types.register(GPENCIL_OT_SURFSK_add_surface) 
    bpy.types.register(GPENCIL_OT_SURFSK_strokes_to_curves) 
    bpy.types.register(VIEW3D_PT_tools_SURF_SKETCH)
    
    keymap_item_add_surf = bpy.data.window_managers[0].active_keyconfig.keymaps["3D View"].items.add("GPENCIL_OT_SURFSK_add_surface","E","PRESS", key_modifier="D")
    keymap_item_stroke_to_curve = bpy.data.window_managers[0].active_keyconfig.keymaps["3D View"].items.add("GPENCIL_OT_SURFSK_strokes_to_curves","C","PRESS", key_modifier="D")

def unregister(): 
    bpy.types.unregister(GPENCIL_OT_SURFSK_add_surface) 
    bpy.types.unregister(GPENCIL_OT_SURFSK_strokes_to_curves) 
    bpy.types.unregister(VIEW3D_PT_tools_SURF_SKETCH)
 
if __name__ == "__main__":
    register()

Note that the shortcuts are being added in the register functions. Dunno how to remove them.

Then, if you just throw the script in the addons folder, it appears in the add-ons tab in user preferences.

I do not understand python well. I just picked those pieces from the other addons. It worked without warnings… so… later! :stuck_out_tongue: I recommend that you join the blender coders irc for experient tips.

crazy tool man this is amazing.

Note that the shortcuts are being added in the register functions. Dunno how to remove them.
Here’s how:


def unregister():
    bpy.types.unregister(GPENCIL_OT_SURFSK_add_surface) 
    bpy.types.unregister(GPENCIL_OT_SURFSK_strokes_to_curves) 
    bpy.types.unregister(VIEW3D_PT_tools_SURF_SKETCH) 
    km = bpy.context.manager.active_keyconfig.keymaps["3D View"]
    for kmi in km:
        if kmi.idname in ("GPENCIL_OT_SURFSK_add_surface", "GPENCIL_OT_SURFSK_strokes_to_curves"):
            km.remove_item(kmi)

Thanks for the amazing script. After playing with it for couple of hours I have to say that it would represent major modeling feature for any 3D app (I mean, 3D coat announced similar feature as breakthrough in mesh retopo-ing and zbrush has nothing that could be remotely comparable)

Thanks for the very useful and fun script! It gives whole new spin for greasy pencil function.

I can’t wait to see it fully incorporated into Blender!

Thanks again!

welcom to :www.edgei-ds.cn
www.zstar.hk
You can find the best game console and mobile phone .

spam troll slap removed, post reported instead

@Sneg and luciofulci
Thanks for the code, I believe I will add something like those examples. The thing I’m not sure to add is the hotkeys. In this script I put them separately not to force users to use those hotkeys. They could also have them already in use and may generate conflict.
Also in the case of grease pencil it’s like “the first who developes something for the grease pencil gets the most comfortable hotkeys” :). So I guess it’s more constructive to let the user decide.

Thanks again for the code!

Thanks Claas, I’m glad you like it.

@ristesekuloski
Thanks for the comment. I know in general the features of other softs but only became aware of the peculiarity of this tool after all the comments, I would’ve guessed ZBrush / Topogun had features as quick as this one. Although, from the videos I’ve seen, Topogun has great set of tools for this.

does this one not work with the render branche?
Just curious I cannot get it to work at all.

Eclectiel, you are welcome, this script adds a very important feature.
This one together with loop tools would be a very important tool because
you start offering automatic mesh generation or in other words a 3d surface
sketch tool. and loop tools for me is very hot because it offers a surface
and poly line smoothing similar to fair in NURBS.

This might not look important but fairing is crucial if you want to work with
good nurbs surfaces and pay attention to the overall curvature.

with subsurf it is pretty much impossible but those tools offer this now.

For NURBS geeks or object designers as I am this is a crucial tool and a
major selling point of Blender because it pushes it out of the uncontrollable
3D sculpt realm and puts it into a more professional light since it also allows
dimensions now.

Claas

Well Loop tool is using Nurbs algo to make curve smooth

but it might be a good idea to include this algo in your script to get smooth curves too

or may be have an option for this then you can get smooth curve as you wish for 3D surfaces

have a look at Crouch’s Loop tool script and it’s already Nurbs in 3D

Thanks

Wrapit by Matt Clark is another example of innovative mesh editing, this time done in Max.
http://www.matt-clark.co.uk/spe.php?o=163

Check out the vids if you need some inspiration on smooth workflow.

~Glenn

I only tested it with two SVN, the most recent I tested it with is SVN 27974. The python API changes quite fast, so not sure if it could work with render branch.

This one together with loop tools would be a very important tool because
you start offering automatic mesh generation or in other words a 3d surface
sketch tool. and loop tools for me is very hot because it offers a surface
and poly line smoothing similar to fair in NURBS.

with subsurf it is pretty much impossible but those tools offer this now.

Yes, I think this one and LoopTools will work well together. For instance this one could have an option to auto-generate vertex groups for the vert groups feature of LoopTools. That way, after building each patch with this tool the mesh could be edited keeping its curved shapes easily with LoopTools.

Also I was wondering if a surface modifier that builds surfaces out of curves (sketched or not) could be useful, or if that should be a job for NURBS. That would make things tweakable. The thing is that a surface modifier would generate geometry and you could not select the new vertexes from that generated mesh to build a new patch upon. Just quick thoughts.

Wrapit by Matt Clark is another example of innovative mesh editing, this time done in Max.
http://www.matt-clark.co.uk/spe.php?o=163

That’s a nice tool. Mostly the Branch tool. I was thinking on something similar, and have a couple of initial ideas, but didn’t get the time to develop them enough and see how they could be implemented.