Fri, Apr 19, 10:30 AM CDT

Welcome to the Cinema 4D Forum

Forum Moderators: CHMedia Forum Coordinators: Kalypso

Cinema 4D F.A.Q (Last Updated: 2023 Sep 06 11:59 am)

C4D Gallery Speed Modeling Sessions C4D Freestuff
 
 
Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Xpresso Question


Einzelganger ( ) posted Sun, 03 February 2013 at 2:10 AM · edited Thu, 11 April 2024 at 6:17 AM

Hey all,

 

 I have a simple xpresso setup where a cube rotates 90o when it is hit by another object.

trouble is the cube goes grom 0-90o instantly, i cant work out how to make the cube rotate over a set number of frames.

how can this be done?

thanks.

 

 D.


raymondsalter ( ) posted Sun, 03 February 2013 at 2:11 PM · edited Sun, 03 February 2013 at 2:14 PM

Hi bud you could try some think like this written in 14 https://www.dropbox.com/s/l6luecv2t5rh49k/rotating%20cube_0003.c4d?m

 Cheers

        Ray.


Einzelganger ( ) posted Sun, 03 February 2013 at 4:55 PM

Thanks Ray, got to sleep now, but i will try it tomorrow.

 

 D.


kuroyume0161 ( ) posted Sun, 03 February 2013 at 4:59 PM

There is a two-part tutorial on 'automatic rotation' (over time) in the Cinema 4D Help.  Just type in 'Xpresso' in the Search and follow the "Xpresso Tutorials" link in the search results.  Hint: there is a Time node in Xpresso. :)

C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, you blow your whole leg off.

 -- Bjarne Stroustrup

Contact Me | Kuroyume's DevelopmentZone


Einzelganger ( ) posted Mon, 04 February 2013 at 12:53 AM

Ah, so what you are saying is "RTFM"? ;)

good point though, its just that i am not used to the 4d manual actually being usefull :D

 

cheers.


samiwas ( ) posted Fri, 08 February 2013 at 12:05 AM

I wrote an Xpresso set which does just that.  It uses the "current" rotation, the target rotation, but only allows it to rotate a certain number of degrees per frame, based on a chosen time.  So if it's said that the object can rotate 360 degrees in 5 seconds, the nodes will allow the object to rotate 2.4 degrees per frame until it hits the target.

There might be more efficient ways to do it, but that's what I did.  I can post it if you want.


Einzelganger ( ) posted Fri, 08 February 2013 at 12:22 AM

Please do, i haven't had a chance to try the other reply's yet.

the more options the beter ;D

 

cheers.


samiwas ( ) posted Fri, 08 February 2013 at 12:29 AM

OK...it's late tonight, and I travel all day tomorrow.  It might be a couple of days, but i will try to get it posted here.


roobol ( ) posted Mon, 11 February 2013 at 12:02 PM

file_491551.jpg

Very nice  solution by raymondsalter, congrats.  If you are not familiar with Python you could also use a monoflop for rotation triggered by collision and a compare node to reset the whole bunch.

http://www.roobol.be


Einzelganger ( ) posted Mon, 11 February 2013 at 12:26 PM

Thanks roobol, a bit easyer to follow than raymondsalter's :D

i am only just getting into Xpresso basics.

thanks all.


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.