Jump to content


Bronze Supporter
  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by jed

  1. I don't know anything about plugins, but I had a similar problem recently when trying to reference a data file located in the same folder as my C4D scene, without resorting to the full path name (ie to make the folder more portable). This code worked for me import c4d, os def main(): directory = doc.GetDocumentPath() # get doc directory datafilepath = os.path.join(directory, 'testfile.txt') # get data file full path you might be able to adapt it to your needs edit - this is the full answer I got from cg society import os def doc_path_join(doc, *filenames): """ Creates an absolute path given by a document and a filename. The document must have a path, otherwise ValueError is raised. Example: doc_path_join(doc, "test.txt") # /example/path/test.txt doc_path_join(doc, "..", "test.txt") # /example/test.txt doc_path_join(doc, "tex", "test.txt") # /example/path/tex/test.txt @param doc Instance of c4d.documents.BaseDocument. Must have a document path. @param filenames Strings as filenames. """ directory = doc.GetDocumentPath() if not directory: raise ValueError("document has no path") return os.path.join(directory, *filenames)
  2. re priority - make sure there is an actual priority problem before you start fixing it. Things that appear to lag are often OK when rendered (or baked). I usually adjust priority by moving stuff around in the OM (top down order), or priority values lowest = 1st. There's also a shift priority tag. I'm sure you know all this. I haven't seen much info on baking. For purely dynamic stuff I use doc settings, dynamics, cache, bake. For my more complex scenes (eg using randomness), I drag everything into the dope sheet and go functions, bake objects. Then I disable dynamics, xpresso, python, and anything that moves things. I use this method for team render, so all the nodes have identical data.
  3. I'd just have the small objects as children. no_springs.c4d
  4. Networking Mac to PC

    Are the Windows remote folders you are trying to see actually set to shared ?
  5. I'm not sure the jiggles are doing anything. The psr constraints show a small lag that looks like springiness as the inner follows the outer, but that disappears when baked. Maybe try a spring constraint ? I could be wrong ...
  6. Polygon reduction Falloff ?

    You don't need the rangemapper to convert to percent. XPresso treats 0 - 1 decimal as 0 - 100%. > Mr Pedantic
  7. Another from the guys about the perils of using unconditional jump https://xkcd.com/292/ explanation
  8. What about hidden dynamic objects with visible, slightly smaller, child objects.
  9. coding joke https://xkcd.com/1695/
  10. I thought doc was a built-in variable, although c4d.documents.GetActiveDocument() must exist for a reason - I've seen people include it. I'm with you re MAXON Python SDK - hard going to say the least.
  11. @SFXP some Python stuff for you - rangemap etc cheatsheets.zip BTW I wouldn't recommend learning Python inside C4D - too easy to lock up the program. I use the free Pycharm. https://www.jetbrains.com/pycharm/
  12. This is a problem I tinker with now and then. If you give each object a planar connector, this keeps them in one plane and upright. The trouble with dynamic bounce is that stuff either dies away or if you crank it up, you get crazy runaway/explosion. In this file I've measured the speed and used that to switch bounce lo or hi. It kind of works. bubbles.c4d I'll be interested to see if you solve this.
  13. XPresso nodes like compare, rangemap, clamp etc have equivalents in Python, but you have to watch out for data type. XPresso is quite forgiving when connecting say real to string, but Python is more strict. Also be aware that integer division gives integer result in Python eg 3 / 2 = 1 have to specify real eg 3.0 / 2 = 1.5 this can trip you up when using current frame as a value, and is due to C4D using 2.7 Python
  14. Link as Sweep-Contour

    You can put an instance object where the profile shape is in your hierarchy, then swap out the reference object. I've used XPresso here, but you can just drop the object in from the OM without XP. instance.c4d
  15. 10 mins @ 30 fps is 18,000 frames. Even with a very simple scene that renders 1F in say 5 secs, this would take about 25 hours.
  16. I was only half-serious about rotating the wheel.
  17. Since you've got theta, you could finish off by making the wheel roll, not slide - re: too many nodes for math - you might want to consider using a Python node. You have to 'import math' to use the trig functions, but it makes math a lot easier.
  18. Rotation issues with controller

    For some reason, it seems that cinema doesn't like driving global rotation P on that semi-circle object when it's a child. Use local P or pull it out of its parent and it behaves. Another C4D mystery ...
  19. well you did post in the dynamics section
  20. Here's a dynamic solution. The vertical part is collider, rest is rigid body. I've animated the up/down and put an angle limit on the 1st hinge to hold it to a min value when aircraft is off the ground. wheel4.c4d I always have difficulty with angle limit, so values might be out. I just tinker until it works ...
  21. OSC message, python, C4D

    I looked on the website, and it says ' Open Sound Control server and client implementations in pure python (3.4+) '. If this refers to minimum Python version, you might be out of luck. Current Python seems to be 3.6, but C4D is still on 2.7.
  22. I would have thought some kind of Python lookup table would be easier - especially when entering the data. I'm not much of an expert in color spaces, but here's a rather lame bit of code for RGB output showing what I mean. I've used lists in C4D Python with several thousand elements, so that's not an issue, although with your setup I'm not sure if the limitation is in the user data or the XPresso. lookup.c4d
  23. Using a vibrate tag for light variation sounds a bit convoluted to me (unless the vibrate is also doing other stuff). I'd use a noise node with a rangemapper set to 0.3 min and 0.45 max as @DeCarlo said. You can tweak the noise frequency although, randomness being what it is, the light will never actually be on 30% or 45%. To achieve that, you could maybe output a higher range and use a clamp node set to the desired values. flicker.c4d you mean the massive effort of making 3 nodes ? Maybe @gurugugu wants to learn XPresso.
  24. Sharp camera turn

    You could use a mix node (data type vector) to move the camera target null from A to B. There's a slider in this file, and you can tweak the speed/response in the timeline. aimA2B.c4d
  25. Vacuum Tubes ?

    I turned off my adblocker, and saw an ad at the Cafe for a render farm that boasts 'solid state servers'. Really ? Have they just switched over from vacuum tubes ? I wonder what Cinebench scores you get with a couple of pentodes ... for anyone under 40 - vacuum tubes solid-state