A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
adjustable beam using xpresso
Posted: 12 February 2013 02:59 PM   [ Ignore ]  
Total Posts:  20
Joined  2006-12-18

I have a waler (beam) which I’d like to adjust the size of and have it change the components dynamically

Essentially - I want to be able to extend the length of the waler and have it move the other components accordingly.  Those other components stay at the ends of the waler - but I have used a cloner to replicate those objects. 


I’ve set the waler up as an extrude NURB so I can change it’s length, but the boole I use to cut out in two places won’t follow. Neither will the other parts - which i set up as a cloner to allow me change the spacing.

Example - the beam is 20’ long - and say I want to change it to 25’ long.  I’d like to use expresso to change that and not worry about repositioning anything else.

It also stands that I need only about 4 different sizes, but I know I can do this with expresso so I’d like to see how…


Thanks for any advice…

Scott

File Attachments
Waler.c4d.zip  (File Size: 70KB - Downloads: 209)
Profile
 
 
Posted: 12 February 2013 03:27 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Scot,

The Movement parameter of the Extrusion is the main value.

The situations on both ends have in this way a fixed situation.

You can work of course with Cloner Objects, but then I would use an other approach.

You can use two polygon Objects as “Matrix” for the positioning of the two ends. One is static as it needs no movement the other one is connected to the “Movement” parameter via XPresso.
You need to get half the size of the components to place them away from the end. The first one set manually then the other one (which moves) in exactly the distance of the “Movement” subtracted by the component length. (Two half) In that way everything should follow. You need to place both Polygon objects under a Connect Object and that Connect Object will be used as Mode>Object in the Cloner object.

In the example, adjust first the Polygon in Z, then the Constant in XPresso Editor, after that adjust the movement of the Extrude. I have set it up roughly, so the Movement of the Extrude works already.

All the best

Sassi

