Jump to content

jed

Limited Member
  • Posts

    2,189
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by jed

  1. There's custom density and custom mass under the mass tab on the rigid body tag. I'm not sure how the units work.
  2. If you want to go the XPresso route, you could use a mix node data type vector to move the target position. mix.c4d
  3. No probs @srek BTW - I liked the way you used (time - previous time) to stop the unwanted calculation problem.
  4. You are adding to the position not the velocity. If your user data were actually acceleration, then making it a constant would result in the cube gaining speed. Try it - if the 'acceleration' is set to say 100, the cube moves at a constant speed. If it represented acceleration as you claim, a constant value would cause the object to increase in speed, getting faster and faster. gravity produces acceleration and is quoted as 9.8 m/s/s ie per second per second.
  5. I think that's speed not acceleration. Acceleration is the rate of change of speed.
  6. @HappyPolygon XPresso is evaluated once per frame (ignoring accidental calculation due to clicking in viewport) for train node RHS port = output z position (read) LHS port = input z position (write) every frame - the train z is read small amount added to this new value written to train z if we just did this, on restart train would be at say 500cm, so need to reset this to 0 frame is null outputs - True or 1 when F = 0 False or 0 when F > 0 condition node selects ports - switch = 0 selects 1st input port (normal) switch = 1 selects 2nd input port (reset) ============================= 100mph scale calculation - for 25 fps 1 cm/F = 25 cm/s = 0.559 mph (from Windows calculator) 1 cm/F >> 0.559 mph divide both sides by 0.559 1 / 0.559 cm/F >> 1 mph multiply both sides by 100 100 / 0.559 cm/F >> 100 mph 100 / 0.559 = 178.9 so 100 mph >> 178.9 cm/F this is amount added to z position every frame for 100 mph slider 50% = 50 mph etc ============================= as a test, in this file speed_test.c4d I keyframed the speed as 0 - 250F constant 20 mph 251F onwards 0 mph seems OK you might want to check my math 😀
  7. For 100% in my file to be 100 mph, I calculate the scale factor to be 178.9 note that any xpresso that uses addition in this manner will increment if you click in the viewport.
  8. You should generate the speed by adding a small value to z position per frame. When value goes down to zero, train slows to zero mph. speed.c4d
  9. Helix made with formula spline formula tubes.c4d There's a glitch when it passes 100%, but that's hidden underneath 😀 rail added - fixes glitch at 100% formula tubes 3.c4d
  10. There's different types of random - a repeatable random sequence - is same sequence every time scene is run a random sequence that is different every time a random sequence where a number can be repeated a random sequence where numbers do not repeat e.g. the random integer node from presets gives a repeatable sequence with no duplicates. You can get a different sequence by changing the seed. randint.c4d
  11. I got this proxy data trick from a guy called base80 who made an XPresso scene that had a sentence that measured its own length, and inserted the value into the sentence itself. If you edit the sentence and click in the viewport, the value updates 😀 base80.c4d
  12. Writing to user data and reading it back is one way to store and increment a value, although there's sometimes a 1F delay in reading it back. Since you know coding, why not use a python node, something like import c4d #Welcome to the world of Python def main(): global x frame = doc.GetTime().GetFrame(doc.GetFps()) # get current frame if frame == 0: x = 50 # start value else: if Input1: # bool input x += 1 This is evaluated every frame, but will increment when you click in the viewport - which is annoying. The fix is to check Frame Dependent so only calculates on new frame.
  13. jed

    Slowdown

    Speed is just an addition to the x value every frame. If you keyframe the amount added you can vary the speed. speed.c4d
  14. arrowTool_RS_0001.c4d well, there's no yellow 😀 edit - for newer C4D, I think print length is now print(length)
  15. @MighTthanks for your interest. The noncircular gears are one tooth cut from the spline cogwheel object and cloned on to a spline. You can't just use eg a rectangle with smoothing because the teeth go out of sync - so I have a few different methods. The clip with 2 extreme ovals started as a circle object set to ellipse with about 2:1 aspect. I added some points with the knife tool and used the scale tool to distort. I added some teeth and made an instance of the gear. I rotated the 2 gears to check for sync and adjusted cog 1 until they fit. Another method is to look online for blueprints and trace them in Cinema using ellipse, rectangle, N-side etc and the above knife method. Here's a set of drawings I have used - they all work well with each other. I also have a math method (used for my set of gears above) using the formula spline object. Starting with a circle using the formulas x = R * cos(angle) y = R * sin(angle) which gives a circle radius R. If you substitute for the radius a constant + small amplitude sine wave, you get traces like this - Since the size of 1 sine is the same in each example, they fit together when rotating. Here's the formula for a 3 lobe gear - base radius 300, small sine amplitude 40. For a 5 lobe gear replace the 3 with a 5 etc. With regular circular gears, you can use XPresso to get the correct speeds based on number of teeth, but that doesn't work for these noncircular gears, so I used dynamics. Each gear has a hinge and a motor with the motor target speed based on gear size. 2cogs.c4d
  16. Will these square planetary gears rotate ? set of gears 2 rather extreme gears 3 gears running on a sine wave base. The axles stay at constant height. noncircular gears are my current obsession 😀
  17. Here's my attempt I used formula spline to get the parabola and spline wrap blade2.c4d
  18. Is the random value created when the timeline is running, or is this more of a setting up a scene thing ? If you unpack the random integer preset, it looks a bit like this The random node can be free or time (it's set to time in the preset). Time gives a new random real in the range -1 > +1 every frame which is range mapped to the lo + hi settings. You need to add 1 because integer conversion rounds down (else you'd never get the highest value). Time gives a predetermined sequence based on the seed, Free gives a different sequence, new value every frame and also if you click in the viewport (or keep resetting F to 0). So - more info needed.
  19. This file generates a random integer in range 0-6 every 10F random integer.c4d might get you started 😀
  20. jed

    6 ellipses

    That's the weird thing - the motor is always on. My reasoning is that due to the hinge to gear contact point distance and the hinge to center of gravity distance, the motor does not have enough torque to move the 2nd cog in certain positions, and ditto with cog to cog transfer of angular momentum. It's a bit like why a door handle is at the outside door edge and not near the hinges. I think that's why the gears line up after being rotated. In this version I've turned the motor off and used a falling cube to give the 1st gear an impulse. 6 ellipses.c4d
  21. 6 dynamic elliptical gears with a hinge at the focus. Leftmost ellipse has an angular force (motor), others are passive. What do you think will happen ? Not what I expected 😀
  22. @Cerberain the BIOS, TPM also goes under the names of PTT (platform trust technology) on Intel and fTPM on AMD Ryzen.
  23. jed

    Animated Text

    Formula effector ? formula.c4d
×
×
  • Create New...