-
Posts
2,189 -
Joined
-
Last visited
-
Days Won
66
Community Answers
-
jed's post in Collision without losing energy was marked as the answer
An XP version is probably going to be non dynamic.
Here's a Python sim -
if you want the sphere to roll, you'll need Roll It or equivalent
sph2.c4d
Roll-It 2020 EN – eggtion.net
-
jed's post in Bounding Box Hierachy in Python/Xpresso was marked as the answer
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.
-
jed's post in Nodes - Cloner Object Disappearance was marked as the answer
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
-
jed's post in Dynamically scale and move cubes within a grid was marked as the answer
Was it this
Divider_demo_scene.c4d
Divider plugin.zip
-
jed's post in Motion of connected objects (loops and arrows) was marked as the answer
XPresso method
rotor.c4d
-
jed's post in Xpresso C4D question was marked as the answer
Here's a compare node set to >=. It gives a 1 or True when frame is >= 30.
-
jed's post in Xpresso C4D question was marked as the answer
Here's a compare node set to >=. It gives a 1 or True when frame is >= 30.
-
jed's post in Xpresso C4D question was marked as the answer
Here's a compare node set to >=. It gives a 1 or True when frame is >= 30.
-
jed's post in If else Loop was marked as the answer
I think this does it
def main(): global Output1 # n is number of mats for a in range(n): if Input1 >= Input2 * a and Input1 < Input2 * (a + 1): Output1 = a
-
jed's post in Not sure where to start on Animating a Pump Jack was marked as the answer
Here I used xpresso to rotate the lower object and dynamics to push the rest
pump 4.c4d
-
jed's post in increment a stored value by 1 each frame was marked as the answer
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.
-
jed's post in Looping animation: How do objects find their way back to its initial state? was marked as the answer
If you keyframe dynamic off the objects return to start position in 'transition time'.
https://www.dropbox.com/s/686bd38ap4npqiv/rocks3.c4d?dl=1
-
jed's post in Lagging sweep on Spline Dynamics spline was marked as the answer
Baking the scene seems to fix the lag. Spline dynamics can be left on default.
-
jed's post in Hinge connector not working on organic shapes was marked as the answer
You were trying to extrude along the spline instead of at right angles, creating overlap
extrude is x y z, you used z but should have used x
-
jed's post in Generating Number Sequences Using MoGraph with "00" before numbers was marked as the answer
Assuming you're using Noseman's method of getting the text from the name, it's possible if you use python zfill and make the cloner editable -
import c4d #Welcome to the world of Python def main(): global Output1 Output1 = Input1.zfill(3)
zfill pads a string with zeros up to the max character count in brackets.
zfill.c4d
Noseman's method - Generating Number Sequences Using MoGraph in Cinema 4D - YouTube
-
jed's post in Xpresso setup breaks when animating Sweep was marked as the answer
I put the sweeping in the iteration
xpresso_setup_issue_0001.c4d
-
jed's post in Animated rowing motion - stumped! was marked as the answer
You could point the oar at a null moving on a circle - align to spline. On R20 AFAIK align can't go past 100%, so I used modulo 1. Later versions don't need the modulo node.
rowing_0001.c4d
-
jed's post in Animated rowing motion - stumped! was marked as the answer
You could point the oar at a null moving on a circle - align to spline. On R20 AFAIK align can't go past 100%, so I used modulo 1. Later versions don't need the modulo node.
rowing_0001.c4d
-
jed's post in Collision trigger/sensor system issues was marked as the answer
My (expandable) python solution -
sensors under a null, using hierarchy + a ref node (down)
same in Python GetDown() = down
lister is an empty list where 0 = target not hit, 1 = target hit
for loop iterates through the cloners and if a target is hit, puts a 1 in the relevant place in lister
now test if there's a 1 anywhere in lister > light up cursor thing
py 1.c4d
-
jed's post in Constraint tags in Python was marked as the answer
Here's a workaround. I used GetTags() and specified which tag I wanted.
Here I set a cone as the parent of the cube. I just dragged the fields into the window and did some editing. Some fields seem to have numerical names.
def main(): obj = doc.SearchObject('Cube') obj2 = doc.SearchObject('Cone') tag = obj.GetTags()[0] # assuming constraint is 1st tag tag[c4d.ID_CA_CONSTRAINT_TAG_PARENT] = 1 # enable parent tag[30001] = obj2 # Cone is parent
there's probably a correct way to do this 😀
-
jed's post in Need Someone To Convert SKP to C4D was marked as the answer
I think there's a couple of tex missing
lamp.zip