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
   
 
Using xpresso for object manipulation
Posted: 22 April 2013 01:50 PM   [ Ignore ]  
Total Posts:  20
Joined  2006-12-18

I have a tube that I would like to use xpresso to modify its properties. (see attached file)

It’s essentially a square, hollow tube.  I used a spline to create the shape and extrude to give it depth.  I can already use xpresso to change it’s length accordingly.


What I want to do is this: In my business, we have two types of this tube.  One is 5” x 5”, the other is 4” x 4”.  - Call them Type 1 and Type 2 respectively.

Each has a different inner dimension and corner radius.

I want to avoid going in and setting all the tube parameters each time I need a different tube if I can.

I would like to have a way to just say - Type 1 or Type 2 and automatically have it change those parameters.

I also have holes at a very specific point in the tube - and I would like it to maintain its happy place in the world. So, as the tube gets longer - just one hole moves accordingly. 


I feel close - but trying to find the right components in xpresso is killing me. 

Thanks!
scott

File Attachments
Variable Tube.c4d.zip  (File Size: 60KB - Downloads: 163)
Profile
 
 
Posted: 22 April 2013 02:10 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Scott,

Here is your file back.

The top-parent creates a relation to the static pin. This can be measured, lets call it “A”.  The length of the tube is “B”. The distance between the two pins = B-A-A.
(I wrote twice “-A” to illustrate how I used the Math node.)

All the best

Sassi

File Attachments
CV2_r14_drs_13_XPvt_01.c4d.zip  (File Size: 52KB - Downloads: 184)
 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: 22 April 2013 02:16 PM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

The switch is done with an Integer Radio Button (see image). This allows for the fast switch, and provides then a “value” as 0 or 1.

This value can be use in the “Condition” node, to address either the first (0) or the second (1) input. Further inputs count then 2,3 etc)

While the Condition node is selected, you can create any value in the Attribute Manager. You might adjust the values for the “inner” profile.

I have split the two requests to keep it clear. I hope it helps.

File Attachments
CV2_r14_drs_13_XPvt_02.c4d.zip  (File Size: 52KB - Downloads: 195)
 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