# Any Xpresso wiz kids

 02 February 2018 ThePriest Bad Ass   portfolio Stuart Townsend Environment artist Berkeley, USA Any Xpresso wiz kids I've tasked myself with something relatively challenging in Xpresso and could use some help, please. I have 4 rectangles (spline primitives) and in total they have to make a grid that's 1920x1080. Actually, their max size is defined by a range mapper @ a 1 to 0.1 scale. So 192 x 108. Just to keep things viewport friendly. When I scale 1 rectangle, the others scale to fit, staying within the 2k parameters. There needs to be a padding of around 2cm for each to prevent intersections. Sounds like a straight forward mathematical challenge, but I'm literally getting my wires crossed (or nodes in this case) in my first attempt. Not looking for a quick fix file, unless you're willing. But some pointers would be helpful. Thanks. __________________ ۩PRIẽST Last edited by ThePriest : 02 February 2018 at 05:19 AM. share quote
 02 February 2018 Jops hyper nerd Florian Sepp Germany I am not shure if I understand what you want do do. What I understand is that you want 4 rectangular splines layed out in a square with 2 cm spacing in between?  you managed to link the size of the four primitives (you also could take one primitive and 3 instances) now you have to position them. basically you have to read out the width and the height of the square. devide it by 2 and ad 1 for the two cm distance between. and then you put the result into the x,y or z position. which ever you need. And for the right and lower square you have to multiply the distances with-1 to get a negative result. I really have no idea if that is what you needed best regards Jops share quote
 02 February 2018 noseman 3D nosey   Athanasios Pozantzis C4D Evangelist & fanboy - Certified C4D Trainer Noseman productions Toronto, Canada Hey Stuart, can you please post a sketch of what you're trying to do. Cheers __________________ Follow me on Twitter@nosemangr - Watch me on Noseman's Youtube Channel share quote
 02 February 2018 JoelDubin Lard of the pots portfolio Joel Dubin Creative Director MadMicrobe United States Might be a dumb question, but could you just make the 4 rectangles children on the camera? That way they would always stay locked to the screen dimensions? share quote
 02 February 2018 LukeLetellier Work in Progress   portfolio Luke Letellier Portland, Maine, USA I think I know what you need, and am working on a setup. Easier to make than explain in text... share quote
 02 February 2018 LukeLetellier Work in Progress   portfolio Luke Letellier Portland, Maine, USA Is this what you were after? Scene File: https://www.dropbox.com/s/lsmfyw3dp...soGrid.c4d?dl=0 Last edited by LukeLetellier : 02 February 2018 at 04:02 PM. share quote
 02 February 2018 ThePriest Bad Ass   portfolio Stuart Townsend Environment artist Berkeley, USA Thanks for trying Luke, appreciate that. What I was getting at is, as suggested, best explained with an image. If any dimension in one box was changed, then the other boxes would scale, but remain within the parameters, with a permanent padding of 2cm. So for example, if the top left box needed to 1800cm across, the top right box would automatically scale to be 120cm And if the top left box was thin, say 200cm in length, both bottom boxes would occupy the remaining 880 cm __________________ ۩PRIẽST share quote
 02 February 2018 Mike Abbott ... Mike Abbott United Kingdom thinking outside the box... sorry... How about: Make 4 boxes 1920 x 1080 - arrange in your starting grid with padding as needed - so they'll look like the first section of your diagram - but they will be 3,840 x 2160 + padding overall Drop this arrangement, centred into a boole with a cutter box that measures 1920 x 1080. Then animate your arrangement. Even better? Same idea but with  spline mask + extrude? share quote
 02 February 2018 LukeLetellier Work in Progress   portfolio Luke Letellier Portland, Maine, USA Ahhh, I see. Do they have to be primitives?  One tricky aspect with doing this via xpresso is that in this scenario you need to have multiple data elements that are affecting each other. Manually change A, and it changes B. Manually change B, and it changes A. AFAIK, Xpresso primarily works in a one way relationship: A ---> B or B ----> A, but not both simultaneously.  This might be a better job for a python generator object. share quote
 02 February 2018 noseman 3D nosey   Athanasios Pozantzis C4D Evangelist & fanboy - Certified C4D Trainer Noseman productions Toronto, Canada In my example scene, you use Rect 1 and 4 to control 2 and 3, but if 1 and 4 overlap, you have to fix it manually. In order for your setup to work 100% automatically, you need to add some programming logic, so that if 1 and 4 overlap either horizontally or vertically, then you have to chose if you want horizontal alignment or vertical alignment. Your Top right sketch has a vertical line and the bottom left has a horizontal one. You can setup the XPRESSO setups to use one of the other. For now, you can use this semi automatic setup. https://www.dropbox.com/s/zcyb5bd7g...%2002A.c4d?dl=0 __________________ Follow me on Twitter@nosemangr - Watch me on Noseman's Youtube Channel share quote
 02 February 2018 noseman 3D nosey   Athanasios Pozantzis C4D Evangelist & fanboy - Certified C4D Trainer Noseman productions Toronto, Canada A couple of things I forgot to mention: 1. There are some minor priority issues, so you may need to press "A" to refresh 2. On the "Center of View" Null, you can control the overall area. Currently, it's set to 1920 x 1080. 3. Changing the "Center of View" values, will recalculate sizes and positions for all rectangles. __________________ Follow me on Twitter@nosemangr - Watch me on Noseman's Youtube Channel share quote
 02 February 2018 JoelDubin Lard of the pots portfolio Joel Dubin Creative Director MadMicrobe United States I set this up with 4 tracers and constraints. It needs some additonal work (an additonal controllerand constraints targeting the nulls you would move if you needed to just move the 2 top rectangles left and right, etc) but might help? Move the left/right and up/down controllers to move nulls driving the traced rectangles https://www.dropbox.com/s/kj3rg32f9...%20rig.c4d?dl=0 share quote
 02 February 2018 IceCaveMan Expert portfolio Craig Wall USA Originally Posted by JoelDubin: I set this up with 4 tracers and constraints. It needs some additonal work (an additonal controllerand constraints targeting the nulls you would move if you needed to just move the 2 top rectangles left and right, etc) but might help? Move the left/right and up/down controllers to move nulls driving the traced rectangles https://www.dropbox.com/s/kj3rg32f9...%20rig.c4d?dl=0 Very clever Joel. I say you bested the NoseMan, which doesn't happen often around here.  ;-) This thread makes me think of this plugin: https://www.curiousanimal.tv/shop/grid/ __________________ C4D R19 Studio, MODO 902, VRAY, Octane, Cycles. PC/Mac. share quote
 02 February 2018 ThePriest Bad Ass   portfolio Stuart Townsend Environment artist Berkeley, USA You guys are awesome, really appreciate the feedback and files. __________________ ۩PRIẽST share quote
 02 February 2018 noseman 3D nosey   Athanasios Pozantzis C4D Evangelist & fanboy - Certified C4D Trainer Noseman productions Toronto, Canada Originally Posted by IceCaveMan: Very clever Joel. I say you bested the NoseMan, which doesn't happen often around here.  ;-) Initially I was "noooooo... how could that happen?". Then I saw it was Joel... ok, that makes sense. And then I remembered, I very often get bested but nobody notices... and then I saw the limitation: Joel's only makes crosses.... I feel much better now :-) __________________ Follow me on Twitter@nosemangr - Watch me on Noseman's Youtube Channel share quote

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off CGSociety Society of Digital Artists www.cgsociety.org Powered by vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.