• Facebook Twitter Google+ Youtube Vimeo
  • Italiano English
  • [-] Diminuisci la dimensione del testo [+] Aumenta la dimensione del testo
  • Feed RSS 2.0 Feed ATOM 1.0

»

Newbie: randomly color changing faces of a polygon

Forum for: Dynamics, Rigging, Mograph, TeamRender, Xpresso, Plugins, Hair, Sketch, Simulation, tracking, sculpt and advanced usage of Cinema4D.

Moderatori: natas, Arkimed, visualtricks, cappellaiomatto

  • Advertising

Newbie: randomly color changing faces of a polygon

Messaggioda metekutlu » mer set 12, 2012 3:46 pm

Hello,

I modeled a triangulated robotic lion face which I'll use for my projection mapping. I wanted every triangular face of the polygon object to randomly change colours (not gradual but sudden) between five colors that I chose. So for example while one face goes cyan-pink-white; the other goes pink-white-cyan, and at different speeds so that the faces don't change color at the same time.

I tried a lot stuff with my little knowledge, but I couldn't figure out the main steps that I should take.

I would really really appreciate if someone could help me out with this.

Thanks a lot!

Mete Kutlu
metekutlu
 
Messaggi: 6
Iscritto il: mer set 12, 2012 3:43 pm
Località: Paris

Re: Newbie: randomly color changing faces of a polygon

Messaggioda cappellaiomatto » mer set 12, 2012 6:29 pm

metekutlu ha scritto:Hello,

I modeled a triangulated robotic lion face which I'll use for my projection mapping. I wanted every triangular face of the polygon object to randomly change colours (not gradual but sudden) between five colors that I chose. So for example while one face goes cyan-pink-white; the other goes pink-white-cyan, and at different speeds so that the faces don't change color at the same time.

I tried a lot stuff with my little knowledge, but I couldn't figure out the main steps that I should take.

I would really really appreciate if someone could help me out with this.

Thanks a lot!

Mete Kutlu


Hi mete

This link could be a good start point

http://vimeo.com/31325419

You should use xpresso to change material selection programmatically
In the video you will see some balls that change material at collision with the ground....when you understand how to change material of object replace the collision node in xpresso with other nodes that test the current frame number in base of your desired logic.

Hope this help
Avatar utente
cappellaiomatto
Moderatore
 
Messaggi: 1411
Iscritto il: lun mag 07, 2012 5:12 pm

Re: Newbie: randomly color changing faces of a polygon

Messaggioda metekutlu » mer set 12, 2012 7:30 pm

Yes, it helps a lot! Xpresso certainly looks amazing. A little like Grasshopper for Rhino. I'm looking into it right now.

Thanks Matteo.
metekutlu
 
Messaggi: 6
Iscritto il: mer set 12, 2012 3:43 pm
Località: Paris

Re: Newbie: randomly color changing faces of a polygon

Messaggioda metekutlu » mer set 12, 2012 9:49 pm

So, I made a simple xpresso expression. Instead of the collision node, I used random integer node to generate random material indices. My only problem is that it is generating them at each frame. How could I make the random integer node give me integers at certain intervals such as every 10 frames?

Thanks
Non hai i permessi necessari per visualizzare i file allegati in questo messaggio.
metekutlu
 
Messaggi: 6
Iscritto il: mer set 12, 2012 3:43 pm
Località: Paris

Re: Newbie: randomly color changing faces of a polygon

Messaggioda cappellaiomatto » mer set 12, 2012 10:23 pm

metekutlu ha scritto:So, I made a simple xpresso expression. Instead of the collision node, I used random integer node to generate random material indices. My only problem is that it is generating them at each frame. How could I make the random integer node give me integers at certain intervals such as every 10 frames?

Thanks


Cinema launch Every xpresso expression at each frame as you note.
Search from the nodes the time and with math operator check that
Frame property module 20 (for example) =0

If true it means that elapsed 20 frames....this could be the main logic more or less

