As given from Script ReadMe:
You'll want to use the associated beziercurvedataread.py script
in Blender. Select the associated Bezier Curve which should be named
"BezierCurve" or modify the script for your associated name on line
3 of the script.
Make sure that the Blender console is open (Windows users can do this
with a Top Menu Bar Window>Console for toggling the console visible). Linux users can enable the console by going to the path directory of the Application
by Terminal and launching blender with a terminal command "./blender"
or "./Blender"
Use Blender's TextEditor with application open, and choose 'Run Script'
There are three containers of data that need be copied and pasted into
the Processing script called BezierAnimation.pde
But first you'll need to prepare data so that it is properly formatted
as an input
The data should be, for instance in a format that reads something like this:
{new PVector(1.0,0.0,0.0), new PVector(x.x,x.x,x.x), ...}
where the x.x shown is some float given from the data inputs of your bezier curve
But our output is written in the format:
[(x.x,x.x,x.x), (x.x,x.x,x.x),...]
So you'll need to change this. You'll need to use your favorite text editor and copy and paste
for each data set in the form [(x.x,x.x,x.x), (x.x,x.x,x.x),...]
this into the text editor (new file). You'll copy the data for each
data set which is given in the Blender Console (just toggle it visible
and scroll as necessary with the given data lines shown in view).
In your console you should see something like:
....
[(x.x,x.x,x.x), (x.x,x.x,x.x),...]
[(x.x,x.x,x.x), (x.x,x.x,x.x),...]
[(x.x,x.x,x.x), (x.x,x.x,x.x),...]
....
Paste the data sets into your text editor program and use a 'find and replace' function that should
exist for your text editor and search the string "("
and for the replacement string input "new PVector("
Next you'll need to change in [(x.x,x.x,x.x), (x.x,x.x,x.x),...]
"[" to "{" and "]" to "};"
So your new data set should like
{new PVector(x.x,x.x,x.x), new PVector(x.x,x.x,x.x),...};
The data sets in the form [(x.x,x.x,x.x), (x.x,x.x,x.x),...]
are for the PVector[] points, PVector[] lpoints, and PVector[] rpoints
respectively.
so you'll need to copy each data set (after modifications given above)
and paste these after the "=" of each of PVector[] points, PVector[] lpoints, and PVector[] rpoints in the associated bezier processing(language) script that I've written called 'BezierAnimation.pde'
Make sure that each of these lines ends with a ";" as stated with
given form that I've indicated post modifications.
So the appropriate lines of 'BezierAnimation.pde' should look like:
PVector[] points = {new PVector(x.x,x.x,x.x), new PVector(x.x,x.x,x.x),...};
PVector[] lpoints = {new PVector(x.x,x.x,x.x), new PVector(x.x,x.x,x.x),...};
PVector[] rpoints = {new PVector(x.x,x.x,x.x), new PVector(x.x,x.x,x.x),...};
Then run the processing script in your processing IDE environment.
My processing(language) includes both path tracing animations as well as full curve drawing.
For the full curve drawing just enable variable:
showTrack = true;
My program is designed in tracing and rendering a closed cyclic Bezier curve.
Handy Blender Hot key and procedures:
In Edit Mode:
'a' to select all vertices (on the bezier curve)
Extruding points from a given selected vertex (at its anchor point):
Shift + Left Mouse Button Click
Creating a bezier curve segment between two unconnected anchor points on the bezier curve: Select both curve points using Shift + Right Mouse Button, and the hit 'f' (for fill).
No comments:
Post a Comment