Newbie: randomly color changing faces of a polygon
Moderatori: Arkimed, natas, visualtricks, cappellaiomatto
-
- Advertising
Newbie: randomly color changing faces of a polygon
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
- cappellaiomatto
- Moderatore
- Messaggi: 1572
- Iscritto il: lun mag 07, 2012 5:12 pm
Re: Newbie: randomly color changing faces of a polygon
Hi metemetekutlu 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
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
Follow me on Twitter https://twitter.com/matteoc4dzone
Follow me on Vimeo https://vimeo.com/cappellaiomatto
Re: Newbie: randomly color changing faces of a polygon
Thanks Matteo.
Re: Newbie: randomly color changing faces of a polygon
Thanks
- cappellaiomatto
- Moderatore
- Messaggi: 1572
- Iscritto il: lun mag 07, 2012 5:12 pm
Re: Newbie: randomly color changing faces of a polygon
Cinema launch Every xpresso expression at each frame as you note.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
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
Follow me on Twitter https://twitter.com/matteoc4dzone
Follow me on Vimeo https://vimeo.com/cappellaiomatto
Re: Newbie: randomly color changing faces of a polygon
(I certainly loved C4Dzone)
Bests,
Mete Kutlu
- Allegati
-
- lion.jpg (109.54 KiB) Visto 3254 volte
- cappellaiomatto
- Moderatore
- Messaggi: 1572
- Iscritto il: lun mag 07, 2012 5:12 pm
Re: Newbie: randomly color changing faces of a polygon
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!!
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
Follow me on Twitter https://twitter.com/matteoc4dzone
Follow me on Vimeo https://vimeo.com/cappellaiomatto
Re: Newbie: randomly color changing faces of a polygon
- Allegati
-
- lion 04.c4d.zip
- (147.35 KiB) Scaricato 165 volte
- cappellaiomatto
- Moderatore
- Messaggi: 1572
- Iscritto il: lun mag 07, 2012 5:12 pm
Re: Newbie: randomly color changing faces of a polygon
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.
You're welcome and thank you too for sharing with our comunity your scene file
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
I don't understand your request....What do you mean for "make an animation with only visible edges" ??
Follow me on Twitter https://twitter.com/matteoc4dzone
Follow me on Vimeo https://vimeo.com/cappellaiomatto
Re: Newbie: randomly color changing faces of a polygon
-
- Advertising
FOLLOW US