Jump to content

Rigging a book


Netvudu

Recommended Posts

Hi there,

I´m researching a bit on how could I rig a book.

I found some interesting articles, such as this one.

Most of them use bones, or joints or sonmething similar for the pages turn.

I think, there should be a way to get an edge on this workflow using Houdini. I´m thinking on animating curves and THEN extruding them to create pages, for instance. This kind of tricks that are unique to us.

From the above tutorial I see that a deforming geometry could be used effectively for the thick of static pages. I´m still wondering the best ways to deal with a lot of flipping pages.

Any ideas, I might be overlooking so far?

Link to comment
Share on other sites

yes , thats awesome .

afair when i inspected that , it was more or less what you ' pre-thinked ' in the first post .

glad i could help .. ( * by simply posting the link ) =)

.cheers

--

edit:: * added a tiny clarification to avoid any miss_understanding ..

Edited by zarti
Link to comment
Share on other sites

Yep, looks like I was on the right track with the animated curves being extruded, but this Alexander Antoshuk guy has gone a lot further. :blink: He´s smart!

I love the shaping of the thickness as well as the pages interval parameter.

There´s a lot to be learnt from this asset.

Edited by Netvudu
Link to comment
Share on other sites

  • 5 years later...

You can also wrap pages by offsetting rotations a little for every page.

// PARAMETERS
float start = chf('start');
float touch = chf('touch');
float speed = chf('speed');
float flip  = 1 - chf('flip');
vector fade = relbbox(0, @P);

// POSITION
@P.y -= vector( getbbox_size(0) ).y * 0.5;

// WRAP PAGES
matrix m = ident();
float copy = ( ch("../copy1/ncy") - prim(0, "copynum", @primnum) ) * flip;
float t = @Time * speed - start - copy + sin( fade.x ) + fade.z * touch;
rotate(m, smooth(0, $PI, t) * $PI, {0, 0, 1});
@P *= m;

// TEXTURE COORDINATES
v@uv = set(fade.x, fade.z * -1, 0);

pages_screen.jpg.15acb9972c771e1e3e917f9b1c1baf3c.jpg

book_flip_pages.hipnc

Edited by konstantin magnus
  • Like 4
  • Thanks 1
  • Haha 1
Link to comment
Share on other sites

  • 10 months later...
  • 1 year later...
  • 1 year later...
On 2017. 11. 21. at 7:02 PM, konstantin magnus said:

You can also wrap pages by offsetting rotations a little for every page.


// PARAMETERS
float start = chf('start');
float touch = chf('touch');
float speed = chf('speed');
float flip  = 1 - chf('flip');
vector fade = relbbox(0, @P);

// POSITION
@P.y -= vector( getbbox_size(0) ).y * 0.5;

// WRAP PAGES
matrix m = ident();
float copy = ( ch("../copy1/ncy") - prim(0, "copynum", @primnum) ) * flip;
float t = @Time * speed - start - copy + sin( fade.x ) + fade.z * touch;
rotate(m, smooth(0, $PI, t) * $PI, {0, 0, 1});
@P *= m;

// TEXTURE COORDINATES
v@uv = set(fade.x, fade.z * -1, 0);

pages_screen.jpg.15acb9972c771e1e3e917f9b1c1baf3c.jpg

book_flip_pages.hipnc

Hello. Thank you so much for sharing. I have one question. How can I adjust both left and right? I don't want to use animation, I just want to create a feeling of fluttering left and right (?). Please advise. thank you.

Link to comment
Share on other sites

1 hour ago, eunchae said:

How can I adjust both left and right? I don't want to use animation, I just want to create a feeling of fluttering left and right

Hi hongjo,

you can spread the pages more by lowering the "flip" parameter. Other than that, this particular setup does not enable turning pages individually depending on whether they are left or right.

Link to comment
Share on other sites

1 hour ago, konstantin magnus said:

Hi hongjo,

you can spread the pages more by lowering the "flip" parameter. Other than that, this particular setup does not enable turning pages individually depending on whether they are left or right.

Thank you for answer. How do I make it go left to right instead of right to left? thank you.

Link to comment
Share on other sites

from math import sin
from math import cos
from math import pi

def book_line(geo,numvtx=6,thicknes=0.0,time = hou.time()):
    curve = geo.createNURBSCurve(numvtx,0)
    for i,vertex in enumerate(curve.vertices()):
        angle = i*(0.5 *pi)/numvtx
        pos = (min(angle,sin(angle)+time),thicknes-min(0,cos(angle)+time-1),0)
        vertex.point().setPosition(pos)
    return curve
    
geo = hou.pwd().geometry()
for i in range(200):
    time= hou.hmath.clamp(hou.time()-0.1*i,0,1)
    time = time *time
    book_line(geo,8,0.001*i,time)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...