Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

Author Topic: Braid script request  (Read 4008 times)

lynn22

  • Sr. Member
  • ****
  • Posts: 591
    • View Profile
    • 3D Animation
Braid script request
« on: January 01, 2011, 07:22:35 pm »

I have no idea on how to write a script and would be very grateful if anyone capable could write (if at all possible, of course) a script to build a braid or plait.

This would be very useful for all kind of purposes and not just hair braids.

I'm building this native American head because I very much like the noble stance of the man in the original photo.
I still have to figure out how to best build the overall hair mesh but I have already tried several ways of building a braid but nothing really works.
A script like the chainmaker from NickE, is the closest to resembling a braid but it needs a twist of 3 strands and chainmaker only simulates 2 strands.

The attached scanline renders are of the head mesh (not subdivided) to give you an idea.

Should anyone take this on, then many thanks in advance.
Logged

ADSohr

  • Full Member
  • ***
  • Posts: 181
    • View Profile
    • CGForStarters - An animation club
Re: Braid script request
« Reply #1 on: January 01, 2011, 10:02:49 pm »

Hey Lynn,

I can't write scripts, but here is a way you could model your braids.


1. Make a simple cube object, give it 12 divisions X and Y. Rotate it 45 degrees.

2. Delete all unnecessary vertices, leaving a structure like what is shown in "Type2_Step2". Fill in all the gaps that are left by deleting vertices.

3. Take the rows of vertices shown in yellow and merge them together. Move the merged vertices to line up straight in the X direction like shown in green.

4. Now shape the braids by selecting the edges that surround the braids and pulling them back along the Y direction. Go to Edit>Edge Properties, and make the edges creased. Double click the object in "Object" mode, make the crease angle 91*. This should make it nice and smooth with creases where the hair is folded under another braid of hair. Give it a material and show us what you come up with!

You can delete the edges on top and bottom, copy the object and move it along Y direction and join it to the original, then merge vertices. This mesh is seamlesly tilable, so you can make your braid as long as you wish.
Logged

lynn22

  • Sr. Member
  • ****
  • Posts: 591
    • View Profile
    • 3D Animation
Re: Braid script request
« Reply #2 on: January 02, 2011, 01:50:29 am »

ADSohr, many, many thanks. Your system works wonderfully, I'm over the moon !!

I made the basic block and copied 2 more just to get the feel. It's quite late here so the fine tuning will be for tomorrow.

Here's a sample :)

Thanks again
Logged

ADSohr

  • Full Member
  • ***
  • Posts: 181
    • View Profile
    • CGForStarters - An animation club
Re: Braid script request
« Reply #3 on: January 02, 2011, 02:24:05 am »

You are welcome. Yours actually looks better than mine!  :D
Logged

lynn22

  • Sr. Member
  • ****
  • Posts: 591
    • View Profile
    • 3D Animation
Re: Braid script request
« Reply #4 on: January 02, 2011, 04:09:57 pm »

About the hair in general, I tried several possibilities and none looked like hair rather more like a helmet. grrrrr

Solution building the hair strand by strand, pretty much like building a wig ;D)

In the old days, native Americans used to grease their hair so that would make it fall in strands and it also shows in the original photo.

This is what it will look like .... still some way to go though
Logged

headwax

  • Sr. Member
  • ****
  • Posts: 600
    • View Profile
    • Headwax's Website
Re: Braid script request
« Reply #5 on: January 06, 2011, 12:50:11 am »

hey Lynn, nice to see   such a good model. Have you tried transmapping? That's what most people do I think. Less vertexes for rendering. But there is the shadow  thing I guess. Anim8or shadows the whole object ratther then the transmapping from memory.

Have you seen http://www.stevenabbott.co.uk/Knots/knots.html.

This will generate 3d knots in obj format, worth a play. Might not give you braids but a lot of fun for designs etc

cheers from oz
Logged

lynn22

  • Sr. Member
  • ****
  • Posts: 591
    • View Profile
    • 3D Animation
Re: Braid script request
« Reply #6 on: January 06, 2011, 04:56:27 pm »

Thank you headwax.

I know about Knots, played around with it even before asking but with no good result for braids, though a good program in its own right.
ADSohr's modeling solution is the best. The mesh can be resized and shaped using Modifier as needed so the braids will look real  :)

Anim8or does indeed create shadows of the invisible parts of a transmap but even rendering in other software which ignores the transparent bits is not so good because there is no "volume". I have finally settled for modeled strands for the front part and a good hair texture and bumpmap for the flat parts leading to the braids. I think this will do the trick.

Anyone interested in "the making of..." A native American just follow this link.
« Last Edit: January 06, 2011, 04:59:47 pm by lynn22 »
Logged

kreator

  • Hero Member
  • *****
  • Posts: 1114
  • Anim8or, Blender, & Carrara. A Great Combination!
    • View Profile
    • Anim8orWorld
Re: Braid script request
« Reply #7 on: January 06, 2011, 07:22:27 pm »

perhaps this might interest you lynn
Logged
O

lynn22

  • Sr. Member
  • ****
  • Posts: 591
    • View Profile
    • 3D Animation
Re: Braid script request
« Reply #8 on: January 06, 2011, 11:13:47 pm »

Thank you kreator, it's a lovely model and I can picture it perfectly on a young, blond girl like you see in German fairy tales. Not aiming to be picky, it's just "too soft" for an indian.

Will come in handy though the day I decide to make Hansel and Gretel :)
Logged

lynn22

  • Sr. Member
  • ****
  • Posts: 591
    • View Profile
    • 3D Animation
Re: Braid script request
« Reply #9 on: January 10, 2011, 02:04:27 pm »

I just finished this project.
If you want to see the final result just follow the link mentioned three posts above this one ;)

Thanks for looking
Logged