Jump to content

jed

Limited Member
  • Posts

    2,189
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by jed

  1. Me personally - no, but is it possible - yes. There's a bit of a hole in my Python knowledge when it comes to creating objects using code. I've seen posts here and at CG talk on this topic. My current Python method is reference objects in OM and user data > do math in Python > write vectors for position and rotation which more or less does what I want at the moment. There's usually a bit of Python in the weekly TDMS - well worth the 10 euro pm IMHO.
  2. Since you like my XPresso camera tricks, here's 2 more. There's a constant zoom scene, where I keep an object the same size in the camera viewfinder, and a smooth camera target scene that is useful for following a jerky subject. In fact, I use the smoothing method to smooth ordinary data all the time - if you look in my legoman python it's buried in the code. morecameratricks.zip
  3. I was watching video 4 from the TDMS series today - the wheel and ray collision - and I came up with this. It's basically the same as the tutorial, but using base80's magic wheel so that the wheel can go in any direction and still turn correctly - a bit like Roll It. I've put the base80 scene in the zip file. might amuse someone rolling.zip
  4. @szender If you use a hierarchy node, you can use the order that the objects are in the object manager. Also, it's flexible so you can add or remove objects. order2.c4d
  5. A link list has an index in port, to reference objects. In this file I used an object node as the specimen object, so I could get X position and name. linklist.c4d
  6. As they say on kids TV - here's one I made earlier
  7. Not sure where the 44 fits in, but I think this file does what you want ie it turns the 2nd wheel by 44 degs from 90% > 100 %. There's a readout for the 2 rots, and a user data control to turn 1st wheel. Remember that XPresso uses radians not degrees. turn44.c4d
  8. 2nd answer 1st - saving data in user data. Here's an interesting idea I got from a guy called base80 : In XPresso there's a node that can measure the length of a string ie how many characters (including spaces) are in a phrase. But what if the phrase was 'this phrase has 35 characters in it' and you were getting the '35' from XPresso? That would mean connecting the output from the 'length' node at the end the chain of nodes, back to the input at the LHS. Output to input is not allowed in XPresso, because it would create problems, especially for noobs - but looping in programming is one of the most powerful tools. The answer is what base80 called his 'dirty proxy trick' - you get the length from the node, write it to a user data value (at the end) and read it back (at the start). See file https://www.dropbox.com/s/ax4dbteq3ayve7f/base80trick.c4d?dl=1 Using math add, I've made the string 'this phrase has 29 characters'. The '29' is auto generated. If you edit the 1st string to read 'did you know that this phrase has ... etc', and either press 'a' to reload (or jiggle the playhead) you get 'did you know that this phrase has 47 characters'. That should amuse you while I write some Python for your 1st question.
  9. I got lost on question 1. Is object C different to object A ? A = A + B is a loop C = A + B is addition Making the loop scenario only execute when the value to be added changes is easy in Python. make a user data value (real, with no limits) and write to, read back etc.
  10. jed

    optical illusion

    So what's your definition of optical illusion ? To me it's just a bit of deceptive geometry that confuses the brain. You video don't have any ambiguity - looks like a regular animation to me. I do realize that everyone's brain works differently ie some people can't see some illusions. Here I've a stab at the old hollow cubes thing - the cubes flip for me, so is that not an optical illusion either ? I think the trick here is lack of perspective (I used a parallel camera). I used Python to swap the colors - sledgehammer/nut etc. https://www.dropbox.com/s/pudtcdey6i631ln/cubes.c4d?dl=1
  11. jed

    optical illusion

    couple as in 3 . . .
  12. jed

    optical illusion

    LOL - I read 'em all, Guardian, Sun . . .
  13. jed

    optical illusion

    I nicked the idea from this Daily Mail story. I think the illusion is supposed to be the blue and black lines changing length (as opposed to the star thing). I also had a go at animating the out of step wonky bricks thing (there's a building painted with the pattern in the article), but that's still a wip. Here's a still wonky bricks, only circular - needs large monitor There seems to be a lot more to optical illusions than I first imagined. The size of pic and viewing distance plays a part.
  14. Has anyone got this octo running on dynamics ? Getting the legs in sync is harder than I thought. Here's my wonky 1st attempt -
  15. I saw an interesting optical illusion animated gif in an online newspaper today, so I thought I'd waste an hour or so recreating it. The key seemed to be using a bit of trig to keep the moving parts a constant width. I've added a 'reveal'. this file has a control panel, so you can play with the parameters - https://www.dropbox.com/s/21rgcyj8xgwyyw7/star.c4d?dl=1 might amuse someone
  16. jed

    Animate a tracked vehicle

    Not sure why your track's slipping - have you got the base80 cylinder the same radius as the track rounding radius (and located it midway in the track) ? For bumpy terrain, you might want to look at a dynamic system. I've had limited success, as long as you don't get too ambitious re steering and speed. Here's a straight line dynamic version https://www.dropbox.com/s/zixwjmfrt21ct4t/trackerdynamic.zip?dl=1 I sent you a pm about some new math ideas I had for the non-dynamic tracker.
  17. jed

    Animate a tracked vehicle

    I built the Lester Banks version and added one of my steer rigs - https://www.dropbox.com/s/zrpkz5i0wwhc5rh/tracker.c4d?dl=1 does the stationary spin on axis thing
  18. jed

    Animate a tracked vehicle

    I think this is the XPresso you are looking for https://www.dropbox.com/s/gfa9t0yovbohxcm/basewheel1.7.c4d?dl=1 the wheel rotates correctly for any position or rotation of the parent null @HSrdelic can this brilliant bit of Base80 global matrix magic be put in the big file repository before it's lost forever ? added: I watched the Lester Banks videos. He locates the Base80 wheel at one of the cylinders - I think it makes more sense to put it midway between the front and back cylinders (on each side), especially for the skid-steer spinning on axis thing.
  19. You can add the global position vectors of the 2 anchors, divide by 2 and write that value to the mid-way object. C4D doesn't seem to like dividing vectors, so in this file I multiplied by 0.5. The mix node with data type vector, set at 50% would do the same thing. https://www.dropbox.com/s/txv3mrktudeeqez/anchors.c4d?dl=1 added: I've edited my original file to put the XPresso after the anchors in Object Manager, since strictly speaking the calculation comes after reading the anchor position - can sometimes give a 1 frame lag.
  20. You could use a memory node set to 1 to 'remember' the value at the previous frame. Position velocity is another way. Position velocity is a vector but (luckily) C4D does the conversion to linear when plugged into a real. In this file I scaled the 2 methods for comparison. With memory, you often get spurious values at frame 0 - you could probably incorporate if F = 0 blah blah to fix this. https://www.dropbox.com/s/pvf6gf5781zug9o/vel.c4d?dl=1
  21. Thanks for the comments. Here's another example - has more permutations, uses MS Gothic font. I think that's enough anagrams for a while.
  22. @Abyss integer division in C4D Python caught me out once. Cinema is still on Python 2.7 where 3/2 = 1 not 1.5 (fixed in v3). I was doing some stuff that used current frame in the math - and it gave all the wrong results. Wasted half a day sorting that one out. Since then I always enter constants as 25.0 etc.
  23. I agree - there's a ton of Python tutorials on YouTube, but the hard part is interfacing it with C4D. I find the official C4D Python SDK extremely difficult, so I tend to grab little bits of code from stuff I don't really understand in posts here, CG Society and the plugin site. I guess one plus point is - ordinary programmers just get to (mainly) crunch numbers, whereas we get to move stuff around.
  24. A recent cafe thread about automatic anagram animation got the old grey matter ticking, and here's the current WIP. Might amuse somebody - Python scene file https://www.dropbox.com/s/yvqtmxjmzbukjkm/carthorse.c4d?dl=1 edit : file needs monospace font such as Courier New - I used Consolas.
×
×
  • Create New...