December 7, 2023 Hana Trieu

The relationship between Polygons and Memory in C4D and Octane

Geometry (or polygons) can affect the system’s performance in various ways. When talking about geometry, there are two areas to investigate – the number of polygons in a single object, and the total number of polygon objects in the scene. Both areas have different considerations and challenges. This article will focus on the number of polygons in a single object. We are going to look more into how polygons are treated and the relationship between polygons and memory in C4D and Octane. 

How polygons are treated in C4D and Octane

Polygons

A polygon is the smallest building block that makes up a 3D geometry object (or mesh) in a 3D modelling program. In Cinema 4D, “polygons” can be triangles (3 sides), quads (4 sides), or n-gons (more than 4 sides). However, Octane can only process triangles. Therefore, any quads or n-gons must be converted to triangles before the geometry passes to Octane for rendering.

Additionally, when a mesh is subdivided, it will split each existing polygon into smaller quads regardless of the original polygon’s type (triangle, quad or n-gon). These new quads also need splitting into triangles so that Octane can render. 

Baked polygons and generated polygons

C4D has two methods for creating and storing polygons. Polygons can be baked (C4D calls ‘editable”) and generated.

With baked polygons, the points, edge, and face data for each polygon are permanently stored in the C4D file. When this file is opened, all this detailed data is copied into RAM and remains there until the file is closed or the object is deleted. Since point and face data take up space, it increases the C4D file size (than using a generator – 70MB vs 300KB for a million polys).

With generated geometry, only a small code snippet is saved in the C4D file. Upon loading, this code runs and instantly generates the required number of polygons procedurally, storing them in RAM. They persist until the generator is deactivated or its parameters are altered.

Importantly, regardless of how they are baked or generated in C4D, all polygons take up the same amount of RAM space. All polygon objects must be temporarily baked before being sent to Octane for rendering. This is because Octane can only process explicitly defined baked geometry.

Subdivisions

Subdivision is a common technique used in 3D modelling to split existing polygons into smaller polygons, thereby adding more geometric detail or smoothing out a mesh.

Rather than directly specifying polygon counts, subdivision operates by increasing the level of subdivision. The level always divides the polygons by a power of four.

For a single starting polygon:

      • Level 0 is the original polygon (in the above example, it is one quad)
      • Level 1 divides it into 4 quads (4 total)
      • Level 2 divides 4 quads in Level 1 into 4 each, yielding 16 quads
      • Level 3 divides 16 quads in Level 2 into 4 each, resulting in 64 quads
      • This subdivision by powers of four continues up to Level 10, which would divide a single starting quad into 1,048,576 smaller quads.

While the levels have little impact on a single polygon as in this case, memory usage grows exponentially for more complex meshes as the base polygon counts rise into the thousands. Higher subdivision levels rapidly increase polygon counts through successive quadrisection.

Subdivision methods

C4D has a built-in Subdivision Surface object (SubD or SDS) that subdivides any nested polygon geometry. This method has the advantage of showing the results of the subdivisions in the viewport. However, it comes at the cost of slower viewport performance and processing time.

One important note is that Octane will only recognize the viewport subdivision level set in C4D’s SubD object, not the render one. 

In addition to Cinema 4D’s built-in Subdivision Surface object, Octane also allows for subdivision through the use of the Octane Object Tag. Setting the level in the Subdivision Group tab performs subdivision during rendering only. This preserves full viewport speeds without impacting previews. However, the final geometry isn’t visible until rendered. This method also uses slightly less of C4D’s VRAM compared to the built-in SubD object method. In case, the amount of VRAM you have is tight, this method is a better choice.

The relationship between Polygons and Memory

For optimization, keeping both the VRAM and RAM from filling up is the most important. Therefore, getting an estimate of how much our scene is using is necessary.

There are two useful tools for monitoring memory usage in a 3D scene. The Ctrl+I/Cmd-I window displays how much RAM is being used by polygon geometry in Cinema 4D. Meanwhile, the Device Settings tab in Octane’s preferences provides a breakdown of VRAM usage.

When approximately one million quad polygons are loaded into RAM, they typically occupy around 70 MB (0.07GB) of memory. However, the exact size can vary depending on factors like shared vertex and edge data in the mesh structure.

If those one million quads are changed to editable geometry in C4D and then converted to triangles with the “triangulate” command, the resulting two million triangles are what gets processed by Octane. To achieve only one million triangles in Octane, the initial quads would need to be half a million.

Storing the two million triangles in C4D increases RAM usage to around 117 MB, (~0.17 GB). It’s not precisely double one million quads due to shared vertex data optimizations. However, once sent to Octane, they use 367 MB (~ 0.37 GB) of the VRAM.

Getting a polygon count

The number of polygons in a 3D scene influences all aspects of the resources. When this number rises extremely high into the tens of millions, various issues can arise. The viewport slows down significantly due to lag. Both RAM and VRAM utilization max out, risking potential crashes. On disk, file sizes become unwieldy to manage. Render pre-processing stretches out to minutes or hours rather than seconds. Simply put, the overall experience degrades substantially.

