Jump to content

jed

Limited Member
  • Posts

    2,189
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by jed

  1. Thanks guys. One problem I had was that, in close up, the balls hovered above the surfaces due to the minimum distance malarkey. I solved this by baking the dynamics then increasing the ball radius by 1 cm.
  2. I was watching this video on YouTube of a marble machine made out of cardboard, so I thought it would be fun to recreate it in C4D. ball_machine.c4d
  3. I had a go at making the perpetual motion desktop toy from Iron Man 2 - you can buy them from Swinging Sticks. Here's an explanation of my approach here's a render scene sticks.c4d might amuse someone
  4. jed

    Xpresso workflow speed up

    I don't use set driver, but I understand the nodes in the generated XPresso somehow get their name from what the XP tag is attached to - which means copy and pasting all your various bits of set driven XP into one window would probably break things. Much better to write your own XP and put the tag on its own null. This way you can also fix priority problems by re-arranging the object manager order. Re: names - if you rename an object in the OM, the resulting node takes that name. Tags can be renamed in attribute manager basic > name, which shows up in the XP window eg change 'Align to Spline' to 'Camera 1 align to spline'. You can also rename some (not all) of the XP operators in the AM eg change Compare to 'Compare != 0'. I also recommend using remark nodes (under general) for comments.
  5. On the subject of cheap, I have Camtasia and for audio I use a Microsoft USB LifeChat headphone + boom mic. Has an inline amp so you can hear your voice through the cans without any delay (a common Windows problem). Amazon UK do them for about £22 link. I've only used them on Windows - can't vouch for Mac.
  6. jed

    Tennis nonsense

    Here's the scene if anyone's interested tennibot.c4d I've tinkered with the math - finds the balls a bit better
  7. It's Wimbledon in the UK at the moment, and I saw an interesting robot tennis ball collector on TV - so I had a stab at making one. Here's the 1st working version - here's an old video of mine, where some bots play actual dynamic tennis
  8. jed

    Light flickering interval

    Since the light flash is very short - 1 or 2 frames - maybe actually specifying which frames the light is on would be a better idea. It would be a bit difficult in XPresso, but easy in Python. Here I made a list of the 'on' frames, and test if the frame loop value is on the list def main(): global intensity frame = doc.GetTime().GetFrame(doc.GetFps()) loop = frame % 30 L = [0, 1, 6, 7, 12, 13] if loop in L: intensity = 2 else: intensity = 0 3flashespython.c4d I know people run a mile from coding, but sometimes it's simpler.
  9. jed

    Light flickering interval

    The vibration method will give random flickers - that drone seems to be a regular cycle of 3 flashes (or is is 2) with a gap. If that's what you want, try this file. There's a modulo on frame count, that counts up to a value and repeats. Test the modulo out = 0 to trigger a monoflop timer. This outputs a 0-1 linear ramp that can be rangemapped to give 3 light pulses. The monoflop duration controls the length of the 3 flashes. You can change the RM spline to give different shape of light pulse. If you actually want random flashes, I've got some other methods. 3flashes.c4d
  10. jed

    Smooth Interpolation

    The thing I've noticed about ray collision, is that when there's no collision it still generates a value - usually the center of one of the objects - so any smoothing would be smoothing to + from that intermediate point. Although I have some smoothing methods, if in your scene the ring has 'no collision' state, this could be a problem. Anyhow, the easiest smoother I use just takes a % of the difference between input and output and adds that to the input, so output approaches input smoothly. It works OK for things like a camera following a jerky object. Here's the scene with the python smooth added - raymulti5.c4d but it doesn't really work. There might be a way to use delay effector - but I'm not very proficient with cloners etc.
  11. jed

    Smooth Interpolation

    Have you tried project settings, dynamics, expert, steps per frame. Increasing the default to say 25 or 50 sometimes fixes dynamics. For instance, if an object is moving fast it might intercept a surface even though in theory it should not. Upping steps per frame can give a more accurate calculation and prevent this.
  12. jed

    Smooth Interpolation

    There's subframe in the dope sheet, but I've not used it. Maybe try higher fps ?
  13. I simplified the python in this version - might be easier to adapt to your purpose raymulti4.c4d
  14. I've cobbled together a quick fix to automatically switch object - not all that elegant, but I'll have another look tomorrow. I made a 3rd list 'hit list', a 1 in the list indicates which object is collided. This value becomes the selected var. If there's no hit (ie between objects), I hide the circle and feed dummy value of 0 to the vectors. This is to stop the circle staying where it last was, and to prevent yellow error condition. It's a bit of a hack. I think the correct way is try + exception, but I'll have to google that (or you could LOL). press play on this file raymulti3.c4d no guarantees, but no error messages in the console ...
  15. This is expandable, stores the vectors in 2 lists raymulti.c4d
  16. I have some smoothing methods for position. Doesn't always work with rotation, but might interest you. In this file there's a sphere with a vibrate tag (camera target) and a cone that follows it smoothly, by adding 10% of the difference between input and output to the input smoothcam.c4d
  17. I'll have a think about multiple objects. Re: Python + Iteration, I've tried that and they don't play well together. Python seems to see each iteration step as an event (ie recalculate). This can sometimes cause problems. Meanwhile, I realized there might be an issue with the cube going below the surface - the cube gets selected rather than the plane. I've added a bit of logic to fix that rays7.c4d
  18. I got an email from one of my suppliers featuring this card at nearly 10 grand. I checked on Amazon - they sell them, and it's not an error. Maybe it's good for mining. I use a GTX 750 Ti ...
  19. What about 2 ray collision nodes node #1 test if cube hit, if not must be plane node #2 use result from #1 to select cube or plane as input rays6.c4d BTW - I'm not very good with matrix (I just copied your code). Is there a simple explanation for Vector2 Matrix and Matrix2HPB, since you're starting with a vector ?
  20. I don't know anything about plugins, but I had a similar problem recently when trying to reference a data file located in the same folder as my C4D scene, without resorting to the full path name (ie to make the folder more portable). This code worked for me import c4d, os def main(): directory = doc.GetDocumentPath() # get doc directory datafilepath = os.path.join(directory, 'testfile.txt') # get data file full path you might be able to adapt it to your needs edit - this is the full answer I got from cg society import os def doc_path_join(doc, *filenames): """ Creates an absolute path given by a document and a filename. The document must have a path, otherwise ValueError is raised. Example: doc_path_join(doc, "test.txt") # /example/path/test.txt doc_path_join(doc, "..", "test.txt") # /example/test.txt doc_path_join(doc, "tex", "test.txt") # /example/path/tex/test.txt @param doc Instance of c4d.documents.BaseDocument. Must have a document path. @param filenames Strings as filenames. """ directory = doc.GetDocumentPath() if not directory: raise ValueError("document has no path") return os.path.join(directory, *filenames)
  21. You don't need the rangemapper to convert to percent. XPresso treats 0 - 1 decimal as 0 - 100%. > Mr Pedantic
  22. Another from the guys about the perils of using unconditional jump https://xkcd.com/292/ explanation
  23. coding joke https://xkcd.com/1695/
  24. I thought doc was a built-in variable, although c4d.documents.GetActiveDocument() must exist for a reason - I've seen people include it. I'm with you re MAXON Python SDK - hard going to say the least.
×
×
  • Create New...