Jump to content

jed

Monthly Contributor
  • Content Count

    1,749
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by jed

  1. If you post the original Coffee version, it would be easier for us to convert.
  2. At first glance - some Python input and output ports not connected a Python node with global out, but port is called Output1 a condition node with switch not connected BTW clicking compile is a syntax check - extensions, console is the place to look for errors.
  3. If you just want the tube attached and spinning, parent constraint should do it - or does the tube travel down the spline ? spiral_test_2.c4d
  4. jed

    Resize Spline

    I made a python arrow spline tool recently, but couldn't get the points to update to the new positions. I found that adding spline.Message(c4d.MSG_UPDATE) after the math, updated the point position. Here's my file (still WIP) python arrow tool.c4d
  5. I think @Hrvoje is referring to changing the order in the X manager I tried that, but it didn't fix the F0 problem. I think the GetCache() Hierarchy combination needs a frame to evaluate. If you can live with separate splines, making the cloner editable and using Hierarchy in the regular manner doesn't have the F0 glitch. 002.c4d BTW is this the scene from Tim at HelloLuxx ?
  6. I'm not an expert on soft body, but the usual fix for dynamic objects intersecting is to crank up steps per frame (and maybe iterations per step as well) in project settings - dynamics - expert.
  7. This cannon that shoots hoops uses an emitter, but the emitter velocity doesn't seem accurate enough for my calculations, so I set the speed to 0 and gave the emitted object a custom initial velocity. Has a hoop cam There's sliders in the scenefile to move the shooter around. hoops.c4d
  8. @PatrickZ a typical XP rotation would be since rotation in XPresso is in radians, using seconds puts you in the right ballpark
  9. You don't actually have to use a motor - you can make the helix a collider and just turn it in the usual way eg keyframe or XPresso. In this scene I used a python speed control. I gave the sphere some damping. marble.c4d
  10. @MikeA re my accent - a few years ago, a guy from the US who watched one of my videos said I sounded like John Lennon in A Hard Day's Night
  11. I was watching the TV show Limitless and in one episode there was a sniper taking a shot from about 2 miles. It got me thinking about the math required to hit a target in C4D, taking into account the vertical drop of the projectile due to gravity - so I built a rig. There's a comedy boing when you hit the bullseye. sniper.c4d TLDR - use this equation
  12. You can make these scissor jack type objects using cloners, but you need to do some math to drive the cloner X + Y steps. In this scene I vary the angle of the arms and the cloner X is a function of cos(angle) and the Y a function of sin(angle). there's an open - closer slider control stairs.c4d (angles in XPresso are in radians)
  13. Giving the top bar some custom initial velocity (angular) would make it rotate a bit when it falls.
  14. If the splines are all in a parent, you could loop through them and add the lengths import c4d from c4d import utils def main(): top = doc.SearchObject('my splines') splines = top.GetChildren() # list total = 0 for spline in splines: newinst = utils.SplineLengthData() # creates new instance of the SplineLengthData class newinst.Init(spline) # initializes the spline object L = newinst.GetLength() # length total += L # newinst.Free() # frees up memory ? print total in this file I checked the result with XPresso spline_test.c4d seems to agree
  15. I got this code from Lester Banks for getting spline length for any spline (not just linear). Might interest you import c4d from c4d import utils #Welcome to the world of Python def main(): spline = doc.SearchObject('Spline') newinst = utils.SplineLengthData() # creates new instance of the SplineLengthData class newinst.Init(spline) # initializes the spline object L = newinst.GetLength() # length #length.Free # frees up memory used by new SplineClass instance - needed ? print L from here
  16. This is just a scene for me to develop some Python to access data files and trigger sounds. Homer plays a slot machine and shouts D'Oh when he loses and WooHoo when he wins.
  17. I saw it on UK comedy panel show QI (Quite Interesting) - they often have amusing physics or math stuff.
  18. Put the shape in the right hole...
  19. Is this what you mean ? If you make the L + R connectors twist sliders, it pulls together with gravity chain test 3.c4d
  20. I use Dropbox for large files. You get 2GB free storage. After signup there's a Dropbox folder on your pc that is mirrored in the cloud - any file put there is uploaded. You just R-click the file in your pc folder to get the Dropbox link, then post the link here eg https://www.dropbox.com/s/eadx8wd7kv2bnwr/plane.c4d?dl=0
  21. Here it is in Python tripewriter.c4d it's just a string slice - square brackets with start and end indexes (starts at 0), colon separator, last char is limiter so not printed my_string = 'abcdefghijklmn' my_slice = my_string[3:7] # start and end index print(my_slice) # defg Can also be done in XPresso only - xp_writer.c4d
  22. Not sure if this is a forum bug, but recently whenever I log in to C4D Cafe I get an email 'new device login' - even though I'm on the same pc with (usually) the same IP.

Latest Topics

Latest Comments

×
×
  • Create New...