# Formula ?

DUDU
Posts:

**1,919**

I know a lot of things in Carrara, but there is a symbol which intrigues me since always… “Formula” !

Is there somebody who could explain in simple manner to what that is useful and what can one await from this option.

Thank you!

## Comments

14,671Just as the title implies, you enter in a formula, it creates the result. I've never tried this, but I found a topic on just what you're asking, if you're interested in learning ;)

1,919Ah, if Einstein had known CARRARA !

I just found this:

http://docs.daz3d.com/doku.php/artzone/pub/software/carrara/06_six/22_using_formulas

14,671Cool, 'cause I wasn't finding any fun at that link I've posted! This is much better!

0This site is in French, but it lists some formulas and shows pictures of the results. Most them are pretty complex, but they give you a good idea of what's possible...

http://gianp.free.fr/carrara/indexcarrara.html

14,671Thanks for this!

1,919Dart, I looked at all the links of this topic and I see only sites not very cool.

Ramble, super!

I suppose that, by making a “Copy/Paste” of the formulas and one will have the stuff automatically?

I will test !

Merci.

1,919Dart, I have an advantage on you this time, French is my language!

22,328I actually fiddled with it once to do this

two objects with the p2 sliders animated in reverse to each other

r1=10*p1;

r2=10*p2;

t=2*PI*u;

p=PI*(v-0.5);

x=r1*cos(t)*cos(p);

y=r1*sin(t)*cos(p);

z=r1*sin(p);

that is just the carrara torus formula BTW, I have no idea about maths!

1,919Waw !

How are you animate it ?

The formulas changing makes keyframes ?

PS: the 2 sliders ? Cool !

22,328no the sliders underneath and the bits under parse and more gives options

1,919I know what I will do tomorrow Sunday, I will test all that!

Thank you!

0you know I have always seen the formula thingy and never really tried to make use of it ----It seems at first glance to have some powerful possibilities and seems maybe even a spot for some additional plugin help maybe?

rich

14,671Now if only DuDu would find it in his heart to tell us which word means what, in English... well.... ;)

14,671Wendy that is super-cool!

0Now if only DuDu would find it in his heart to tell us which word means what, in English... well.... ;)

At least the language of mathematics is universal! :)

1,093Thanks for this!

If you use Chrome web browser it will offer to translate for you!

267http://translate.google.com/ Set the language > Past the url > click the link.

1,919I speak French but in this case, the images are sufficient, one will not calculate formulas ourself !

It would be nice if, in the next version of Carrara, that all these formulas were included like presets.

267Found some more using Google: Carrara formulas

Like this one: http://download.novedge.com/Brands/Eovia/Documents/Eovia_Carrara_Formula.pdf

2,379I've got to admit at this point that most of this is over my head, but I really think it's cool what formulas can do. That french site contains some very cool stuff, and I agree it would be nice if some of these were contained in Carrara as presets.

Good find, pjotter, that pdf definitely helps explain things

14,671Okay, so I've translated the French site, and it works, thank you Pjotter!

Edit: I tried to just make an English link - but, alas, we must simply follow Pjotter's simple instructions, above, to translate to English

75By the way, if you have the Carrara 8 content installed, hit the Browser, go to the Objects tab, and scroll down. There should be five sample Formula objects, with animatable parameters.

And you're just looking at the formula

object.Now go into the Shader editor.

Pick an element of the shader tree and pull down the menu.

There's a "Formula" item in the "Pattern Functions" menu.

Then go back to the Assembly Room, and set two keyframes in the Sequencer. Double-click the space between them.

Hey, look at that! There's a "Formula" in the Tweeners menu (in the Parameters panel).

In fact, hit page 415 of the manual that came with Carrara. Yes, I know, that's the Carrara 7 manual. This stuff has been around longer than that. And that page tells you, you can create not just formula objects, tweeners, and shaders, but deformers, light gels, backgrounds, and backdrops too.

I was wondering when someone would rediscover this lost art, because I think you could squeeze a book or two out of this alone.

14,671Territan is absolutely correct. There are quite a number of places where we may use formulas in Carrara - and it could certainly fill a good book.

Let's have a quick look at this French page: http://gianp.free.fr/carrara/indexcarrara.html

I cannot understand French at all. Thanks to Pjotter, pointing this out: we simply copy: http://gianp.free.fr/carrara/indexcarrara.html

and paste it into Google Translator, the big box on the left. A link will appear in large letter on the right. Click on that and you now have an English translation of the whole site and all of it's links. (Thanks, Pjotter, once again)

Using the descriptions, have a look through some of the examples by clicking on the number to the left.

These shapes can be really valuable i computing all of these different areas Territan is mentioning. From subtlety to its complete opposite, this guide can give us some extreme examples of how different formulas will behave as a tweener, shader, modifier, or model.

Since these are three dimensional formulas, I am understanding that the center of the resulting shape is 0,0,0 or absolute zero in three dimensional space. In RBG, zero equals Black as 255 = White. In a tweener the center will equal the data from the left side of the sequencer timeline, and the further away it gets from center, the closer it gets to the data on the right.

