Jump to content

jed

Limited Member
  • Posts

    2,189
  • Joined

  • Last visited

  • Days Won

    66

Everything posted by jed

  1. @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/
  2. 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
  3. jed

    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
  4. 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 ...
  5. jed

    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.
  6. 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
  7. 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.
  8. More info on the base80 wheel - BaseWheel1.7.c4d base80onaspline2.c4d
  9. Look in my file - there's an XPresso tag for the base80 wheel with some matrix math.
  10. The base80 wheel is a bit like Roll It. You adjust the wheel radius and move the assembly using the parent null, and the wheel rotates correctly. In this file the base wheel is in another null, on a spline. base80onaspline.c4d In a vehicle, you can connect a (hidden) base80 wheel rotation to the real wheel rotation using XPresso. Just make sure both wheels have same radius.
  11. Interesting problem. Here's my XPresso python node idea - has press button. Position is local. def main(): global X control = doc.SearchObject('control') X = obj[c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_X] # get X if control[c4d.ID_USERDATA,1] == 1: # if button pressed X *= -1 control[c4d.ID_USERDATA,1] = 0 # reset button back to off switchx.c4d
  12. I don't think obj has any special meaning (like doc, op etc) - it's more of a convention. Could have been for thing in mylist: <perform task on thing>
  13. jed

    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
  14. I'd say the best approach is to learn a bit of XPresso and create exactly what you want. It opens up a whole new world of animation possibilities - and is a lot of fun. > my $0.02
  15. I have a theory : programmers just get to do number crunching - but with C4D, programmers get to move stuff around. I guess it's an incentive.
  16. lol - I thought he meant 'piece of ****'
  17. I had a quick Google for Python dictionary and came up with this - make sure you get the correct curly/square brackets (and compile after editing) lookup.c4d in Python, you should also check in menu - script - console for error messages
  18. I use Python, so this is just a guess. In Python double equal is reserved for an equality test, single equal is used to assign a value if Input1 == 'A': Output1 = '1' If you've never used Coffee or Python, maybe you should learn the latter - there's more Python videos on YouTube, and I think Coffee is being phased out of C4D. Although I don't use them, in Python there's 'dictionary' - which is like a list of data pairs that can work as a look-up table to save all the if-this then-that typing.
  19. @pfx the speed's rangemapped down to 50% at max Y. Also there's a cosine of the incline angle component, to allow for a slope being longer than its 'sea level' distance.
  20. This is one of my on-going projects - a unicycle on some landscape. You can manually steer the unicycle in the viewport, but in this video it's switched to random. Uses the Base80 wheel. A breakdown (of sorts) with info about the Base80 wheel here (video). scene omscenes.zip if the scene plays too slow (eg on a laptop), disable any shadows or reduce landscape segments.
  21. I guess the story inspired this xkcd https://xkcd.com/740/
  22. On R19 your script's indents were a bit out, and it worked ok after I lined everything up. I thought the only difference to XPresso with newer C4D versions was curved vs straight wires. Your Python looks like this on my system what does my straightened out version look like on your R14 indents.c4d
  23. Is it me, or does that date-time method not update in real time ? Here's my version using ctime - timeline needs to be running hourminsec.c4d
  24. You might want to do modulo 12 on the hour value :)
  25. ... at your favorite Cafe. I know scrolling LED text is a bit old hat, but I've been playing with a different method recently that might interest some of you. In Photoshop, I made a pixel sized long message using a dot matrix font - like this then uploaded the jpg to this site that converts images to binary 0s and 1s. In Python, I read the resulting text file as a list of lines. These lines are rotated by removing the 1st value and adding it on the end. This makes the message scroll around (and loop). The binary is written to an array of spheres. Looks like this - the building is a freebie from Pixel Lab. Here's the scene file - scrolldemo2.zip you'll have to edit the location of the text file on line 28 c:/users/jed/desktop/latebar.txt to your info to make it work.
×
×
  • Create New...