This script creates a loft mesh out of bezier curves and mantains its form if we modify the curves.
It consist on 2 scripts: Loftv4.txt to create the mesh pydriver.py to modify the mesh if we change the curves control points.
To make this work we have to:
1.-Create a new blender scene
2.-Open Loftv4.txt and pydrivers.py on a Text Editor window.
3.-Register and run pydrivers.py
4.-Create at least 2 or more bezier curves and select them
5.-Run Loftv4.txt
Now we can modify the curves and the mesh will adapt to the curves.
Optional we can change spans and steps at Loftv4.txt (lines 185, 186) to create more defined meshes.
This was tested on 2.56.3 rev35566 but should work on older builds.
Note: fixed linear interpolation on pydrivers.(if we use only 2 curves) 26/03/11
Sure thing, its all controled by a custom driver. If we want to break the dependencies on the curves just select the curve, go to objects custom properties and delete the property ‘driver’, i think this may raise some errors if we touch the other curves at this moment.
Yes i was a maya user too, i did this thinking about the maya’s birail tool but loft was easier to implement. Im working on birail right now.
Theres written different types of interpolations but not yet implemented.
Those are:
linear (automatic if we only have 2 curves)
natural cubic
catmull
and hermite with tension and bias.
We can play with them if we change ‘tipo’, ‘tension’ and ‘bias’ at line 33 at pydrivers.py
If we change pydrivers.py remember to register it again by runing the script (register checked)
Interesting script, especially how you implemented the live updating part. As you said, there’s a lot to do, but it’s a very nice start.
Some things I noticed that weren’t mentioned yet:
Cyclic beziers don’t have the cyclic segment lofted
The order in which the beziers are connected seems to depend on the order of creation (bezier names?). It would be nice if it depended on the locations (or even rotations) relative to each other.
A small addition could be to optionally loft the first and the last bezier
How are you licensing the script?
Let me finish by repeating myself: very interesting script.
Hi Crouch, ive took a look at yours loop tools, very impressive work.
-Cyclics are not taken in account.
-The order comes from bpy.context.selected_objects way to sort the objects, as you said i guess its time creation order.
-Its not licensed at the moment, feel free to use or modify it in any way as long as you share the changes.
Theres a lot to do yet, create panels and operators for functionality and debug errors.
can sonone make the difference getween this and NUrbs sufaces
i mean we are going to get some new Nurbs tools soon hopefully
which is supposed to include a loft tool in it!
but still interested to compare Nurb surface and this loft thing!
it is still interesting to see loft with simple bezier
also should this work also with simple poly curve or must be bezier only?
i’ll test that later this night !
there has been a lot of discussion over the years about different ways to build accurate terrains from contour lines in blender - this script brings us a lot closer to a good solution!
i am excited that the script does not require beziers to have the same number of points - and they can be edited after creation of the surface.
and also that the loops of the surface follow the original beziers - great
this could be making the architects a bit excited!
bart, i have yet to try your bridge and loft, but it looks like that script will also be very useful for terrains
I was wondering if it might be possible to go the other way around.
Once a hook is applied to a curve, it shows up as a modifier on the stack of the self.
So something like this can get us to the modifier…
import bpy
name = "BezierCurve"
myMOD = bpy.data.objects[name].modifiers[0]
print(myMOD.type)
print(dir(myMOD))
This code assumes the hook is the first modifier on the stack and the self/curve is named BezierCurve.
I was hoping the hook modifier itself might know what bezier point it was attached to, but I am not sure how to proceed after examining the output from the print(dir()). Perhaps that information needs to be exposed by the modifier via the API?
On a feature request note, multiple curves support would be nice to add.
Here is the result of the v4 script run on a font wing ding converted to a curve.
Well with that trick i can recreate the curve but only if the empty is placed at the same position as the point affected.
If the empty has any offset or it is handling multiple points it will not work.