Just a small rationalization to what's going on here.

So with that in mind, you'll see that some of these formulas will give subtle results, perhaps, while many or most others will do something really special. I really need to translate this whole, amazing site and print it to book!

75Okay kids, here's a somewhat simplified formula to get you started:

That'll produce a vertical plane. Move p1 and p2 off of zero, and you'll see it get wavy.

Here's how to read what's going on here.

First, you know how objects are UV-mapped, and how one corner is the 0,0 coordinate and the opposite corner is the 1,1 coordinate, and everything in between is some pair of decimals between those? That's what the u and v here are doing: Every value of U and V between 0 and 1 (in tiny increments) is plugged into the formulas. Whatever results come back, that's where Carrara puts a pixel, and that pixel will have that uv mapping.

I flat-out multiplied v by 30 in order to get a vertical thing, running from z=0 to z=30.

I subtracted 0.5 from u so it would go from -0.5 to 0.5 instead of 0 to 1. Then I multiplied that by how big I wanted the wall in the x axis, in this case 60. So the wall runs from x=-30 to x=30.

y is admittedly a little more complicated, but much more interesting. I wanted a wavy quonset-hut type corrugated metal wall effect, so I want it to wave back and forth across the y-axis. So I set y to a value based on the sine of x (you know, like a sine wave?) so it would oscillate back and forth.

Sorry, yeah, it does contain a little math. As the old saying goes, "Welcome to the Turing Tarpits, where anything is possible but nothing interesting is easy."

I multiplied x by both 20 and p1 so I could control the rate of oscillation without changing the formula itself. After I had that number, I multiplied that by p2 so I could control how deep the waves were.

You'll need to move both p1 and p2 off of zero, but when you do, you'll see it get wavy.

Different formulas loop across different values using different variables, and use different variables for output. Again, the Carrara 7 manual has that information.

Admittedly, the parser is a bit finicky (it doesn't like decimals that start with the period, for example), but this provides Carrara with the power to image any shape and effect you can define mathematically.

14,671Thanks for this!

75Oh, and that vertical wavy thing that I wanted? The one that looked like corrugated metal?

Here's what I wanted it for; I run games on G+, and I sometimes render my own event banners. This represents a change, in that this is the first one I did in Carrara.

And while the formula unit is cool, it's hampered by a lack of examples.

What we need... is a cookbook.

75Okay, here's another one.

Lemme set the scene: A single plane on the floor, with no shader on it. A single spotlight, shining directly down on it. The picture should appear below.

The secret to this colorful outburst?

Select that light in the object list, then the Effects tab. There's a Formula in the Gel menu, and that formula is:

Again, blue gets it all. Red and green gets the absolute values of whatever u and v are, respectively, so it's blue at the center and toward the edges... well, maybe I'll just let you guys work that one out.

1,919I follow this post considering I put the starting question, and really, I am extremely surprised to see that there are incredible possibilities with this option of Carrara!

I was far from thousand miles to believe that there were some people so concerned with this possibility of creating objects, textures etc… with scientific formulas!

Thank you for all those which like Carrara and want its promotion in the 3D world !

2,379Territan, I had to pick my jaw up off the floor. What excellent examples of how useful these formulas could be! You're right, we need a cookbook.... :)

14,671this tid bit(link only takes you up a bit on this same page! lol) goes a long way to show example of what can be done, if you actually take the time to dig through some of those simple links. I must say that I'm finding the translation to be less useful than I thought it would be, but... there it is ;)Territan, I mean... God... I mean... Territan... okay which of you is which?

Alright...

I really like your explanations that you provide as you work through your examples. So this brings about the bazillion dollar question:

"When should we expect to see this Cook Book of yours to hit the shelves?"

I'll buy it.

This is really funny, too. Because I am, like many others, I'm sure, one of the variety that really never planned to figure out exactly what all we can or cannot do with formulas in Carrara. Now here I am at the edge of my seat. Some of the examples I've seen within the links of that French page (from this day forth, I shall always refer to that wondrous link as "That French Page! lol) are very close to something I'd love to be able to create in Carrara very quickly. Without it being quick, I'd just rather make an alpha map. Making and using alpha maps is quickly becoming a peeve of mine. I enjoy the Carrara trees and their leaves so much - with their complete lack of use of alphas.

I am beginning to see where it's likely faster to just have a few extra polygons than it is to use alpha maps.

So now that I've had a short perusal of "That French Page", I am certainly going to be using formulas in Carrara. Does this mean I'll look heavily into figuring out my own stuff the likes of what Territan (bless his heart) is doing? Maybe. I've never done poorly at math - and geometry was just, plain cool! Loved that class!

The point was supposed to be that I wouldn't really need to. There are examples a plenty on that French page to keep me fulfilled for some time. It's not like I'm looking to replace box modeling with formulas.