Jump to content

jed

Limited Member
  • Posts

    2,189
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by jed

  1. jed

    COFFEE Script to Python

    I think I've done it - well, stuff moves 😀 As I suspected, some ports that should be float were integer (or vice versa). XPresso is quite forgiving with data types, but Python is strict. Console shows no errors, but there's still some ports not connected (from the coffee version), not sure if this affects anything. watch 3.c4d
  2. jed

    COFFEE Script to Python

    If you post the original Coffee version, it would be easier for us to convert.
  3. jed

    COFFEE Script to Python

    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.
  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. 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
  7. @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 😁
  8. 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
  9. 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
  10. 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
  11. 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.
  12. I saw it on UK comedy panel show QI (Quite Interesting) - they often have amusing physics or math stuff.
  13. Put the shape in the right hole...
  14. The unbalanced wheel type of PMM goes back to Leonardo da Vinci, and whilst fun to build in C4D, IRL they are all doomed to failure due to friction and the 1st law of thermodynamics 'energy cannot be created or destroyed'. When I have built such wheels in Cinema, they tend to jiggle for about 1 sec and then attain a state of equilibrium - they don't rotate forever 'under their own steam' - you always need a motor, keyframes or XPresso. Whilst C4D dynamics is only a simulation, I imagine these PMM wheels would do the same IRL. I'm quite impressed at how C4D can solve quite complex dynamic situations (see my other posts about logarithmic spiral gears) and copying (pretend) PMMs seen on YouTube is a great way for beginners to learn about C4D motors, springs, connectors etc. It bothers me that fake PMMs can get 10 million hits on YT and generate cash rewards for the posters. As with flat earth videos, YT seems to think promoting bad science is a good business to be in.
  15. @pilF I've made a few perpetual motion machines that I've seen on YT eg
  16. @pilF idea from this video at 1m30s - I'm never sure if these guys actually think we believe that perpetual motion is possible, or if they just want a million hits to earn $$$ from YouTube's monetization. My scene has angular springs to keep the spheres in the mid position and each has its own gravity. The springs + gravity are rangemapped to get the movement. The rotation is from a motor and the collision bumps it a bit. Here's the file if you're into XPresso. The blue helix springs are disabled (via control null) to speed up viewport springs2.c4d
  17. Well, that's the energy crisis solved...
  18. jed

    Toy Car Adventure

    @Igor as requested -
  19. jed

    Toy Car Adventure

    OK you've twisted my arm...
  20. jed

    Toy Car Adventure

    Thanks for the comment. It's interesting how low a speed you need to do a loop the loop. I saw a guy do it on a TV car show and he wasn't going all that fast. My approx math calculation - the minimum speed needed at the top of the loop is the square root of R * g, where R is rhe loop radius and g is gravity. My loop is about 700 cm high and g is 1000 cm/s/s, so speed = sqrt( 3.5 * 10 ) = 5.91 m/s my car was going a tad faster, to stay in contact - more or less adds up 😀 @Igor - I'll have a think about your video suggestion.
  21. I saw this interesting Hot Wheels thing on YouTube, where the weight of the car causes the cardboard track to tilt as it goes round - so I made one. All the cars in this clip are dynamic with motors etc and XPresso steering the cars chase an object on a spline, but because they are not actually on the spline they jump and land quite realistically. cars_demo.c4d
  22. I like making ball machines, and I'm always looking for new ways to raise the balls to their start position. I saw a rack and pinion model in an engineering video where some teeth were missing, so used it in this scene. The cog is an animated collider object, rest is dynamics. There's a ghost collider that detects a ball at the top of the model and triggers some XPresso.
×
×
  • Create New...