-
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
-
@HSrdelic but you don't learn about inverse trig :-)
-
By eyeballing it, it seems 100% corresponds to the top moving 1/2 of the width, so I came up with this. I put a cylinder in for comparison - type the result into rot B to check the angle is correct. arctan.c4d arctan is 'angle whose tangent is'
-
Thanks Igor. Version 2 has different camera angles If anyone's interested, to get the cut out I started with a plane and an approximate 3 point spline. I put 2 nulls at the ends of the rod and used XPresso ray collision to get the hit positions on the plane, then used that data and point node to set the spline points more accurately (plus structure and some math tweaking). I swapped out the plane for a cube, made a sweep on the spline, and stuck it all in volumes. Volumes seems to give nice smooth booles. R20 scene rod.c4d
-
I saw this interesting gizmo on YouTube, and thought I'd have a go at doing the cutout using R20 Volume Builder https://vimeo.com/288629613/708a352c47
-
I'm not too sure what behavior you want, but you can use a condition node to switch 2 values into the Lower from port. Cafe bijlage2.c4d
-
You can just multiply frame by 2 degrees - needs to be converted to radians. I'm guessing you need more than this eg start/stop times ? bend.c4d
-
@southpaw - the 'limit = 50' line should have been put higher up since it's not really in the modulo loop - should have been with the 6X vector list. I think I originally had the lines as if abs(...) > 50, but sometimes it's better to have a named value when troubleshooting (also quicker to change limit = 50 than to change 3 lines). So the speed of animation just consists of <find new vector and add it to position> every 2 frames. If the new vector takes the sphere outside the limit, it stays in the 'while loop' until a suitable vector is chosen. 'While loops' can be very problematic in C4D. If your code is bad and the program gets stuck in the 'while loop', you can't seem to halt or escape - you have to close C4D and thus lose any unsaved work. I usually develop code using Pycharm - a free python IDE. In Pycharm, it's easy to halt an infinite loop. You can write and test a function in Pycharm, then paste it into C4D. Although C4D python is different to regular python in that the code is repeated every frame (not just once), you can simulate this in Pycharm with a 'for loop' to some extent. Bear in mind that if you install Python 3.7 for use with Pycharm, there's some differences compared to C4D's v2.7 - mainly print syntax and integer division. I'm with you about MAXON Python SDK - it's like trying to understand Russian without a dictionary. I just look at other peoples code and steal bits that seem useful. The plugin cafe can be a place for this. Google search for python usually takes you to stack overflow. I've learned tons from that site, even though some of the replies seem to be written entirely in reserved words - a skill in itself. One rather obscure way I learn about programming in general is by randomly clicking through XKCD comics - many of the jokes are about coding eg this one . There's an Explain XKCD site where you can enter the comic number for in-depth explanations - eg code quality comic discussion. If you like, I could zip up half a dozen of my python scenes for you to look at. Not all are commented, but you might find bits you can steal. edit - re: syntax - are you aware that you can just drag stuff into python from the attrib manager eg camera focal length here def main(): cam = doc.SearchObject('Camera') cam[c4d.CAMERA_FOCUS] = 18
-
There's something about randomness and C4D that appeals to me - write some code, click play + see what happens. Different every time. This is quite a simple video using Python random - best viewed full screen on a large monitor, with speakers on. there's comments in the code random walk.c4d
-
In this file I used a copy of the initial random effector to reverse the random can rotation, dynamics proximity to get the clone index, and a bit of python ... cans rotate.c4d it's as close as I could get - some ideas for you anyway
-
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.
-
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
-
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
-
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.
-
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.
-
Here's the scene if anyone's interested tennibot.c4d I've tinkered with the math - finds the balls a bit better
-
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
-
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.
-
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
-
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.
-
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.
-
There's subframe in the dope sheet, but I've not used it. Maybe try higher fps ?
-
I simplified the python in this version - might be easier to adapt to your purpose raymulti4.c4d
-
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 ...