Jump to content

jed

Limited Member
  • Posts

    2,189
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by jed

  1. Don't think you can do this from XP
  2. Rad and bounding box work a bit differently - rad returns size along object x, y, z (result doesn't change when obj rotates) bounding box returns size along scene axis (result changes when obj rotates) here top is the parent null containing 3 objects import c4d from c4d import utils def main(): global x, y, z mg = top.GetMg() result = utils.GetBBox(top, mg) # returns 2 vector tuple >> center position and radius of bounding box radius = result[1] x = radius.x * 2.0 y = radius.y * 2.0 z = radius.z * 2.0 bounding box 3 objects.c4d Bounding Box position can sometimes give the 'wrong' result.
  3. Sort of - but it's a bit flaky. You can use the standard hierarchy path to go up/down etc using a reference node. I just used D to go down one level from sphere to figure, then similar XP as the radius to control the figure height. I tried using scale, but it exploded. Object Disappearance_0002.c4d
  4. Here I used Python to iterate the cloner. A small value is subtracted from the spheres radius every frame when in the zone. Object Disappearance_0001.c4d
  5. Yellow is often a math error eg divide by zero. Undefined is object not present eg accidentally deleted.
  6. I think this does the equal + opposite math part. If you move the cube, the pyramid moves accordingly. mirror.c4d Not really sure about the rest of the scene. I think you are using stuff that I don't have in R21.
  7. XPresso distance mode gives the linear distance between two vector positions. It's always a positive number. Then you multiply this by -1 which always gives 3 negative coords. For the difference between 2 x coords (or y or z), maybe use straight forward math subtraction.
  8. The AI voice sounds great IMHO, my only complaint is the resolution - was it recorded on an IMAX ? The text is too small on my HD screen.
  9. One of the first C4D clips I made 2 part harmony 😀
  10. Was it this Divider_demo_scene.c4d Divider plugin.zip
  11. A bit like this 😀 py_balloons.c4d
  12. The random integer preset gives a different, repeatable output every frame - which I'm guessing is not what you want. I've never managed to get the seed port to do anything. Maybe write your own version that only runs at F0, and gives one repeatable set of random lengths.
  13. Try this with the delay effector set to point deform bend.c4d Delay effector applied to object - YouTube not English....
  14. You can animate the formula spline if you break down the formula and in XPresso use a math add node with data type string. Then you can insert the variable you want to animate. Here I'm adding a phase shift to the sine argument - sine_anim.c4d there's a bit of distortion of the wave - probably needs more samples
  15. I didn't get the formula spline syntax at first. Like me you may be used to regular math syntax where say y is a function of x y = f(x) With parametrics, you introduce another variable t where x = f(t) y = f(t) By sweeping t from say 0 to 10, you get the full equation traced out (note that t is not time) So with the default formula spline pictured above, t goes from -1 to +1 meaning x goes from -100 to + 100 . Since sine outputs -1 to 1 , the vertical y displacement y goes from -100 to +100. Sine needs as its argument a value in radians.so as t sweeps -1 to +1, the argument goes from - pi to + pi (in degrees -180 to +180). Would probably make more sense if t went from 0 to 2 , giving the sine argument a range of 0 to 2*pi or 0 to 360 degrees - one complete sine period. Parametric equation - Wikipedia
  16. A bit like @HappyPolygonidea wave.c4d
  17. I learnt XPresso from seeing how other people solved problems and using their ideas, so I'd say build your own XP using some of my ideas. Since you're a beginner, here's some things that might need explanation. In XP all rotations are in radians 360 degrees = 2 * pi radians. There's a degree node that converts rads + degs, but I prefer to just use radians throughout. Although you can enter 3.142 for pi, this is not accurate enough and stuff can drift out of sync especially with many rotations . Better to use a constant node set to 2 pi. Might look the same, but it's actually 3.1415926525.... 😀 Modulo means count up to then repeat eg modulo 5 would give 0 1 2 3 4 0 1 2 3 4 - the 5 is never reached. percent % is decimal 0 >> 1 so 75% = 0.75 eg for cloner rate You can always hang a result node on any output for troubleshooting. A result node doesn't update the value while an animation is running - not till it stops. You can fix this by clicking Calculate, Animation refresh. All the logic stuff eg Boole OR, AND and comparisons >= etc output 0 and 1 for False and True. Unlike say Python which is very strict with data types (ie you cannot mix them up), XPresso allows you to connect anything (within reason), so a Boole True can be used as the integer 1 in a math calculation. Reals and integers can be mixed, A real can be plugged into the text input of MoText (you'd think it had to be string).
  18. I used to be into marble runs, albeit solid not soft body. Although it would be nice to have everything run under physics + dynamics, the balls don't always behave. eg a sphere running along a twin rail track often falls off especially on a curve. Where necessary, I used to have my dynamic marbles run in a hidden collider tube, with the rails just as decoration. You still get the dynamic movement. Where the spheres were not in a tube, I used other hidden collider cubes etc. Plus as @imashinationsaid, some wind objects 😀 Some solid spheres -
  19. The code is visible, so can be tweaked. I noticed there's an xrange which I believe was deprecated in favour of range for R23 +.
  20. cbr - are you thinking of the pile up effector ? pile_up_effector.c4d don't know if it works with more recent versions of C4D
×
×
  • Create New...

Copyright Core 4D © 2023 Powered by Invision Community