Digital Art Zone

 
   
2 of 3
2
Formula ?
Posted: 19 October 2013 10:01 PM   [ Ignore ]   [ # 16 ]
Active Member
RankRank
Total Posts:  309
Joined  2012-03-18
Dartanbeck - 19 October 2013 02:15 PM
ramble1035 - 19 October 2013 02:09 PM

This 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

Excellent! That’s exactly what I was looking for! But now I’ll have to find a way to translate that main menu! shock
Thanks for this!

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

 Signature 

Works in progress.always!
https://www.facebook.com/aavenainen.daz

Visit my DAZ store!
http://www.daz3d.com/aave-nainen

Profile
 
 
Posted: 20 October 2013 02:59 AM   [ Ignore ]   [ # 17 ]
Member
Rank
Total Posts:  125
Joined  2008-08-08

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

Profile
 
 
Posted: 20 October 2013 04:37 AM   [ Ignore ]   [ # 18 ]
Active Member
RankRank
Total Posts:  771
Joined  2010-04-15

I 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.

 Signature 

          Site: http://bond3d.wix.com/carrarators
      Forum: http://www.bond3d.byethost18.com/
            My site: http://mhdproductions.be/

Profile
 
 
Posted: 20 October 2013 04:44 AM   [ Ignore ]   [ # 19 ]
Member
Rank
Total Posts:  125
Joined  2008-08-08

Found some more using Google: Carrara formulas

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

Profile
 
 
Posted: 20 October 2013 06:40 AM   [ Ignore ]   [ # 20 ]
Active Member
Avatar
RankRank
Total Posts:  344
Joined  2005-04-01

I’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

 Signature 

This is the captain. We have a little problem with our entry sequence, so we may experience some slight turbulence and then… explode.

Profile
 
 
Posted: 20 October 2013 07:57 PM   [ Ignore ]   [ # 21 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5960
Joined  2007-12-04

Okay, 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

 Signature 

Dartanbeck @ Daz3d          Check out the Carrara Cafe          ►►►  Carrara Information Manual   ◄◄◄

Profile
 
 
Posted: 20 October 2013 08:20 PM   [ Ignore ]   [ # 22 ]
Member
Avatar
Rank
Total Posts:  63
Joined  2005-06-16

By 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.

 Signature 

Posts on previous forum: 218. And yeah, I was bitchy back then too.

Profile
 
 
Posted: 21 October 2013 08:10 AM   [ Ignore ]   [ # 23 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5960
Joined  2007-12-04

Territan 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)

Edit: I just tried translating again and got unwanted results. I tried this translator site and it worked - http://www.freetranslation.com/
If something screwy goes on with translation, just find another translator. Some work site-wide, like this, others only words or phrases. Again, establishes my urge to have a translated copy that I can keep.
Something strange going on with my web - having trouble with translators. Posting an image of the main contents page translated for future use

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!

Image Attachments
FormulaFrenchTranslated_1.jpgFormulaFrenchTranslated_2.jpg
 Signature 

Dartanbeck @ Daz3d          Check out the Carrara Cafe          ►►►  Carrara Information Manual   ◄◄◄

Profile
 
 
Posted: 21 October 2013 09:00 AM   [ Ignore ]   [ # 24 ]
Member
Avatar
Rank
Total Posts:  63
Joined  2005-06-16

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

x=60*(u-0.5);
y=p2*sin(x*20*p1);
z=30*v;

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.

 Signature 

Posts on previous forum: 218. And yeah, I was bitchy back then too.

Profile
 
 
Posted: 21 October 2013 10:44 AM   [ Ignore ]   [ # 25 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5960
Joined  2007-12-04
Territan - 21 October 2013 09:00 AM

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

~ with all this stuff ~

Here’s how to read what’s going on here.
~ and all of this stuff ~

This is so freaking cool I could just faint!
Thanks for this!

 Signature 

Dartanbeck @ Daz3d          Check out the Carrara Cafe          ►►►  Carrara Information Manual   ◄◄◄

Profile
 
 
Posted: 21 October 2013 11:32 AM   [ Ignore ]   [ # 26 ]
Member
Avatar
Rank
Total Posts:  63
Joined  2005-06-16

Oh, 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.

Image Attachments
Event-Banner-Corrugated.png
 Signature 

Posts on previous forum: 218. And yeah, I was bitchy back then too.

Profile
 
 
Posted: 21 October 2013 12:12 PM   [ Ignore ]   [ # 27 ]
Member
Avatar
Rank
Total Posts:  63
Joined  2005-06-16

Okay, 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:

red=1.0-pow(pow(u,2)+pow(v,2),0.5);
green=pow(pow(u,2)+pow(v,2),0.5);
blue=1.0;

Here’s a new twist: u and v range from -1 to 1 instead of 0 to 1. While that may seem silly, it does mean the point the light is aimed directly at is u=0 and v=0, which is kind of convenient for some math anyway.

Blue, I simply set to 1.0 full intensity. Everything gets blue.

Red and Green take some explaining. It’s derived from the Pythagorean theorem. Remember x^2+y^2=z^2? That’s the formula you use to determine the distance between two points: add the squares of the differences, and take the square root of that.

Green is set to u^2+v^2, so the farther away from the center, the more green it gets. Green + Blue = Cyan.

Red is 1 minus that value, so the closer to the center of the spotlight, the more red it gets. Red + Blue = Violet.

So the light varies from a cyan outer ring to a violet center.

Here’s an even simpler gel:

red=abs(u);
green=abs(v);
blue=1.0;

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.

Image Attachments
Peculiar_Spotlight.png
 Signature 

Posts on previous forum: 218. And yeah, I was bitchy back then too.

Profile
 
 
Posted: 21 October 2013 02:50 PM   [ Ignore ]   [ # 28 ]
Active Member
RankRank
Total Posts:  771
Joined  2010-04-15

I 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 !

 Signature 

          Site: http://bond3d.wix.com/carrarators
      Forum: http://www.bond3d.byethost18.com/
            My site: http://mhdproductions.be/

Profile
 
 
Posted: 21 October 2013 02:55 PM   [ Ignore ]   [ # 29 ]
Active Member
Avatar
RankRank
Total Posts:  344
Joined  2005-04-01

Territan, 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….  smile

 Signature 

This is the captain. We have a little problem with our entry sequence, so we may experience some slight turbulence and then… explode.

Profile
 
 
Posted: 21 October 2013 04:11 PM   [ Ignore ]   [ # 30 ]
Addict
Avatar
RankRankRankRank
Total Posts:  5960
Joined  2007-12-04
DUDU_00001 - 21 October 2013 02:50 PM

I 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 !

I am extending that thanks from my heart as well… Thanks to all whom wish to see Carrara become more recognized amidst the high demand 3D world of CG!

I’s also like to thank DUDU for bringing up this crazy freaking thread!

Jonstark - 21 October 2013 02:55 PM

Territan, 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….  smile

Agreed! I gotta say, however, that this 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 wink

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.

 Signature 

Dartanbeck @ Daz3d          Check out the Carrara Cafe          ►►►  Carrara Information Manual   ◄◄◄

Profile
 
 
   
2 of 3
2