THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/10/2004 at 20:22, xxxxxxxx wrote:
Cinema 4D Version: 8.5
Platform: Mac OSX ;
Language(s) : C.O.F.F.E.E ;
I've just worked out the topology of the 3-stand tapered hair braid, the trouble is that I've never scripted anything in C4D before and it took me the better part of an hour to enter in all the spline points and handle data by hand, working with my trusty TI-85 calculator. I know there has to be a better way. What I'd like to ask is: Is COFFEE the answer? I'm a Java/C++ programmer by trade, but I'm a little ashamed to say I've never even looked into the capability of COFFEE, mostly because I do enough coding already that when I get 3D modeling assignments, I welcome the change of environment! :-) If COFFEE can help with this task, could some one point me to a suitable tutorial or sample script, like one that works with splines already perhaps?
Here is the braid I made the hard way:
I need to articulate this to, to make morph positions for the braid, so I'm hoping a coding solution can help with that too.
On 22/10/2004 at 02:09, xxxxxxxx wrote:
I think for this a combination of Xpresso and C.O.F.F.E.E. might be the easiest. Xpresso to iterate through the points of the splines and a C.O.F.F.E.E. node to do the math. (Or several Xpresso math nodes if you can be bothered.)
On 13/12/2006 at 08:40, xxxxxxxx wrote:
hi..does anyone know how to accees the hair material tag using coffee to access hair color,frizz,wave etc... so that you could set data using coffee to style hair with a click of a button??
On 13/12/2006 at 12:26, xxxxxxxx wrote:
Some time ago I started to develop a braid spline plugin too. I would say the easiest way is to use the C++ SDK especially if, as you stated, you already know C++. There is a good spline plugin example in the SDK examples that come with Cinema4D. Here a screenshot what my braid looked like.
On 13/12/2006 at 21:21, xxxxxxxx wrote:
hi thanks alot for ur reply...i'm trying to develop the plug in using COFFEE only, this is what i could come up with so far...this is good enough to grow the hair on any given object, but i dont know how to set data to change hair color,frizz, wave etc.. so that i could give it a hair style...is it possible to use coffee and do this? i'm very new to C4D and coffee..as far as i have realized we need to change the texture tag to material tag to set the hair material data..let me know , if u know how to make this possible, to change the parameters under the hair material tag ...This is enough to grow hair..but cant change colour,frizz etc...
var doc = GetActiveDocument();
// Activates the bump channel for a material
var mat = doc->GetFirstMaterial();
// Sets a texture for it
//var color = mat->GetChannel(CHANNEL_COLOR);
//var colorBc = color->GetContainer();
var hobj = AllocObject(oHair);
var hcon = hobj->GetContainer();
var tobj = doc->FindObject("Cube");
// Insert a NURBS object
if(!doc->InsertObject(hobj, NULL, NULL)) return FALSE;
//new - texture
nam = hobj->GetName();
// var mat1 = vDoc->FindMaterial("Rail");
var mat2 = doc->FindMaterial("Hair");
tag = hobj->GetFirstTag();
ma = mat2->GetMarker();
tag = tag->GetNext();
} //while end