Jump to content

jed

Limited Member
  • Posts

    2,189
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by jed

  1. I have a theory : programmers just get to do number crunching - but with C4D, programmers get to move stuff around. I guess it's an incentive.
  2. lol - I thought he meant 'piece of ****'
  3. I had a quick Google for Python dictionary and came up with this - make sure you get the correct curly/square brackets (and compile after editing) lookup.c4d in Python, you should also check in menu - script - console for error messages
  4. I use Python, so this is just a guess. In Python double equal is reserved for an equality test, single equal is used to assign a value if Input1 == 'A': Output1 = '1' If you've never used Coffee or Python, maybe you should learn the latter - there's more Python videos on YouTube, and I think Coffee is being phased out of C4D. Although I don't use them, in Python there's 'dictionary' - which is like a list of data pairs that can work as a look-up table to save all the if-this then-that typing.
  5. @pfx the speed's rangemapped down to 50% at max Y. Also there's a cosine of the incline angle component, to allow for a slope being longer than its 'sea level' distance.
  6. This is one of my on-going projects - a unicycle on some landscape. You can manually steer the unicycle in the viewport, but in this video it's switched to random. Uses the Base80 wheel. A breakdown (of sorts) with info about the Base80 wheel here (video). scene omscenes.zip if the scene plays too slow (eg on a laptop), disable any shadows or reduce landscape segments.
  7. I guess the story inspired this xkcd https://xkcd.com/740/
  8. On R19 your script's indents were a bit out, and it worked ok after I lined everything up. I thought the only difference to XPresso with newer C4D versions was curved vs straight wires. Your Python looks like this on my system what does my straightened out version look like on your R14 indents.c4d
  9. Is it me, or does that date-time method not update in real time ? Here's my version using ctime - timeline needs to be running hourminsec.c4d
  10. You might want to do modulo 12 on the hour value :)
  11. ... at your favorite Cafe. I know scrolling LED text is a bit old hat, but I've been playing with a different method recently that might interest some of you. In Photoshop, I made a pixel sized long message using a dot matrix font - like this then uploaded the jpg to this site that converts images to binary 0s and 1s. In Python, I read the resulting text file as a list of lines. These lines are rotated by removing the 1st value and adding it on the end. This makes the message scroll around (and loop). The binary is written to an array of spheres. Looks like this - the building is a freebie from Pixel Lab. Here's the scene file - scrolldemo2.zip you'll have to edit the location of the text file on line 28 c:/users/jed/desktop/latebar.txt to your info to make it work.
  12. If you generate the rotation by adding a small amount to the existing rotation every frame, varying the amount added will speed up and slow down the object's rotation. Because the rotation accumulates, in this file there's a reset to zero at F0. The control slider is keyframed. slowdown.c4d
  13. @westbam it's all done in Python. The cube cloner was made editable and I iterate through each cube randomly, comparing the mat value to a binary file containing maps of the messages. To get the maps of the letters, I used a 5x7 dot matrix font overlaid on the cubes and painted on a selection. Then I interrogated the mograph selection tag in XPresso to write the binary files. Since there's around 1000 cubes, the mat changes are done at 10X per frame. The random thing looks a lot better at 1X per frame, but takes too long to swap the colors. scene ayb.zip
  14. This is something I have a tinker with every so often - making random cubes morph into a message. My latest attempt - For those not familiar with the revealed message, it's an old internet meme. There's a wiki page about it, and the phenomena even made it to Fox news. Original video here.
  15. jed

    In the doghouse

    Thanks - BB has got to be the best TV series ever.
  16. I was surprised to learn that the Dog House in Breaking Bad is actually a real diner in Albuquerque, so I had a go at the rather low tech animated neon sign. I used a bit of Python to rotate the mats for the 'moving' effect. It's not every day you find yourself making a variable called sausage_speed . . . doghouse.c4d http://breakingbad.wikia.com/wiki/The_Dog_House
  17. @bezo In Python I used noise to create the varying random radii. By iterating through the spheres I made them touch using sphere x position = previous sphere x + previous sphere radius + current sphere radius this produces a chain of random touching spheres, but the wrong overall length, so I put a scaling factor in the random radii calculation (all spheres scaled by same factor). Then with the scale starting at 0, I put all the math in a 'while' loop, incrementing the scale by a very small amount in each loop until it achieved the target length - while length < target length: scale += 0.001 and it drops out of the loop when the length is correct. I've found 'while' loops problematic in C4D - if the code is wrong and you get stuck in the loop, it freezes C4D needing a hard reset (losing any work since the last save). Here's a simplified version of my scene, using 10 spheres in a line. python_spheres.c4d
  18. The other day, for no apparent reason, I was thinking about spheres with constantly changing radii - say on a spline - and how I could keep then always touching and yet be constrained within a fixed length eg on a circle. I came up with this bit of python well, we were snowed in, here in the UK . . .
  19. You'd be better off dropping the objects in link lists and driving the whole thing from one iterator. Xpresso2.c4d or use one hierarchy to drive the other 2 Xpresso3.c4d
  20. Oneshot monoflop + state + rangemap + spline is a killer combination. Re the userdata trick - I got it off a guy called base80 who made this scene. It says 'this phrase has 29 characters', but the '29' comes from measuring the string length and inserting it in the message. If you change the message and refresh the screen (jiggle playhead etc) it updates the character count. Only possible with base80's proxy trick. base.c4d
  21. Using the result of a collision to block other collision triggers is tricky in XPresso because you are trying to loop an output to an input - which is not allowed in XP. There is a way around this by writing to user data and reading it back - which 'breaks' the loop. In this file there's a sphere bouncing on a cube (which reacts). After the 1st bounce, a 2nd monoflop with 100F duration writes a 1 to userdata, which is read back to temporarily disable further triggers for 100F. There's a 1F delay writing and reading userdata, but this works in our favor by not blocking the 1st pulse. Might do what you want. lockout.c4d
  22. You don't need to specify both objects for collision - just one will detect any object colliding with it. Is that what you meant ? After playing with your scene, I just had to go find Tommy - Pinball Wizard on YouTube. Showing my age here ...
  23. Clamp lower and upper seems to fix that. When not checked, the function can also calculate outside of the range.
  24. What sort of spline have you got on the range map ? I'd suggest something like this - or maybe
  25. @bezo re my radians protractor - was intended as a little joke. A lot of C4D users see the XPresso use of radians as an annoying use of a stupid unit. I mean 1 radian = 57.295 degrees ? 6.283 radians in a circle ? How can that even help things ? The old car wheel rotation calculation crops up here every now and then. I've seen people solve that little problem using pi, 360 degrees etc then converting the answer to stupid radians 'for XPresso'. I'm sure you realize that if you know the definition of a radian, the solution is just wheel rotation (in radians) = distance car travels / radius of wheel. engineers, physicists often refer to a right angle as 'pi by 2' . 360 degrees has its uses eg it divides by 2,3,4,5,6,8,9,10,12,15,18,20,24,30,36,40,45,60,72,90,120,180 from - print('divisors of 360') for a in range(2, 360): if 360 % a == 0: print(a, end=',') as we say in the UK 'it's horses for courses'
×
×
  • Create New...