Therefore, knowing polygon counts – both for the entire scene and individual objects – represents an important diagnostic concept. Multiple places are providing this data, each with advantages and tradeoffs.

In Octane

The simplest way to get an accurate triangle count is to initiate a render in the Live Viewer, which will report the polygon count. There are a few places to access this:

      • Live Viewer: This is the fastest and easiest way. There are data overlays on the Live Viewer. One of which states “tris” and has two numbers. The second number is the one we are interested in. While the Live Viewer is running, if those overlays are not there, we can right-click in the image area somewhere and choose “Toggle Info”, or just click in the middle of the image area a few times to turn them on and off.
      • GPU Information: Accessible via the Help menu in the Live Viewer, this window provides a more precise count down to the individual triangle.
      • Octane Log: Also in the Help menu in the Live Viewer, but this only gives a count for renders to Picture Viewer, not Live Viewer.

Important consideration: Octane needs to complete a render to report the count. If polygons are too high and processing takes too long or runs out of VRAM, C4D tools can instead be used to diagnose the issue.

Octane only counts geometry passed to it for rendering. For example, if there are 10 million polygons in the C4D scene, but 9 million polygons have Render Visibility disabled (bottom traffic light set to red), it will only see and count the visible portion, which is 1 million polygons. This is important when analyzing returned counts.

In Cinema 4D

The Ctrl + I/Cmd+I window provides a quick overview of total polygons, including both generated and baked polygons. While fast and easy, there are important caveats.

      • This is the total polygon count. It represents all polygons equally, whether triangles, quads, or n-gons. Therefore, a figure like 14,000 could translate to various triangle amounts depending on the polygon types.
      • Additionally, nested generated objects become double-counted. For example, if a plane with 1,000,000 quads is nested within a subdivision surface object, it would count the 4,000,000 polygons generated from the subdivision. However, it also includes the original 1,000,000 quads from the plane. This results in a returned value of 5,000,000 polygons, which is an inflation of 1,000,000 quads or 2,000,000 triangles compared to what would actually be baked and sent to Octane for rendering.

While the Ctrl/Cmd+I value provides a more accurate estimate of RAM usage, it is not suitable for determining the polygon count needed for Octane rendering. Due to the introduced inaccuracy from double-counting nested generated objects, it should only be used to gauge overall scene complexity, not for precision.

The two following methods report on baked polygons exclusively, not generated ones. 

HUD:

Hitting Shift-V brings up the viewport HUD. Under the HUD tab, ensure “Total Polygons” is checked. Then changing to Polygons mode at the top and selecting an object shows the count of its total baked/editable polygons. this excludes generated polygons. If the object’s polygons are exclusively triangles, such as from a CAD model or sculpt, the display value directly indicates the triangle count. However, if they are quads, we can deduce the triangle count by multiplying the value by two.

Project Info

To get a breakdown of the polygon types in our scene, we can go to the Attributes manager >> under Mode, and select Project Info. This method does not work with generators, only editable polygons.

If we are in Polygons mode, we can use the Structure tab to see what the breakdown is in quads, tris, and n-gons. We can easily estimate the polycount from the tris and quads, but for the n-gons it’s still difficult to know.

iRender - The Best Render Farm for Octane Rendering

iRender powers up your creativity with unlimited GPU rendering resources. Our GPU render farm houses the most powerful 3D rendering machines. Configure from 1 to 8 GPU with top-tier RTX 4090/RTX 3090, Threadripper Pro CPUs, 256GB RAM and 2TB SSD storage – iRender’s machines are capable of speeding up any 3D projects.

Once renting our machines, you will own them as your personal workstations. Therefore, you can use any software, plugins or versions you want. 

As an official partner of Maxon, we provide pre-installed C4D machines to streamline your pipeline further! Currently, we provide one free C4D license for all our users.  Let’s see a workflow using C4D and Octane through our desktop app.

We are offering an attractive 100% Bonus Program for our new users making the first deposit within 24 hours of registration. As a result, you can effectively double your recharged credits.

Claim your FREE TRIAL to try our RTX 4090 machines and boost your rendering now!

For further information, please do not hesitate to reach us at [email protected] or mobile: +84915875500

 

iRender – Thank you & Happy Rendering!

Reference source: Scott Benson on otoy.com

Related Posts

The latest creative news from Octane Cloud Rendering.

The relationship between Polygons and Memory in C4D and Octane
, , , , , , , , , , , , , , , , , , , , , , ,

Hana Trieu

iRender - Happy Rendering, Happy Training!
Contact

INTEGRATIONS

Autodesk Maya
Autodesk 3DS Max
Blender
Cinema 4D
Houdini
Daz Studio
Maxwell
Nvidia Iray
Lumion
KeyShot
Unreal Engine
Twinmotion
Redshift
Octane
And many more…

iRENDER TEAM

MONDAY – SUNDAY
Hotline: (+84) 912-785-500
Skype: iRender Support
Email: [email protected]
Address 1: 68 Circular Road #02-01, 049422, Singapore.
Address 2: No.22 Thanh Cong Street, Hanoi, Vietnam.

Contact
[email protected]