Jump to content

jed

Limited Member
  • Posts

    2,189
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by jed

  1. I don't understand your scene, but I've translated the code. Things move and there's no error messages 😀 import c4d import math def main(): global Out_NE, Out_NW, Out_SE, Out_SW Range = 20 / math.sqrt(2) Dist_NE = abs(-In_X -In_Y + 20) / math.sqrt(2) Dist_NW = abs(In_X -In_Y + 20) / math.sqrt(2) Dist_SE = abs(-In_X + In_Y + 20) / math.sqrt(2) Dist_SW = abs(In_X + In_Y + 20) / math.sqrt(2) Perc_NE = 1 - (Dist_NE / Range) Perc_NW = 1 - (Dist_NW / Range) Perc_SE = 1 - (Dist_SE / Range) Perc_SW = 1 - (Dist_SW / Range) if Perc_NE > 0: Out_NE = Perc_NE else: Out_NE = 0 if Perc_NW > 0: Out_NW = Perc_NW else: Out_NW = 0 if Perc_SE > 0: Out_SE = Perc_SE else: Out_SE = 0 if Perc_SW > 0: Out_SW = Perc_SW else: Out_SW = 0 180524-facelkjaf_5-coffee_script_0001.c4d
  2. Some ideas for you import c4d import random def main(): global value # persists to next frame frame = doc.GetTime().GetFrame(doc.GetFps()) # get current frame rate = 7 # new value every 7 frames if frame % rate == 0: # modulo value = random.uniform(0.15, 0.77) # range inclusive print value # remove after testing, use parenthesis for R23+
  3. The base80 wheel is quite good for car wheels. You make the base80 cylinder the same dimensions as the real wheel and make your wheel a child. BaseWheel1.7.c4d only move the base80 rig by its parent - not the wheel 😀 Roll It is more for 3D roll of cubes etc Roll-It 2020 EN – eggtion.net
  4. I used a 1F memory to test up or down. This turns on a 5F delay. down_up.c4d
  5. @deck This scene started off as 2 dynamic spheres in a collider cylinder (no caps, visibility off), collider floor and regular gravity. When the tube was moved in xz using a vibrate tag the spheres rotated due to friction and although the top sphere appeared to be balancing, it looked too wooden - I wanted some wobble. Specifically I wanted the top sphere to look like it was rolling off the lower sphere, then the lower sphere would move (after some delay) to keep the top sphere on top and also to maybe overshoot so it looked like the lower sphere was slowing down the top sphere. I made the cylinder smaller so it only affected the top sphere and attached the lower sphere to the cylinder with a dynamic spring offset by 2*radius in y. In this pic I've moved the lower sphere to show the spring. In XPresso I take the vibrate amplitude down to 0 every 500F. This returns the spheres to the center for 150F so you can see the balancing a bit better. balance.c4d
  6. @deck scene file tomorrow 😀
  7. I'd use hierarchy. In this file the hierarchy node points at the obj's parent null. D = down one level N = next, same level switcher.c4d
  8. Here's my quick n dirty method - I made a gradient jpeg in Photoshop it's 100px, so I used a bitmap node to read the color at x = 0 > 100 as the light went 0 - 180 deg bitmap.zip
  9. You're welcome - I like these math challenges 😀
  10. Here's some ideas for you gun turrett_0002.c4d
  11. If you used constraints to get the required piston movement, you could put the whole rig in a null and move it around. In this file the piston is clamped to a null on the crankshaft with x and z set to zero in XPresso to keep it in place. The conrod has an aim constraint to point it at the piston. There's other methods 😀 piston.c4d BTW the linear math in the video is wrong - it's a lot more complex than that.
  12. When things don't work - try Connect 😀
  13. I think you'll find that the math for a rolling sphere is a bit more complex. In this gif I used the roll-it plug in and you can see that all 3 axes are involved, your sphere can appear to not be rolling due to the concentric ring textures. Roll-It 2020 EN – eggtion.net
  14. jed

    Damping pendulum

    @Filetihere's the XPresso for the 100 pendulums 100pendulums.c4d uses iteration + Python 😀
  15. jed

    Damping pendulum

    @Fileti check out my pendulum video 100 pendulums on Vimeo
  16. jed

    Damping pendulum

    If you assume a pendulum swing approximates to sinusoidal (true at low amplitude) you can drive it with trig node. Can adjust speed, amplitude, stop frame, decay shape in this file. pend.c4d
  17. I found a 2004 version of the Cafe at Wayback Machine here 3D Kiwi was the man back then...
  18. jed

    Feed the Fishes

    @Igor is this a forum problem or a Vimeo problem ? I had the same thing happen a few years ago but other members said 'works OK for me', then it seemed to fix itself. I've tried different browsers and I have a Vimeo Plus account.
  19. I was watching this video by EJ at Eyedesyn about googly eyes, and I came up with this Feed the Fishes on Vimeo for some reason, I can't seem to embed Vimeo any more - anyone else have this problem ?
  20. In this file I used sine instead of range mapper and global rotation for the pedals. 45 deg seemed a bit steep, so I used 30. crank.c4d [ sine goes 0 > +1 > 0 > -1 > 0 > +1 etc ]
  21. It's the old rolling car wheel problem. If you stay in radians, the math is easy. In this pic, red X is the distance the wheel travels no need for pi or 360 😀
  22. Checking 'Frame Dependent' will stop this. I often turn it on when tinkering with a scene, then turn it off when scene runs.
×
×
  • Create New...