Freebie: A Few Books By The Cheapskate...

  • @3dcheapskate no, that's an unfortunate drawback of the Dependency Editor. It can create new valueOperations, but will always default to Keyed, if there are no other valOps in the list. If you already have a deltaAdd dependency, then selecting that will allow the Start Teaching to create new deltaAdd valOps.

    Most of the time, I resort to manually creating deltaAdds in the Python Shell

    valOp = parm.AddValueOperation(poser.kValueOpDELTAADD,srcParm)

    where parm is the slave parameter, and srcParm is the master. Adjust the delta value as required, and that's all that needs to be done.

  • Pythons don't have shells - you must be thinking about snails...
    (unless they're hermit pythons perhaps?)

  • I'm slowly* beginning to see what anomalaus has been talking about. Making a stack of books out of multiple copies of a single book prop and slaving the parameters of books 2, 3, etc, to book 1 does appear to work - but not in Poser 6 (which is where I think my brain is stuck and a large part of my confusion lies).
    I also installed Parmatic ages ago, but I did that in Poser 6 too (I didn't see anything specifying the minimum Poser version on bagginsbill's Parmatic page ). But manually (using an old 'Rename Node' wacro) trying to rename material nodes to start with 'PM:' didn't work because the ':' was automatically changed to a '_'. So I got side-tracked onto something else... and promptlyforgot about what trying Parmatic.
    So what's the minimum version of Poser for Parmatic ?

    I've also just found a thread here at SM about Animating Shader Values via Python which I need to read a few times.

    *Yes, I'm very slow. I remember the best boss I ever had telling me that I had two speeds - dead slow and stop. My immediate reaction was "Oh lord, I've been working too hard!" ;o)

    Personally I never go near the Python shell. The combination of my dodgy keyboard, my cack-handed typing skills, and my wonky brain mean that I never, ever (... ever) get things right first time. Even if it's only two lines I always write a script and save it, check it a few times, correct it, resave it, and finally run it. Then I look at the inevitable errors in the debug window and correct it, resave it, rerun it... repeat...)

  • Sidetrack: CDs or DVDs.
    Over on the ShareCG page for the most recent upload I've had a request for a row of CDs/DVDs.
    The Minimalist Paperback (07MPB - 8 vertices/6 faces per book) with xScale=49%, yScale=71%, and zScale=133.5% makes each 'book' the standard CD/DVD case size (i.e. 0.9 x 12.5 x 14cm) which might suffice for background stuff. A white (or black) line around each spine on the texture might suffice to give the impression of a white/black plastic case.
    But I can't help wondering if I can do something to a bit better.
    So start with a box inside a box, putting the existing bookrows texture on the inner box, and doing something to make the outer box look a bit more like transparent plastic.
    Here's three identical box meshes with the same mat on the inner box.

    • The leftmost one uses 0.5 transparency on the outer box. Unrealistic.
    • The middle one uses bagginsbill's beerglass mat on the outer box. Inner box is in shadow of outer- unrealistic.
    • The rightmost one is the same as the middle one, but with 'Cast Shadows' UNticked. No shadow at all- unrealistic.
      Different problems with each.
      Any thought, comments,suggestions very welcome.
      0_1548222440881_Render 1.jpg

  • A bit more playing with the CD/DVD,basically separating the case from the inner bit to get around that cast shadows thing.
    Thoughts, comments ? Yes, it does look like a huge block of perspex with stuff embedded in it !

  • Back to the books. I thought I had it sorted - using multiple single-book props, using a master dial on the first book to define a global V_Offset into the texture map, individual (slaved) dials on each book to define individual offsets from the global one, and Parmatic to update the actual V_Offset values in the Image_Map material nodes.

    Four slightly modified versions of my single HardBack with Joint prop (07HB+Jx01.pp2) with the second, third and fourth parented to the first. Saved as a single prop (from PP2014). I tried to include the PP2 for all four books (1726 lines including the final blank) inline in this post, but it's too big (the post editor doesn't tell you that until you click 'Submit'. I'll find an alternative place to upload it and post later to tell you where it is.

    The modifications are that

    1. the BOOK_0_TO_31 and COLUMN_0_OR_1 nodes in the materials are now Parmatic nodes (i.e. prefix 'PM:' attached)...
    2. ...and each book has the corresponding PM:BOOK_0_TO_31 and PM:COLUMN_0_OR_1 dials in its parameters tab
    3. There is a 'BookOffset_0_to_32' dial in the parameter tab of book 1 only (07HB+Jx01_1) to which all four books' PM:BOOK_0_TO_31 dials are slaved with a deltaAddDelta value of 1.

    A picture speaks a thousand words, so here's a picture. Annotated with some extra words of explanation.

    So, starting from where the annotations on that picture end...

    In PP2014 I change 'BookOffset_0_to_32' from 0 to 10.
    The PM:BOOK_0_TO_31 dials in the parameter tabs of all four books change correctly.
    (The PM:BOOK_0_TO_31 in the matertials don't change because I haven't run parmatic yet)
    First book selected, run Parmatic Updater, render... big surprise, it's exactly as before!
    Weird. Go to the Material Room - PM:BOOK_0_TO_31 shows as 10,the correct value for the first book. Go back to the Pose Room and render - the first book is now correct.
    Hang on, this smacks of an old material-not-updating-unless-you-manually-enter-and-leave-the-material-room problem...
    Select the fourth book, go to the material room, value is 13 which is correct, go back to the Pose Room, rerender- fourth book is now correct too.
    If I try to be clever and go back into the material room with the fourth book selected,and in the material room select the third book and then the second book I see that they both still have the wrong (i.e. the old) values, but when I return to the Pose Room and rerender one of them is now correct.
    Oh Lordy !

  • I've started a separate thread here on the SM Poser forum for the fun I'm now having with CDs and DVDs - Rows And Rows Of CDs/DVDs - Trying To Make A Simple Model For... - s I can avoid cluttering upthis thread with stuff about transparency.
    I haven't seen many transparent books. :o)

  • The prop file mentioned in the post before last (FourBooks.pp2) is now uploaded to the relevant DAZ thread at this post

  • A slight aside:
    If anyfoolbody is interested I've uploaded the current (and probably last) incarnation of the ropey script that I was playing with 13 days ago. It does what I wanted - it even lets me select not-the-current-actor as the master (I can't believe how many times I had the wrong actor selected when I ran it)

    It's now at ShareCG and it's called 'AddDeltaAddDeltas'... because it's purpose is to add deltaAddDeltas.

    It's probably the ropiest script I've uploaded - I didn't even do the usual 'tidy it up a little bit because we have visitors'.

    (In truth the main reason I uploaded it was so that I could do a picture of a python with sunglasses)

  • I was a bit bored today and I started playing with a book that opens. It's a simplified version of the mesh in one of the very early posts - a hardback with a flat spine.
    0_1549285692106_Render 1.jpg
    Here's the bone setup:
    Other than the leftmost one (pointing down 45°, which has no attached geometry) each bone is associated with all the faces of a specific colours. I have 'Bend' UNchecked for all bones because I want it as simpleaspossibletostart with.
    The spine (green) and rear joint (cyan) are not actually connected to each other, and I had to fiddle around with the zRots of the joints and spine to give the impression that they are.
    The zRots of each bone were set manually for each of the four books, which is a bit of a pain. A master 'Open Book' dial on the Body that slaves the zRots of each of the four page blocks (plus rear cover) would be nice, and that should be straight forward to do with my +δ+Δ script (I knew there was a specific reason that I wrote that garbage! ;o)
    However, working out sensible delta values (or something else?) for the joints and spine may be a bit more problematic...
    In the back of my mind is the hydraulic piston example in B.L.Render's old tome - I'm wondering if I may be able to make the spine bone 'point-at' the end of the rear joint bone.

  • I think it's basically a simple maths problem...
    Mwa! Ha! Ha!
    (Not sure if you can solve it with deltaAddDeltas...)

  • So far I've worked out that the length of the yellow and cyan lines must be at least 0.182* times the length of the green line (which is the same as the black line) to avoid a hole in the UFO...

    *n = ½ × L × ((π-2)/π) ... but I've probably got that wrong !

  • @3dcheapskate "Klaatu barada nicto!"

  • That can't be pure coincidence can it ? Thinking about opening a book, and an image of an alien spacecraft appears,followed by the words "Klaatu... barada... ? ... ? ... ? nectie ?"

    Anyway, back to opening the book. I used my +δ+Δ script (after a quick edit to show bodypart actors in the selection lists) to slave the zRots of the four page blocks and backcover to an 'Open Book' dial in the Body and then tried it out, spotting a few mistakes in the process:
    Mistake 1: It would probably be sensible to have the basic book model lying flat with its back cover on the floor
    Mistake 2: The bones should probably start at the back cover,not the front cover.
    Mistake 3: The 'OpenBook' dial should be positive. Not sure whether the range should be 0-180 (i.e.degrees) or 0-1.0 (i.e. closed to fully open)

    I then manually fiddled with the zRots of the joints and spine... those values don't look too promising:

  • Bashed the base mesh about a bit in Blender so it now loads lying flat on its back cover and the joints are lined up with the covers. I set up the same bone structure except that it now starts at the back cover. I set up the 'Open Book' master dial - a value of 1.0 now opens the book by 180 degrees. And I immediately spotted...
    Mistake 4: In the first setup the back cover and back joint were both parented to the fourth page block. Here I parented the front cover and front joint to the first page-block. When I opened the book the front joint remained aligned with the first page-block, not the front cover. So I reparented the front joint to the front cover. That mistake explains why the yellow and cyan numbers that I manually set a few posts back weren't the same.
    0_1549373021020_Render 1.jpg
    Time to play with the yellow and cyan numbers again,but this time I'll be making the green spine 'Point At' a dummy bone attached to the back joint.

  • Just to see... I slaved FrontJoint zRot to BackJoint zRot with a delta of -1 (so both joints bend the same) and then tried a few settings (spine is using 'Point At' as mentioned before)...
    Using a delta of 130 for slaving the BackJoint zRot to the 'Open Book' dial gives a reasonably good result,with just a small gap/overlap appearing between the spine and back joint.
    I think I'll need to fix the rotation centres before going any further though.

  • Closed books are much easier than opening books.
    0_1549643034641_Render 1.jpg

  • I've added RandomSizeOdd/Even and RandomSpineWidth morphs to the Shift (which moves random books sideways and back-and-forthby a randomish amount) and Rotate morphs used in the previous render:
    0_1549682197962_Render 2.jpg
    0_1549682206495_Render 1.jpg
    I think the Rotate morphs need to be a bit more random - too many rotated books appear to line up perfectly as if rotated by an anally retentive randomizer ! I also used a single 'Rotate' morph - I think separate 'RotateOdds/Evens' morphs would help here.
    (I also noticed a mistake I made when making randomish books bigger/smaller: I scaled individual books about their own centres, which would have been fine for the 8v/6f paperback - but the centres of the curved-spine hardbacks are much closer to the spine)

    I've decided to use the 64-book single prop approach, with each book having its own geometry. The problems I ran into with using groups of single book props, and with using a figure with each book being a separate bone, mean that those approaches will take a lot more thought and time for me, and my brain's wearing out. So despite the drawbacks I'm going with this approach for now.

    The main drawbacks are, as mentioned in previous posts, to do with the linear nature of morphs not really being appropriate for rotations. E.g. I'd like to be able to turn some books upside down, and rotate some so that spine is at the back, but morphs to do that don't work in conjunction with the rotation ones.

    My intention is to produce 6-, 32, 16, 8, 4, 2 and 1(?) book stack props for each of the 5 basic book meshes. But I don't think I'll try to release them all in one go - too dangerous for what's left of my sanity !

    After that maybe individual, non-morphing, more realistic rows,stacks, and piles of books

  • Well, it's been three months... I think I got distracted, or something like that ?

    I totally forgot about the books for a while, then spent a bit of time on and off doing trigonometry with valueParms to get aleaning book to automagically move itself (and all subsequent books) correctly as you lean it (zRotate). The showstopper is that there's no way to do a conditional. And my brain can't be bothered with scripts at the moment.

    Anyway, a couple of days ago I found myself leaning books against each other in Blender in a painstaking, laborious, tedious, manual way. "There must be a better way" I thought. That's when I found the BlenderGuru "

    " video.
    After a few hiccups* I found myself

    0_1556540880734_Render 1.jpg

    *My book OBJs are Poser scale, so tiny by Blender standard. Importing into Blender and scaling up to around 1 Blender unit size I had the common 'stuff dropping through the floor' problem. I found that I needed to import, scale up, then export the scaled up book and reimport that new OBJ to get round the problem.
    Also using the default 'Convex Hull' shape gave me unrealistic gaps between the books - using 'Box' fixed that.
    A few Blender hotkey reminders for next time:

    • Ctl-Shft-Alt-C to set the origins of all selected objects to their individual centres of gravity.
    • Alt-A to start a simulation (I always forget how to do that!)
    • P (in edit mode) to separate a mesh into separate objects

  • This post is deleted!