Modules is math operation that mean the rest of division by a number
Es:
8 modules 5 = 3
Avatar utente
cappellaiomatto
Moderatore
 
Messaggi: 1411
Iscritto il: lun mag 07, 2012 5:12 pm

Re: Newbie: randomly color changing faces of a polygon

Messaggioda metekutlu » mer set 12, 2012 11:29 pm

Math always saves lives! It is working. I just added a NOT after Math:Module, and then connect it to the Enable Port of the Random Integer. Thanks for being so clear and helpful. Here you can see the model. As my last question; would you propose I make selection tags for groups of faces and apply variations of this xpresso or is there any other fancy way?

(I certainly loved C4Dzone)

Bests,

Mete Kutlu
Non hai i permessi necessari per visualizzare i file allegati in questo messaggio.
metekutlu
 
Messaggi: 6
Iscritto il: mer set 12, 2012 3:43 pm
Località: Paris

Re: Newbie: randomly color changing faces of a polygon

Messaggioda cappellaiomatto » mer set 12, 2012 11:49 pm

metekutlu ha scritto:Math always saves lives! It is working. I just added a NOT after Math:Module, and then connect it to the Enable Port of the Random Integer. Thanks for being so clear and helpful. Here you can see the model. As my last question; would you propose I make selection tags for groups of faces and apply variations of this xpresso or is there any other fancy way?

(I certainly loved C4Dzone)

Bests,

Mete Kutlu



Very Nice!!
:idea:

The selection Tag is the fastest and easiest way ..... there is also another way but more complicated with Vertex Map and Material channel layer but it is very long.
I saw very interesting tutorial using it for making burn effect on poly....go to youtube and search vertexmap texture cinema 4d

;)
Avatar utente
cappellaiomatto
Moderatore
 
Messaggi: 1411
Iscritto il: lun mag 07, 2012 5:12 pm

Re: Newbie: randomly color changing faces of a polygon

Messaggioda metekutlu » ven set 14, 2012 1:03 am

hey thanks a lot matteo! I attached the result for now. I'm very happy with it. I wanted to ask you if it's possible to make an animation with only visible edges (moving, being drawn in many ways), if it's complicated i prefer to do it in after effects then combine the animation? check out the scene! thanks.
Non hai i permessi necessari per visualizzare i file allegati in questo messaggio.
metekutlu
 
Messaggi: 6
Iscritto il: mer set 12, 2012 3:43 pm
Località: Paris

Re: Newbie: randomly color changing faces of a polygon

Messaggioda cappellaiomatto » ven set 14, 2012 7:01 pm

metekutlu ha scritto:hey thanks a lot matteo! I attached the result for now. I'm very happy with it. I wanted to ask you if it's possible to make an animation with only visible edges (moving, being drawn in many ways), if it's complicated i prefer to do it in after effects then combine the animation? check out the scene! thanks.



:idea:

You're welcome and thank you too for sharing with our comunity your scene file

:P

When I will be free for five minutes I will watch your result...I'm very curios to see the final result...now I'm very busy with Master Cinema 4D course

:mrgreen:

I don't understand your request....What do you mean for "make an animation with only visible edges" ??
Avatar utente
cappellaiomatto
Moderatore
 
Messaggi: 1411
Iscritto il: lun mag 07, 2012 5:12 pm

Re: Newbie: randomly color changing faces of a polygon

Messaggioda metekutlu » ven set 14, 2012 8:01 pm

I just saw the courses, it's great. As for my question, I wanted to animate the edges of the faces. For example, edge lines being drawn from the center of the object or a line(s) moving on the edges. I can do it in after effects but if it's possible in c4d it would be much proper.
metekutlu
 
Messaggi: 6
Iscritto il: mer set 12, 2012 3:43 pm
Località: Paris

Prossimo

  • Advertising

Torna a C4D - Advanced usage

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite

Powered by DGworld CMS - Copyright ©2005-2018 DGworld