File Attachments
CV2_r14_drs_13_XPmg_01.c4d.zip  (File Size: 79KB - Downloads: 226)
 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 12 February 2013 04:13 PM   [ Ignore ]   [ # 2 ]  
Total Posts:  20
Joined  2006-12-18

Okay - so if I follow what you’re saying:

I could take out my cloners, and just use plain ‘ol objects.  I set it up that way, thinking that it would be easier for Xpresso, but on further deliberation - I suppose I don’t need them.


I should keep one end and it’s pieces static - therefore only moving the objects at the other end of the extrusion.  Those moving objects then just follow the end to whatever value I want?


I’ve been trying to set-up some of my xpresso frame work, but because I am very -VERY- green at the xpresso part of C4D I’m really at a loss for where to even start. 


It’d be nice to see a tutorial on this concept. Pretty sure there is - but I feel what I’m trying to do is pretty basic and simple.

If I can’t figure this out, I may trouble you for a sample… 


Here goes….

Profile
 
 
Posted: 12 February 2013 04:25 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hey Scott,

I had already attached an example. In XPresso it is a simple math. The distance (middle point to middle point of the objects is normally:

Extrude Movement - Element Length = distance between the two elements (dbtte).

As the first element is fixed and only the second element moves. We can place a polygon on the start position and need only the (dbtte). As this is a beam in Z, we use the z direction to move the second polygon about (dbtte) away.
The polygons become one object in the Connect Object and that is then useable in the Cloner Objects (Polygon center)

I hope that helps, other wise make a sketch and draw the dimensions of “Extrude Movement - Element Length = distance between the two elements (dbtte)” to the sketch.

Let me know if that works for you. Tutorial request have an special forum, thanks for putting your wish there.

All the best

Sassi

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 12 February 2013 04:36 PM   [ Ignore ]   [ # 4 ]  
Total Posts:  20
Joined  2006-12-18

wow - i feel like an idiot.  I just read the reply from the email

Didn’t know you attached a file.  Much obliged, - I will plug away at it if it takes me all day - or week.


When I first opened it my first reaction:  “oh that ‘connect’ object”.  got it. 


let’s see if I can get it.  thanks again…

-scott

Profile
 
 
Posted: 12 February 2013 05:00 PM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hey Scott,

I read the e-mails always, even knowing that any change later is not included… but it is more comfortable, I know.

I had attached that file a tiny little bit later, sorry - I should post always a new message.

There are certainly many ways to do that. I used your starting point with the Extrude here. Perhaps to start out with a simple UserData slider and organize everything from there would be more complex but simpler, as it would be then a step by step building up process. Like building the beam out of three cubes instead of “Extrude/Spline+cloner+cubes+Boole”. Just a thought and a reason why I normally ask about the core idea. Again there are many ways. To explore all, well, the time is mostly not given. But the longer you use C4D the more you know the options.

Let me know if there is any other question.

All the best

Sassi

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 13 February 2013 03:51 PM   [ Ignore ]   [ # 6 ]  
Total Posts:  20
Joined  2006-12-18

I gave myself a night to think on this and still can’t make sense of it.  I am hoping that I can learn xpresso well enough to do some things I want to do.  I just have this gut feeling that my needs will be rather basic. 

To elaborate, my reasoning for using the profile instead of three cubes is that I deal with a lot of beams, of varying sizes.  The different dimensions are standard and I can quickly insert a beam, set it’s values and extrude a specific length. 

In my business (construction & shoring) we use walers of varied length. While I know I could take and just model each waler and make it as a library (which I already have), I just see some real possibility with xpresso. 

For example, using it to change the specifics of a shoring system by changing waler lengths, quantities and so forth. 


But for now - I’m just trying to see if I can do this much.  Literally - my most exposure to this thus far has been the little tutorial with the telescopic cylinder built into the C4D help. 

Told ya I was green.  smile

can you give me an xpresso sample?

Profile
 
 
Posted: 13 February 2013 03:56 PM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hey Scott,

Thanks for the background information, very helpful.

“...can you give me an xpresso sample?” I hope so, but for what exactly? :o0

All the best

Sassi

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 13 February 2013 04:06 PM   [ Ignore ]   [ # 8 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

For the example above the XPresso does pretty much nothing else than to calculate what I have sketch here.
To have it more adjustable, I set the value B with the constant.

The math in XPresso is even simpler, as I used for the middle points of the Boole-Cubes the Polygons. So the “B/2” part can be considered as a given.

The simple math is here “Movement (M) minus Boole-cube length (B) =the distance between the Boole cubes (middle points)

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 13 February 2013 04:21 PM   [ Ignore ]   [ # 9 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Alternative and much simpler, if you have a look to the file please :o)

I used Null objects as the main positioning. In this way you can adjust the parts you place to the beam—here shown for the boole.

The first Null sits right on the start and needs no adjustment, as long as these parts don’t change as well (not in your description so far.

The second Null (end) sits exactly on the end of the beam and the cube for the boole is moved inside.

In that way the distance (the beam starts at 0;0;0 (xyz) equals the Movement (Extrude). As all the parts are in Local Z and not Global, the Null needs only to be moved with teh Movement Z in P.Z.

It is a two node XPresso only. Adjust the Extrude.Movement and things work

In the same way you can set up more nulls for any additional parts.

All the best
Sassi

File Attachments
CV2_r14_drs_13_XPbm_01.zip  (File Size: 45KB - Downloads: 220)
 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 13 February 2013 05:43 PM   [ Ignore ]   [ # 10 ]  
Total Posts:  20
Joined  2006-12-18

well, apparently I wasn’t far off.  I just had my y-z axis backwards. 


Now I think I’m a bit closer just need to get my objects placed right and fool with it a bit more. 


I’m going to toy around, and let ya know…

thanks!!

Profile
 
 
Posted: 13 February 2013 06:58 PM   [ Ignore ]   [ # 11 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

I hope the second example is more user-friendly, as it uses objects predominately—and nearly no XPresso.

I said it in the past six years here in the forum more often, so—sorry for my repetition—it always is just a flow of information. What is given, what is wanted, and what can be created.

Yes, let me know if you have any other question.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 14 February 2013 02:08 AM   [ Ignore ]   [ # 12 ]  
Total Posts:  20
Joined  2006-12-18

Many thanks for the help. I’ve attached my final result.  It works beautifully.

My next step is to create one of those nifty little managers instead of going to the extrude settings. 


The biggest problem was in my getting my axis correct. 


Thank you again. You’ve been great.


-Scott

File Attachments
Adjustable Waler.c4d.zip  (File Size: 128KB - Downloads: 211)
Profile
 
 
Posted: 14 February 2013 02:16 AM   [ Ignore ]   [ # 13 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks Scott for the feedback, I’m glad we found something that fits.

I would take a Null Object and drag all underneath it. (Do not select all and use the group short cut, as that will set the “Group Null” in the average positions. etc.)

Let me know if there is something else.

Have a great evening

Sassi

P.S.: I had of course to play with your set up, to check it. Nice work. I like normally to set the Cubes (the Boole ones) to fillet—with a very small “Radius” and perhaps only one subdivision. If you go one time along the “Movement” there is sometimes a mistake [no boole}. It happens only when the Boole is set to High Quality [go figure]. I hope that helps during working to know what happen.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 14 February 2013 05:16 AM   [ Ignore ]   [ # 14 ]  
Total Posts:  20
Joined  2006-12-18

Well, with you help - and a little more experimenting - I was able to move further than I thought I could get to. 

I managed to make my controller, and even create the limitations of lengths I need. 

The beam only has 4 lengths, and other components I managed to get in nicely.

Even managed to get a cloner in there with spacing that’s per my needs.


I attached it so you can see my finished product. 


  I’ve printed and saved all this conversation in a folder to go back to.


I sincerely appreciate your guidance, you should know it’s your time that has allowed me to get this here.


Thanks again, and I look forward (you may not) to pestering you in the future.

All the best,
Scott

File Attachments
Adjustable Waler.c4d.zip  (File Size: 330KB - Downloads: 232)
Profile
 
 
Posted: 14 February 2013 04:12 PM   [ Ignore ]   [ # 15 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Very nice of you to summarize it so kindly, Scott

Sometimes these initial steps are the “door-opener” and so I have always a lot of motivation to go along these. Door-opener has here several meanings, you feel more comfortable the next time with a project, and others will know they are not alone learning this part of C4D. All in all I hope was able in the past 6+ year to make it safe here to ask and keep it an inviting place to ask anything C4D.

All the best

Sassi

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile