-
Posts
2,189 -
Joined
-
Last visited
-
Days Won
66
Content Type
Profiles
Blogs
Forums
Gallery
Pipeline Tools
3D Wiki
Plugin List
Store
Downloads
Everything posted by jed
-
Everything's connected to everything in this file. It's not very elegant, but works with random effector. You might be able to modify it to suit your needs. joincubes.c4d
-
How many connections - is every cube connected to every cube ie 5 cubes = 10 splines ? Probably doable with iteration. Tracer will connect all objects under a fracture with one spline.
-
@Havealot I'm sure you're correct, but I'm not all that good at mograph (read : world's worst). I initially tried using a cloner and accessing individual clones with formula effector id, but couldn't seem to make the values stick when moving to the next clone. I know it's a bit defeatist, but I usually find it easier to make a cloner editable and write some iteration in Python or XPresso. Re fields - I'm still trying to work out why this sound effector needs a field to work - even when there's nothing in the viewport.
-
I was watching Big Bang Theory on TV, and one of the guys had a T-shirt that looked a bit like a reflected audio volume display - probably is something else, but I thought I'd have a stab at replicating it in C4D. As per my usual methodology, I tried using mograph but couldn't get it to work - so I made the cloner editable. There's 400 cubes and frame count is set to modulo 400, referencing the objects sequentially in a sweep. Sound effector gives the Y size - for some reason it needed a field to get an output. Previous sweep gets overwritten (a bit like hospital machines). I chose a soundtrack that has some suitable guitar 'ching' to give something to look at - most pop is highly compressed. It's not rocket science, but might interest someone learning XPresso. R20 scene https://www.dropbox.com/s/odrff8qi6d7eyxn/vol5.zip?dl=1
-
Try using just one iteration node to drive things.
-
Any scene with a large number of objects usually means mograph cloner (+ random effector for the variation). My knowledge in Mograph is a bit lacking, but there's plenty of experts here that can help you. Re your original plan - I agree that dragging 1000 mats will be a hassle, but if you select all the objects and go tags > texture to give them all a blank tag, then make a similar number of mats, you can assign them with python. See before and after in these 2 scenes start.c4d end.c4d there's comments in the python You might find processing 1000 mats with noise too much for your pc...
-
If each object has a mat with different luminance, you're going to need 1000 mats. I don't think the same mat on all the objects can have different values simultaneously. That said, here's 5 cubes with 5 mats. I used object index to give each mat a different seed. xpnoise.c4d
-
Convert data to string def main(): global info a = 123.45 # numerical data info = str(a) Python port must be data type string edit - in XPresso, looping an output port back to an input at the start of a chain of nodes is generally not allowed. If the wire does not go green when you try to connect, this is the problem. Otherwise, Python errors are displayed in the console. Post the scene so we can have a look.
-
the perils of GOTO comes back to bite you...
-
The object list outputs an instance of each object in the list, in order, once every frame. The cube is a representative object. Connecting the instance to the object input port changes the specimen object to the instance - one at a time. Anything you do to the specimen object (scale etc) applies to all objects in the list. enable_all.c4d hint - when making an object list (or similar), set the little padlock to locked. The list window has a habit of disappearing when you click away.
-
It's to do with global and local variables. Local variables exist in def main, but to write values to the output port they have to be global - so they can exist outside def main. In a similar manner, any 'counter' type variable that increments every frame needs to exist outside of def main - it needs to be global so it persists when the code is run the next frame. This will count def main(): global counter frame = doc.GetTime().GetFrame(doc.GetFps()) if frame == 0: counter = 0 else: counter += 1 print counter so your code would be something like def main(): global red, blue, yell, counter frame = doc.GetTime().GetFrame(doc.GetFps()) if frame == 0: red, blue, yell = False, False, False counter = 0 else: if frame % f1 == 0: if counter < 3: counter = counter + 1 red = not red blue = False print counter elif counter > 3: counter = 0 although I don't think the last part gets executed
-
Try this - when red + blue are off, yellow flashes. I've used frames not Hertz - easier math until logic sorted out. flash2.c4d
-
I'm not really sure what sequence of lights you want. You could try inserting print statements to troubleshoot your logic. Print output is in the console, menu > script > console for example print (frame / 6) % rate then use keyboard G to step through the scene one frame at a time
-
I don't use coffee, but I think testing a value using time is not a good idea. The time value on a frame is a decimal, and you'd have to compare it to an exact value. Much better to use the integer 'frame' for comparison eg if frame == 8 can be evaluated correctly. If you just want an event to trigger every X frames, you can do it easily in xpresso using modulo (modulo counts up to a number, then resets to zero and counts again) looking at your code, I'm guessing you want to toggle luminance on/off at a certain frequency. Here's one way to do that using Python flasher.c4d
-
There's an off-beat panel show on UK TV called QI, chaired by Stephen Fry (of Jeeves and Wooster, Wilde fame) that often features quirky physics demo's. This usually inspires yours truly to have a go at recreating said demo in C4D. Recently, Mr Fry announced 'did you know I could knock The Shard over using a feather ?' (The Shard is a 300m tower in London). He then produced a set of blocks of wood of geometrically increasing size, lined them up like dominoes and hit the smallest with a feather. The 1st block hit the 2nd which hit the 3rd etc until the last (very large) block went down. The block increment was 150%, and SF claimed you'd only need 24 to knock down The Shard. Here's my first attempt - uses a pendulum to simulate the feather QI_scene.c4d
- 1 reply
-
2
-
You can use a data node to find the position of a particular clone, then locate the 2nd cloner at that position. locate.c4d
-
If you use radians, the angle a wheel radius R turns when moving distance D is angle = D / R XPresso uses radians Truck_c4dcafe2.c4d
-
Thanks for explanation - I think I've got it. Google just took me to stackoverflow, where the answers tend to consist entirely of reserved words...
-
@kalugin I noticed you used == for keys, I've read that it should be bitwise & - any thoughts on this ? 2 of my projects using kb input - ctrl, alt control flippers in this pinball machine (has sound) pinball.c4d use ctrl, alt to steer stickman on unicycle orangeman2.c4d
-
@BigAl3D Have you tried the base80 wheel ? You just make the wheel the same size as the vehicle wheel, and make the real wheel a child. You can also link rot P in XPresso. Works in any direction, as long as you move the parent. base80.c4d @HSrdelic that looks a lot like Roll-It
-
For actual bumper car movement, you'd need motors and wheels (and possibly random steering). You can detect collision in XPresso, then reverse the motor (or steering direction etc). Just getting things to bounce and keep moving for ever with dynamics is quite difficult. Increasing bounce % to achieve this can make things go crazy. Spheres seem to bounce best, and you can keep things going to some degree by detecting collision, then changing some size parameter eg constraining outer wall moves in on collision. In this file I've got some hidden spheres with visible stuff constrained to their movement (and hidden collision wall). You still get objects 'dead in the water' ... bounce.c4d there's some custom initial velocity to get things moving edit - there's some bumper car type collision detection in this video (from about 30s)
-
The plug in Roll It is good for rolling stuff. You put the sphere in a parent null, move the null and the sphere just rolls as if it were touching the ground. It can roll irregular objects, so has an auto radius setting, but for spheres, I've found manually setting the radius gives a more accurate result. http://eggtion.net/playground/cinema4d/roll-it-2017?lang=en BB8 Roll-It with landscape floor object edit - works in R20
-
Now I'm confused - there's no single answer to this problem because 100% strength gives different angles depending on the lengths Size.X and Size.Y , hence my XPresso. For a square object the lean angle is 26.565 deg.
-
Here's the math