Netvudu Posted May 16, 2012 Share Posted May 16, 2012 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? Quote Link to comment Share on other sites More sharing options...
zarti Posted May 16, 2012 Share Posted May 16, 2012 hi , this is a good example( HDA )to study and elaborate : http://www.2d3d.by/tools/15/ .cheers Quote Link to comment Share on other sites More sharing options...
Netvudu Posted May 16, 2012 Author Share Posted May 16, 2012 whoa! I didn´t know about this hda! I just started looking at it, but it´s terrific! Thanks zarti. This will certainly help a lot. Quote Link to comment Share on other sites More sharing options...
zarti Posted May 16, 2012 Share Posted May 16, 2012 (edited) 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 May 16, 2012 by zarti Quote Link to comment Share on other sites More sharing options...
Netvudu Posted May 16, 2012 Author Share Posted May 16, 2012 (edited) 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. 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 May 16, 2012 by Netvudu Quote Link to comment Share on other sites More sharing options...
twelveplusplus Posted November 21, 2017 Share Posted November 21, 2017 ohh, does anyone still have this file kicking around? the link seems to be broken... Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted November 21, 2017 Share Posted November 21, 2017 (edited) 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); book_flip_pages.hipnc Edited November 21, 2017 by konstantin magnus 5 1 1 Quote Link to comment Share on other sites More sharing options...
jon3de Posted October 12, 2018 Share Posted October 12, 2018 Thank you! btw. I did not know that its possible to use a link in the texture parm Quote Link to comment Share on other sites More sharing options...
Neyco Posted April 16, 2020 Share Posted April 16, 2020 I was interested to see the different methods.. Too bad the two first link are dead :/ Anyone can help in this? Quote Link to comment Share on other sites More sharing options...
eunchae Posted August 27, 2021 Share Posted August 27, 2021 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); 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. Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted August 27, 2021 Share Posted August 27, 2021 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. Quote Link to comment Share on other sites More sharing options...
eunchae Posted August 27, 2021 Share Posted August 27, 2021 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. Quote Link to comment Share on other sites More sharing options...
Librarian Posted August 27, 2021 Share Posted August 27, 2021 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) Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted August 27, 2021 Share Posted August 27, 2021 8 hours ago, eunchae said: How do I make it go left to right instead of right to left? If you dont want to change the code, you could simply append a mirror SOP and disable "keep original". Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.