Jump to content

jed

Limited Member
  • Posts

    2,189
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by jed

  1. You can still buy Spirograph on Ebay. If I had used more teeth on the cogs, there could be more variation in the patterns, but it suffered from strobing. I wanted to see the cogs engaging, so it was a trade-off. Thanks for comments.
  2. Here's something for you to play with - spirograph retro children's toy. Scene file has userdata sliders for speed, size of cog, position of pen in the cog. Due to use of extrudes, it runs a bit slow in the viewport, so I put a boole switch in the control panel to turn these off for testing - or just playing around. The cog automatically lines up when you change the size on the slider. I normally use TR for rendering, but since the scene uses mograph tracer I thought I'd have to do it all on one computer. However, I tried it on TR and it rendered OK. Uses Python - not very complex, but I put some info in the scene zip. Might amuse someone. https://www.dropbox.com/s/erhux1l9jl6uqvz/spirograph.zip?dl=0
  3. jed

    The Story of Pi

    The apparently impossible square root of -1 is what mathematicians call the imaginary number i.
  4. I thought today's time-waster might amuse somebody. It's loosely based on a Homer Simson joke. ( pi is lowercase p in the symbol font )
  5. Here's a weird thing - I was working in C4D and saved some info as a text file. My mind was elsewhere, and I forgot where I'd saved it. I did a search using UltraSearch and *.txt, clicking last change to put the results in time order - to find most recent. In the results, bizarrely, I got some C4D files dated 2026 - what's that all about ? See snip -
  6. Glow Orange from GreyscaleGorilla's earlier texture kit.
  7. This animation is based on an animated gif I saw in a newspaper. The pendulums are not dynamic - runs on math. I used hierarchy and reference nodes in the setup, so the scene file may interest iteration users. There's a bit of artistic licence with the wires - in real life they would tangle, but it was just a math exercise (and a bit of fun). simplified scene https://www.dropbox.com/s/5ecouv37imgr1xn/8_pendulum_demo.c4d?dl=0 I have another pendulum video here
  8. jed

    Multiplying colours

    One problem with XPresso is the ability to mix n match data types. You can plug an integer into a string etc. I'm sure C4D was just trying to be helpful with this feature, but it can catch you out and give unexpected results - as you have found. Python in C4D is a lot less forgiving with data types - you soon start getting 'was expecting an integer' type error messages if you try using XPresso bad practices. In fact, the reason arturtur's Python worked, but your similar 1st attempt didn't is that he has set the ports to vector where needed, so the math treated the color variable as a vector - in effect saying 'data type vector'. In XPresso, if you hover the mouse over any port, you can see the data type at the bottom of the window.
  9. jed

    Multiplying colours

    I think you're mistaken - multiply node must be vector, but you can input a real constant.
  10. jed

    Multiplying colours

    I'm guessing that when you got R = G = B, that you were multiplying by a real. Data type vector for the multiply node seems to do the trick - put 1.3 in each of the three fields.
  11. I knew we'd get there in the end.
  12. Try this version - has separate XPresso and a slider for distance trigger https://www.dropbox.com/s/n0zy9glqwgw1aqz/distance_trigger.c4d?dl=0
  13. The problem is the way you are deriving the trigger ie comparing 2 vector positions to be equal. The XPresso window is evaluated once every frame, and for your method to work, the 2 objects must line up exactly when the frame changes. Although one object may pass directly through the 2nd, it won't be registered as a hit unless this happens on the frame. The 2nd circle is not in the right place to trigger. I think you were just lucky with the 1st circle placement. If you move the 1st circle slightly, it will increase in size but not lock. You should rewite the XP from scratch using 'distance less than' as the trigger event. I'm not sure why my file above didn't work for you. The first file I posted had a mistake, and later on I replaced it with version 2. Did you use the new file ? Anyhow, if you can spell out exactly what you want your system to do, I'll write some new code.
  14. You've only got one flip flop + freeze to control multiple objects. Also I think your vector == vector is a bit precise. I'd go for distance less than a small value to trigger the event. I came up with this as a possible workaround. If you use the previous position of your trigger object to determine if the trigger is approaching the circles or moving away, then rangemap the circles radius only on approach, you can use iteration and lock the values on 'exit'. https://www.dropbox.com/s/8wphaealp9rbv9y/previous2.c4d?dl=0 The other alternative is to have separate XPresso for each object. I've sometimes had to do that. If you copy and paste each 'unit', the various links are retained (duplicating by click drag doesn't do this).
  15. I don't think you can set the slider max in that manner. This XPresso might interest you. I've been rewriting the code for an old project - it's an array of pendulums of increasing length that create interesting patterns. Vimeo here (1080p). New video still WIP eg camera a bit out and I forgot to put some shadows in, but you'll get the general idea. Uses hierarchy iteration to set up the pendulums. https://www.dropbox.com/s/hrjp4arne76qxzp/pendulums.c4d?dl=0
  16. The modulo on the position is a neat idea, ditto aligning the splines. When you have a lot of repetitive XP, you can often simplify it with iteration - https://www.dropbox.com/s/u5xdt7pdnv4xua1/MultipleSplineAlign2.c4d?dl=0 might seem more complex, but if you had 50 splines it would just be the same code.
  17. You could swap out the splines in the align tag and keyframe them. Might have more control using XPresso. Look in the timeline here - https://www.dropbox.com/s/lteyhhg080gk8li/spline_xp_swap.c4d?dl=0
  18. Not sure I understand what you're aiming for, but you can use a FlipFlop to latch a value. I put a FF in your XPresso with a F=0 reset. When the freeze activates, it stays on. https://www.dropbox.com/s/fxb72k1nohr6uu9/flipflop_latch.c4d?dl=0
  19. The UK press seem a bit obsessed at the moment with optical illusions - often animated gifs (usually just click-bait). I sometimes have a go at recreating them in Photoshop or C4D. This one I 'solved' today uses iteration, so might interest XPresso users. Just a bit of fun really - use front view. https://www.dropbox.com/s/q7widmpjxjuhs4m/gif_thing.c4d?dl=0
  20. The XPresso window is evaluated every frame, so I'm reading the previous position % and writing a new value once per frame.
  21. If you create the spline movement by adding a small amount to the position every frame, by varying the amount you can control the speed. In this file there's a control slider, and the speed is constant up to 300F then slows to stop at 450F. It's keyframed, so you can tweak the acceleration in the timeline. Thanks for watching my video. https://www.dropbox.com/s/agpdrqvqfeizl2y/slow_down.c4d?dl=0 sorry about DropBox - I've run out of upload space at the Cafe
  22. In my original file, for some reason I selected one cube and followed it round. In 2 places the axis flipped, but being a cube it wasn't noticable. Depending on your scene, I thought it might be a problem. I just selected all the aligns and dropped the rail (copy) in the rail field which fixed it.
  23. I don't really understand IK, but in this file I got the trailer to follow the path by making it a child and just pointing it at an object a bit behind the unit. I had to make the spline uniform. With a real truck, the trailer doesn't go where the unit was - it takes a sharper path when cornering. This is why you swing the unit wide so the trailer doesn't 'clip' the corner. Pity you are on Visualize, because you can get good trailer behaviour with dynamics. Notice how the trailer swings in when cornering at 30s in this clip. https://www.dropbox.com/s/ykc692su2bobvrt/truck.c4d?dl=0
  24. @Andybaumgar Just realised you might need to add a rail spline. It's not obvious with the cubes, but if you use an asymmetrical object like a cone, you'll see that the objects flip when moving. In this file the cones flip, but if you drop the rail spline in the align field they all behave. https://www.dropbox.com/s/u7k3vq78qrfehs9/flip.c4d?dl=0
×
×
  • Create New...

Copyright Core 4D © 2024 Powered by Invision Community