Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/16/2023 in all areas

  1. I would like to present an intermediate level C4D/Python script based lesson in the form of a solution to a cumbersome task, were it to be performed via the Cinema 4D UI manually. The script takes a source multi-segment Spline object and splits it into single-segment Spline child objects that are far more amenable to further editing via the Cinema 4D UI. At least some fundamental (i.e., beginner/intermediate level) knowledge of Python and Cinema 4D would be a good idea as a pre-requisite, prior to embarking on understanding a script at this level of complexity. I don't mean to scare anyone off, but be prepared to learn along the way if you are not starting from at least a beginner Python/C4D level of baseline knowledge. The goal here is not to teach introductory Python programming or introductory Cinema 4D modeling, but rather to teach how Python can be used to automate tasks that can be cumbersome or nearly impossible were they to be performed manually via the Cinema 4D GUI. Depending on the interest for C4D/Python instruction at this intermediate level, the perceived value of instruction presented in this format, as well as the usefulness of the ideas presented and how said ideas can be implemented in C4D/Python, this may become the first lesson of a series of similar lessons that I will post on the forum going forward. This instruction may evolve in terms of both format and content, based on the comments/interests of Forum users that find this educational information interesting, instructional, and ultimately useful [i.e., of value in terms of enhancing their C4D/Python skillset]). The source code presented can be dropped into the Cinema 4D Script Manager to perform the operation described, which can be likened to a command. More importantly, this source code, unlike almost all of the other C4D Python source code you will find "in the wild," is fully commented, teaching you all of the steps involved in accomplishing this task, the issues one may encounter, and how said issues can be overcome with a combination of out-of-the-(bounding)-box thinking and a good helping of "elbow grease." A little bit of humor and cynicism is thrown in for good measure, in an effort to make the learning experience more pleasant and the techniques presented more memorable. The script does contain a reasonable level of error checking, with almost all errors being raised as exceptions. In the event that one occurs, you can see informative text describing the nature of the error, using the C4D Python Console which you can bring up via the following steps: - From the Main Menu, select Extensions / Console... - When the Console window pops up, make sure that Python is selected in the left pane to show Python output and allow for command entry into the terminal in the right pane of the Console Window. When the Script is executed, any error messages that get raised as exceptions by the script will be outputted to this Python terminal window by Cinema 4D. A brief note on style: I've used two spaces rather than four for indentation purposes, because some of the lines of code, especially with all of the comments I sprinkled in, are already pretty long and I did not want to increase the line count any further. I also did not break the code up into functions, keeping the logic flow fairly linear, for instructional purposes. If this code is integrated into a larger project, it would behoove the developer using it to wrap the code into classes and member functions, etc. Otherwise, feel free to use the code in whole or part as you see fit. I make no guarantees about its validity or applicability for any purpose whatsoever. It is only meant to be instructional in nature and no more. Pre-requisites: - A relatively modern version of Cinema 4D (at least one with Python 3.0 and proper support for typing) - In terms of the object to perform the operation on: A single Spline object should be selected that is a non-parametric Spline object made up of two or more segments Here is a set of steps you can use to create a multi-segment Spline object to test the functionality presented in the script: - Create several parametric splines (e.g., a Rectangle, an n-Side, and a Flower). - Select all of these Spline Objects - Issue a "Connect Object and Delete" command to combine them all into a single multi-segment bearing Spline object Have fun and will perhaps post a sample scene and the effects of the script in the not too distant future. Also, if you discover any bugs, please point them out and I will correct them in the code. The full Python script is below (to run this script, create a new script in Script Manager and use the following code to replace the boiler-plate code that normally gets generated for a new script): Let me put our script to practice with a sample scene. Let's start with a Platonic object: Next, we'll make the Platonic editable, go into Edge Mode, select all of the (former parametric) Platonic's edges, and finally, issue the Edge to Spline command. The result looks as follows: Now, we will select our newly created (composite) Spline and its Type property to Bezier, leaving the remaining properties unaltered from their defaults. This change will produce a far more interesting artistic reinterpretation of the original Spline, as shown below: This complex spline is composed of multiple segments - eleven, to be exact, but who's counting: ..., and that, my friends, will provide us with an interesting source Spline object to apply our script to, as we attempt to separate all eleven of the component Spline segments that make up this composite Spline into separate single segment Spline objects of their own.
    2 points
  2. Hi all We are proud to present first in line of our new trainings for CINEMA 4D 2023. The first in upcoming series is aimed at beginners. Trainings are in English, easy to follow and packed with valuable info. For more details check the description in store: https://www.core4d.com/ipb/store/product/40-vol1-introduction-to-c4d-2023/ Note: Link will work only for registered members Trainings are joint effort between me (Igor) and other CORE 4D members. We will also create content for Houdini using same female voice artist for consistency over whole training line - stay tuned!
    1 point
  3. 1899 - TV Series Genres: Drama, Mystery Synopsis: 1899. A migrant steamship heads west to leave the old continent. The passengers, a mixed bag of European origins, united by their hopes and dreams for the new century and their future abroad. But their journey takes an unexpected turn when they discover another migrant ship adrift on the open sea. What they will find on board will turn their passage to the promised land into a horrifying nightmare. Trivia: This is the first project which the German Motion Picture Fund awarded its maximum funding sum, 10 million euros. Netflix canceled the series, so there will be no more seasons.
    1 point
  4. While watching the promo page on Left Angle's website I had the feeling of travelling back in time, to the early 2000s. All the features, all the example, felt so old. https://www.left-angle.com/#page=95 Bragging about chroma keying, 2D planar tracking, interactive adjustment, interpolation presets or linear color space in 2023 is totally anachronic. These are 20 years old technology, implemented everywhere since 2005. No modern tools are mentioned. This "new" software doesn't include particles simulation, dynamic constrain/motion, 3D tracking, volumetric effects, AI driven tools (like automatic keying or texture replacement), Grading tools,... I don't see anything truly innovative. The showcase page is embarrassing. There a only two example: reusable lower third template and automated weather forecasts (!) https://www.left-angle.com/#page=17 The blog is not better. The only spotlight is for, drum roll, a defocus filter ! As if defocusing with a depth map was something to write about. https://www.left-angle.com/#news=49 Sorry to be so negative. I'm always enthusiast when I new software appears, and I'm actually looking for a strong compositing software, but this website is a joke. I hope the product is not...
    1 point
  5. Hi Bezo! Super happy to see you still after all these years being one of the first to reply to my crazy questions! Yup, with the same company. Haven't used Cinema4D in many months and excited to get back at it again! What's more, your solution worked! 😄 Thank you so much @bezo! Also thank you @Vizn for the idea!
    1 point
  6. Dear visitors and members You can become a member for free and fully enjoy the forum with minimal limitations, however, by purchasing membership fee you become registered member with full forum rights and access to all associated services. By subscribing you directly support the C4D and related community, spam defense, hosting and maintenance, creation of youtube training videos and plugin creation. Membership is small, symbolic fee of 5 Eur (5,25 USD) for 3 Months and can be cancelled at any time. Membership purchase link https://www.core4d.com/ipb/store/product/38-membership-fee/ Thank you very much for the support so far! Core Staff Note: Cancellation of membership is done through paypal account
    1 point
×
×
  • Create New...