NoSleepCreative Wiki
  • Welcome to NoSleepCreative
  • After Effects
    • Getting Started with Expressions
    • Expressions & Snippets
      • JSX Cheatsheet
      • Expression Troubleshooting
      • Utilities
      • Shape & Mask
      • Type & Text
    • Cookbook
      • Algorithmic
      • Random properties
      • Harmonic Motion
      • Staggering
      • Tessellation & Tiling
      • Type animators
      • Speed lines
      • Radial Array
      • Orb & Trails
      • Shading & Texturing
      • Responsive
      • Automation
      • Setup & Rigs
    • Getting started with Scripting
    • Scripting
      • Utilities
      • Master Properties
    • ScriptUI
  • Studio Ops
    • Tooling
    • Toolkitting
    • Knowledge Base
    • Naming Convention
    • DAM
  • Cinema 4D
    • Formulas
    • Python Cheat Sheet
      • For Artists
      • Maya Environment
      • Maya snippets
      • VSFX 705
    • Cookbook
  • Info
    • About
    • Portfolio
    • Course
    • YouTube
    • Gumroad
    • GitHub
  • Dev
    • archive
      • Webscraping
      • Google Sheets Formulas
      • SQL
      • Terminal
      • C++
      • Unreal Engine
      • Concert Visualization
      • Dome-projection
      • UI UX
      • Professional Etiquettes
      • Woes
      • How to get better
        • Portfolio / Showreel
        • Design with cooking
      • Media theories
        • Post Cinematic Affect
        • Marxism, Reproduction and Aura
        • Heuristics & Authorship
        • 02 Semiotics
        • 3 Process?
        • 05
        • 06 Technology & Mediation
        • Formalism
        • Simulation
        • The Gaze & Media Critique
        • Import
        • 10-12
      • Recommended books
        • 🔴Things I learned
      • Mac Superuser
        • Applescript
      • InDesign
      • Illustrator
      • Blender
      • Premiere Pro
      • Mathematics
        • Probability
        • Linear Algebra
      • Shader Dev
      • Getting Started with After Effects
        • Best Practices
        • Pimping up AE
        • Environment
      • Houdini
        • Cheatsheet
        • Cookbook
        • Techniques
        • Dynamic
        • Rendering & Lighting
        • Animation
        • Particles
        • Others
          • Modeling
          • Fluids - Pyro & Smoke
          • Rendering
      • REGEX
    • Sandbox
      • Nexrender
        • Terminology
        • Project Files Preparation
Powered by GitBook
On this page
  • Introduction
  • Formula Appendix, Maxon Help Guide
  • Getting Started
  • Concepts
  • Formula Library

Was this helpful?

  1. Cinema 4D

Formulas

PreviousDAMNextPython Cheat Sheet

Last updated 1 year ago

Was this helpful?

Introduction

Here is a page with Cinema 4D Formulas that you can use for Formula Effectors or Fields. Formulas are primarily based on C++ syntax.

Formula Appendix,

Basic

px,py,pz - Position
rx,ry,rz - Rotation
sx,sy,sz - Scale

u,v,w - UVW
id - Object Index
count - Object Count

falloff - Falloff weight
t - Project Time[-∞..+∞]
f - Frequency[-∞..+∞]

Conditional
?(a;b)
(3>4)?(10;20)
?(a;b)

Arguments such as mod(a;b) must be separated by a semi-colon or by squared brackets [] (then without curved brackets)

rnd(100) is the same as rnd[100] and rnd(100;234) is the same as rnd([100][234]).

Mathematical Operators

+	Addition	144 + 14 = 158
-	Subtraction	144 - 14 = 130
*	Multiplication	144 * 2 = 288
/	Division	144 / 12 = 12
(	Left parenthesis	3 + 4 * 2 = 11

Units

km	Kilometer	1km = 1000m
m	Meter	144 - 14 = 130
cm	Centimeter	1cm = 0.01m
mm	Millimeter	1mm = 0.001m
um	Micrometer	1um = 0.000001m
nm	Nanometer	1nm = 0.000000001m
mi	Mile	1mi = 1609.344 m
yd	Yard	1yd = 0.914m
ft	Foot	1ft = 0.305m
in	Inch	1in = 0.025m
B	Frame Number

Logical Operators

 =	Equal compare	1km = 1000m
==	Equal compare	144 - 14 = 130
>	Greater than	1cm = 0.01m
<	Less than	1mm = 0.001m
>=	Greater than or equal compare	1um = 0.000001m
<=	Less than or equal compare	1nm = 0.000000001m
!=	Not equal compare	1mi = 1609.344 m
!	Not	1yd = 0.914m
|| or. or	Or	1ft = 0.305m
&& or. and	And	1in = 0.025m
&	Bitwise and	 
|	Bitwise or	 
^	Bitwise xor	 
~	Bitwise not	 
?(a; b)	Condition, if statement: a, then b	(3 > 4) ? (10; 20) = 20; kann ebenfalls
so formuliert werden: if(3 > 4; 10; 20)	

Constants

e	The constant e (Euler Number) = 2.71828	 
pi	The constant Pi (circular number) = 3.14159	 
pi05	Half Pi	 
pi2	Double Pi	 
piinv	Inverse Pi	 
pi05inv	Half inverse Pi	 
pi2inv	Double inverse Pi	 

// Functions
sin(a)	Sinus	
cos(a)	Cosinus	 
acos(a)	Arcus cosinus	 
asin(a)	Arcus Sinus	 
tan(a)	Tangent	 
atan(a)	Arcus tangent	 
cosh(a)	Cosinus hyerbolicus	 
sinh(a)	Sinus hyerbolicus	 
tanh(a)	Tangent hyerbolicus	 
floor(a)	Round down	floor(11.8) = 11
ceil(a)	Round up	ceil(11.2) = 12
round(a)	Rund	round(11.8) = 12
abs(a)	Absolute / Value	abs(-11) = 11
sqr(a)	Square exponentiation	sqr(5) = 25
sqrt(a)	Square root	sqrt(49) = 7
exp(a)	Exponential function	exp(5) = 148.41
log10(a)	Logarithm to the base of10	log10(100) = 2
log(a)	Logarithm to the base of e	log(e) = 1
trunc(a)	Truncates a number	trunc(-11.8987) = -11
rnd(a{; b})	Random or 0 and a, opt. b as seed	 
pow(a; b)	Exponentiation	pow(2; 3) = 8
mod(a; b)	Modulo	mod(10; 4) = 2
clamp(a; b; c)	Clamps val. of c or a & b	clamp(2; 6; 10) = 6
min(a; b)	Minimum value a or b	min(4; 7) = 4
max(a; b)	Maximum value a or b	max(4; 7) = 7
(a) << (b)	Bitwise shift to left	1 << 4 = 16
(a) shl

Getting Started

Concepts

White to dark vertical

id/count

Dark to white center, vertical

1 - abs(mod(id/count; 1) - 0.5)*2

Dark to white center, horizontal

1 - abs(mod(u; 1) - 0.5)*2

Radial - White to Dark Center

sqrt(px*px + py*py + pz*pz)/1000

Formula Library

Default/Wave

/0.5 + sin( ( subfields + ( id / count ) + d ) * f * 360 ) * 0.5

Alternating Lines

mod((id/80);2)?(t*f;-t*f)
Maxon Help Guide