Jump to content

jed

Limited Member
  • Posts

    2,189
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by jed

  1. jed

    coffee to Python

    def main(): global Output1 # and the rest if Input1 == 0: Output1 = True Output2 = False Output3 = False Output4 = False Output5 = False Output6 = False Output7 = False else: Output1 = False # etc note it's case sensitive, indent and colons. Outputs must be global, but can be declared on one line separated with commas true.c4d
  2. Here's 3 splines of different lengths, using spline wrap. You can measure the spline length to get the same speed on each spline. If you have a zillion arrows + splines, hierarchy iteration would be better. 3splines.c4d edit - as per CBR's idea, cloner version 3cloners.c4d some ideas for you
  3. I had my first play with the R19 sound effector today, and although I'd read about the sound file automatically showing in the timeline dope sheet, I didn't realize the sound was embedded when you save the file. If you look in the file sizes in this screenshot where I've tested using mp3 and wav, it seems mp3s are converted to wavs in Cinema. The R19 sound effector isn't backwards compatible - giving missing plugin error message when R19 file opened in R18 etc.
  4. You can see the actual program code for the screen size site calculation in the html. In Firefox the page code is found in menu, tools, web developer, page source. It's not Python, but might be of some help.
  5. The read-write to user data delay is not the problem IMHO. Since you have 4 variables, you'd have to specify which values were 'held' while the other values are typed in. In this file I have 2 selections choices - enter width + height or enter diagonal length + aspect ratio. It's in Python, but should convey what I'm talking about. ARtest.c4d sorry about using script, but I needed a rounding function. There's comments (in green) . . .
  6. You can make a list of objects under a parent null using list1 = parent.GetChildren(), a bit like this - list.c4d
  7. You could also use the state output of a one-shot monoflop and a rangemapper to draw your own custom barrel movement curve. State gives a linear 0-1 ramp in time 'duration'. Recoil2.c4d @HSrdelic - it's not every day you get to use arc tangent in Cinema
  8. I sometimes get a warning when opening an old file (say R14) and re-saving with R19 - 'this file was created with a different version blah blah', although TBH I'm not sure if that's a C4D message or from Windows 10. Either way I ignore it . . . Thanks for reply.
  9. It's something I never think about - what are the 'rules' for forward and backward compatibility with different versions ?
  10. I always assumed C4D is quite good for forwards/backwards compatibility, so it's something I never think about when posting files. Maybe one of the experts could spell out C4D compatible rules. I'd hate to think I've been linking files that don't open.
  11. I concur with @HSrdelic - iteration is best. a_turn_on.c4d
  12. jed

    recursion bot

    I was playing around with camera shader as CCTV, and wondered what would happen if I pointed the camera at the monitor. I sent my python Roll-It droid to investigate . . . BTW, that's not Photoshop - if you type recursion into Google it actually asks 'did you mean recursion'. Just a WIP, but might amuse someone.
  13. The modulo xpresso should be a bit like this. Note that the angles are in radians (2 * pi radians = 360 degree). The IK is a bit wonky - not my area. scooter2.c4d
  14. I would have thought just feeding a multiple of seconds into Y position would make body Y constantly increase, unless a modulo was used. There's a modulo in rangemapper, but I prefer to use a math node. [ modulo means count up to and repeat eg 0, 1, 2, 3, 4, 0, 1, 2, 3 . . . etc ] Why not map the foot movement to the body Y ?
  15. jed

    machine v machine

    Since my machine v machine video amused some of you guys, here's the scene file and a video breakdown. The video is 'as is' - done in one take, but it might inspire some C4D users to get into XPresso + Python. mvm.zip
  16. I think this is known as an 'Easter Egg'.
  17. What about calculating it using a memory node set to 1F to get previous global position - global velocity = (global pos - prev global pos) * fps velocity.c4d might work . . .
  18. jed

    machine v machine

    If you look closely, you'll see the big robot arm intersects with the body once or twice - I only noticed that after I'd rendered + uploaded to Vimeo. Should have used a clamp on the vibrate tag movement. I recorded the switch clicks in real time using Audacity, and the soundtrack was in sync without any need for time-stretching in AE.
  19. 2 bots having an argument. Might amuse someone. Robot arm based on a Tim Clapham video at Hello Luxx, switch and light are freebies from Pixel Lab.
  20. If you make a sound node in XPresso with a play input port, and load a sound file, a 1 on this port (eg from a constant node) starts the sound playing. If the input reverts to 0 before the sound has finished it will clip it. The sound can be repeated with another 1. I haven't tested if this played sound renders* to avi etc - I usually record my robots going bleep etc in real time using Audacity and add the sound in After Effects. * edit - it doesn't, but you might find my 'record what you hear' method suitable
  21. jed

    Random Instance RIg

    You could use the index of the instances to change the seed of a random node, which would select a random object to assign to each instance. Something like this - Random_Instance2.c4d
  22. Do you ever get those days where you start thinking 'looks like I'll have to re-install C4D or Windows or both' ? Recently I had a problem with a disappearing sky, and after trying everything possible, I was about to throw in the towel when I found that disabling transparency on one of the mats fixed it. Sounds so unlikely that I did a screen grab - buildings from Pixel Lab, helicopter from free3d.com here's a WIP when you have eliminated the impossible, whatever remains, however improbable, must be the truth - Sherlock Holmes
  23. jed

    counter rotate

    Surely it's just local co-ords ? The child's net rotation is the difference between parent rotation and the child local rot eg if the child has -2X the parent angular velocity, it will turn at the same rate as the parent but in the opposite direction.. local.c4d
  24. I think dynamics and wheel suspension works best for cars on bumpy terrain. In this file I used ray collision to locate the target the car is following onto the surface. The base80 wheel only sees 'sea level' distance AFAIK, so doesn't react to height. When I used the base80 wheel with the unicycle on terrain, it was a bit of a con really (Roll-It reacts to distance on an incline BTW). terrain.zip
  25. @digitvisions and @everfresh thanks for the likes. I've jazzed up the 1st legoman so he has a hammer to whack the mole - here's the scene + code, if anyone wants to have a look - there's comments https://www.dropbox.com/s/tin82tjylbd35li/legomanmole.zip?dl=1 The Python clocks through some hidden placeholders that the mole jumps to when whacked, then a targeted null detects the angle to the mole, turns the vehicle accordingly and legoman sets off to get him. There's also a bit of camera target smoothing, and autozoom. Still WIP.
×
×
  • Create New...

Copyright Core 4D © 2024 Powered by Invision Community