-
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
-
A bit out of my comfort zone with base objects, but by trial and error I came up with this def main(): global x, y, z, position position = obj_in[c4d.ID_BASEOBJECT_REL_POSITION] x = position[0] y = position[1] z = position[2] seems like you can treat the position vector as a list and extract items. You might need ABS not REL. https://www.dropbox.com/s/1nmdpjwi9x3x87n/vector.c4d?dl=1 BTW did you post the wrong file ? post the original so I can have a look at the problem
-
Since you are a bit new to rangemappers (and possibly XPresso), maybe I should point out how % works in C4D (you have probably sussed this out already, but might help someone else). If you have RM input and output ranges set to 0 - 100%, and input say 50% from a slider or other node, then hang a result node on the output it shows 0.5 not 50. This because XPresso treats % as a decimal 0 >> 1. It confuses some people the first time it happens - double checking your math etc. A similar thing with degrees - if both RM ranges are set to 0 - 360 deg, and you input 30 deg, a result node on the output shows 0.524 because XPresso uses radians (2 * pi radians = 360 deg, 1 rad about 57 deg). For these reasons, I prefer to just use decimals and radians for my XPresso stuff then I know exactly what's what. A lot of C4D users think they have to use the degree node to (unnecessarily) convert degs + rads back and forth when using XPresso for wheel rotation calculations etc. There's no need - when you use degrees (or %) in the GUI, XPresso just converts them anyway.
-
Are you saying the rangemapper is calculating outside the range - have you got clamp checked ?
-
I see why you used 2D now. In fact I'd never noticed that 2D vector option in user data - so I learned something today as well.
-
Your file has a heap of stuff I don't seem to have. This is how I'd do random speed on a spline, using noise - it's smoother than random numbers that jump all over the place every frame. https://www.dropbox.com/s/gqtw4im42g0spk3/rndvarspeed.c4d?dl=1
-
Not sure why you are using 2D, but here's a 1D file. I think you are getting invert and negate mixed up> Invert is reciprocal ie 'one over' 1/x. Negate means multiply by -1. There's also a reverse checkbox in rangemapper. Percent often confuses people - percent in the XPresso window is actually decimal 0-1 eg 35% is .35 . Same goes for angles - degrees in GUI, radians in XP window. I prefer to stick with the units used in the XP window, then I know where I'm at. Some 1D teeth https://www.dropbox.com/s/watezvyegz5go68/teeth.c4d?dl=1
-
This is a project that came to being thanks to a free model from SketchUp. I've an interest in electronic traces on screens eg Lissajous curves, spirograph traces etc and needed an oscilloscope to display an audio sweep. Turbosquid wanted $100-200 for a really nice 'scope, but luckily I found a half decent one free on SketchUp that was usable with a few tweaks. The next problem was the math. The human ear is logarithmic ie works on powers of 2 (octaves on a piano is a doubling of frequency), so I wanted to use a log frequency sweep (linear just sounds wrong). I delved into exponential math and came up with this. The display and digital readout correspond quite well to the frequency heard. Screen is a movie used as a mat, font is Digital Readout Upright. 10MB file for screen https://www.dropbox.com/s/bfmfps9emp8dwtv/sweep.zip?dl=1 audio tone/sweep generator free from here just a bit of fun really
- 1 reply
-
2
-
I don't think I've seen it mentioned here before, but I found a source of free 3D models yesterday - SketchUp 3D Warehouse. Seems to be a place where hobbyists upload their stuff, and reading through the T & Cs it looks like you can use the models for any non-commercial use. Here's a free computer I found I got a couple of semi trailer rigs, and there's also some half-decent city scapes eg NYC here the sketchup files have skp extension, and you can just drop them into cinema, although I've found that if there's a choice of versions an older one (say 2014) works best. https://3dwarehouse.sketchup.com/index.html apologies if this is old news - it's new to me
-
@SolarPH what I meant was - something like: I need to control a light so that switch A does this and slider B does that. Your simplified version is your solution to whatever the original task was. Trouble is, I can't work out what the original task was from your solution. I'm also not sure what C motion has to do with things. A simple bit of python in a node can often be a solution to a complex truth table type xpresso problem. Not number crunching, just something like if A > B and C < D: output = blah elif A == B and D > C: output = blah blah else: output = fall back default if you get my drift
-
@SolarPH sorry, but I think I'm wasting your time. Can't make any sense about what you are trying to do. Good luck anyway.
-
You are thinking of the compare node - condition routes the inputs to the output, selected by switch ( < Mr Pedantic ). I had a look at the C4D file - it's a whole bunch of renamed operators and nested X groups with no description of what it's supposed to do, and not even 1 remark node. I'm an XPresso user, but the chances of me reverse engineering that code, working out what its function is and fixing it is zero. Maybe @SolarPH could post a simple file with just a few nodes explaining the problem eg I have inputs A, B, C and I need output D. Screenshots don't show data types. Color in XP can be tricky at the best of times - RGB, HSV, 360 deg, 255, % meaning decimal etc, although most things can be resolved with colorspace and vector2reals.
-
Might be easiest to edit the audio with something like the free Audacity . Here's a snip using the envelope tool - manual here Windows and Mac also has a compressor, which can smooth things out [don't know if it's my computer, but the 1st part of your question seems to be in invisible black font]
-
TBH I wasn't exactly sure what a spline segment was - had to ask an expert here. I'd always assumed that if you had a regular spline with 4 points, then the 3 bits between the points were called segments. Apparently I was wrong - a single spline object that consists of multiple splines (like text) has segments. filed under 'learn something every day'
-
AFAIK you can't access individual clone size, although there is a workaround - and it's a bit of a fudge. If you make the cloner ghost dynamic (doesn't actually fall with gravity), you can use dynamic nodes eg body state to get to each clone. For some reason the XPresso tag has to go on the cloner, and being dynamic the timeline has to be advanced a few frames for the math to work. See snip - If it's just for setup purposes, you could go to F5 and make the cloner editable, then the sizes would stick. https://www.dropbox.com/s/2wi21g9zyxl7ni6/clonespline.c4d?dl=1 If it was just iterating cylinders on stuff, and doing some math - that would be easy. I was going to say credit, but maybe the word is blame, to member Teknow for the above ghost dynamic fix.
-
How about a plug for Gilles Tran, who made the free Creative Commons License Mini http://www.oyonale.com/modeles.php?lang=en&page=58 my favorite car
-
I used Python for keyframing friction with align to spline position as parameter def main(): global rw_friction if position > 0.17 and position < 0.3: # 1st drift align position start/end rw_friction = lo_friction elif position > 0.45 and position < 0.53: # 2nd drift rw_friction = lo_friction elif position > 0.67 and position < 0.82: # 3rd drift rw_friction = lo_friction else: rw_friction = hi_friction # if not in drift zone, use normal friction sledgehammer nut style
-
The angular damping is set crazy high - 99% IIRC.
-
This might amuse someone. I've been chatting to member Tans who wanted to make a dynamic car drift. Must be hard IRL because I found it impossible in Cinema. However, I came up with one idea - to ditch the motors and drag the dynamic car with a spring on a spline. Then you just got to keyframe the rear wheel friction on the corners. The front wheels point at an object a bit ahead on the spline, so it looks like it's steering. I had trouble posting this earlier, so apologies if it appears twice
-
There's a bit of crossposting going on here. This is the last file I uploaded https://www.dropbox.com/s/b0e1x6idxowjz5n/fixedcar2.c4d?dl=1 I made the car 4.5m long (like say a Corvette), and changed the custom center to X -31cm (mid wheelbase) and Y -55cm (to stop flipping when cornering fast). The car drives OK so what's next ? I'm not sure what the last file in the last post is all about. Are you trying to steer using hinges and dynamic wheels - because that won't work. You can't move rigid bodies with XPresso when the animation has started. Use wheel suspension - not hinges and XPresso. And what is the spring supposed to do ? ( < rhetorical question ).
-
Sorry - I made an error with the fixed car. Will upload another version shortly. I think I scaled the car too large - I'm used to seeing cars in Z direction, so was looking at wrong axis. BRB. try this one https://www.dropbox.com/s/b0e1x6idxowjz5n/fixedcar2.c4d?dl=1
-
I'm not sure which file is which, but I fixed the car you first uploaded. I put the motors etc inside the car and scaled it up to real car size ie about 3m. C4D car stuff works better with lifelike car sizes. I lowered the center of gravity (custom center) so car doesn't roll on corners. I put the suspension different front/back because the car's heavier at the back. Your wheels are too round - no surface area for friction. If you need the tyres that shape, use hidden proxy dynamic wheels with the visible ones as children. Anyhow, the car now drives. Moral of the story - put motors etc where they are in real cars. When did you last see a car with an engine inside each wheel ? Cinema does its best to imitate real physics, so should you. https://www.dropbox.com/s/clwmzo7ratye1fz/fixedcar.c4d?dl=1
-
It's always a good idea to post your 'problem' files here for people to have a look at. There's a Cafe size limit, but you can leave out images etc to keep the filesize down. Also C4D files compress quite a lot with WinZip. Failing that, use DropBox or similar. I've tried in the past to get dynamic cars to drift, eg by keyframing friction for less grip at certain points, but have never had much success. Although C4D dynamic cars are a lot of fun, sometimes you've got to animate with keyframes, splines etc to get what you want. There's XPresso methods to rotate (non dynamic) car wheels correctly - driven by car position - so you just move the car on a spline and the wheels turn realistically.
-
Some of my Minis having a race
-
You seem to have the motors and suspension as children of the wheels. In a real car the motors and suspension are in the car body, and should also be in your scene. See zip file for 3 examples of how I rig cars. There's a car with manual steer and a car that follows an object (so has auto steer). These are just made from cubes etc. See the Mini car for how I rig a real car model. I don't make the actual model dynamic, but use primitive cubes, cylinders and put the dynamic tags on these. The hi-polygon model parts are children of the simple car. This makes the car drive better. The Mini file has a view switch so you can see the dynamic car underneath the real one. https://www.dropbox.com/s/lxmc6fhzwu2mbl7/3cars.zip?dl=1
-
I see it now - if time == previous, do not add to rotation (when clicking in viewport) if time < previous, subtract from rotation if time > previous, add to rotation took me a while to work out when time < previous == true > scrub the timeline - D'OH ! as Homer would say did @Gregor get his flipboard sorted ?