New in Cinema 4D Release 17 Quickstart: Variation Shader for Random Colors and Seamless Textures

Photo of Cineversity

Instructor Cineversity

Share this video
  • Duration: 05:47
  • Views: 10979
  • Made with Release: 17
  • Works with Release: 17 and greater

Randomize object colors, and make a single seamless texture do the work of dozens with the Variation Shader.

Use the Variation Shader to apply random colors, or colors from a user-defined palette to objects in your scene - even those not in a MoGraph Cloner or Fracture object. Use the image adjustment features, to adjust the Hue, Saturation, Gamma, and Contrast of textures to create infinite varation from a single image. Make use of the UVW Offset and flipping options to ensure that objects with identical geometry still look different. Make use of the Polygon Step option to convert giant object hierarchies into one fast-rendering high-polygon object - while still maintaining the uniqueness of each component.

show less

Transcript

In this video I'm gonna get you up to speed with the variation shader which is new in release 17. I'm gonna cover its two primary use cases: generating random colors on objects and making a single seamless texture do the work of dozens of different textures. So, let's take a look at our first project which is pretty common in the motion graphics world. We've got a bunch of primitive objects flying through space. What is unique about this particular scene is that I'm not using a cloner. These are all just standard primitives that are in my scene. So, this would be particularly useful if you were hand animating a bunch of different objects. Now, in previous versions of Cinema 4D, I'd throw that in a fracture object, maybe use a step effector and a few other shaders in order to create a randomness on each and every one of these objects. But in release 17 I can just go to texture, effects, variation. And now that I've done this, I'm gonna go ahead and turn on interactive render region just so that we can see what is happening as we work. So first up, I now see that I've got random colors on all of my objects. So that's reasonably useful. But for the most part you're gonna wanna have more control over your colors. So what I'm gonna do is go into this gradient option inside of my variation shader and I can load in a gradient of my choosing to source my colors from. So maybe I'll choose this scheme seven down here which has got a number of different colors, some of them sort of blue and pink. And I'm gonna crank up my gradient blend up to 100% and bring down my random color option. Now by doing this, I'm now sampling all of the colors for these objects strictly from this gradient. However, they seem a little washed out. They don't seem as vibrant as these colors here. And that's because of the way that the variation shader works. It takes whatever settings you're applying down here and then it overlays it like a layer in Photoshop above your base color and your base color or your base texture is defined right there. You can bring in an image or a color, let's say maybe a base color of black. Now all of these are looking a bit darker. But if I want exactly these colors, I can change the mode here from normal to replace which will just substitute in these colors exactly. Here I have a rendering of a bunch of rooftop shingles all of them using the same texture map. Now when I look at the same scene but with the variation shader applied, I'm getting a much better looking final result. So, I'm gonna go over how to recreate that effect right now. First up, I wanna talk about my scene file. I've got a bunch of individual shingle objects all of them with the same number of polygons and all of them being cloned into this large grid. And as I navigate around, I'm only getting maybe 15 frames per second and that's because I'm cloning a lot of objects. Now if I turn off the solo on this layer and I change it over to my polys-fast scene, what I've done here is taken all of those clones and baked them down into a single polygon object. And when I navigate around my view you'll notice that I'm getting something much closer to 100 frames per second as I do this. It's buttery smooth. However, when I render I'm still stuck with everything looking functionally identical. So a quick solution to that problem is to open up your texture and in the color channel I've got a texture pre-loaded and I'm gonna choose to override this with the variation shader. Go to effects and it's just off screen but down here you'll see variation and click on that. And I'm gonna turn on interactive render regions so I can see what's going on. And what seems to be happening is the entire object is turning purple and that's because if we go into our variation shader we see that object variation is on. Well, we only have one object so we're not gonna get much difference there. Next down here I have the polygon variation option and if I turn that on I can set polygon step to 24 which I just happen to know is the number of polygons for each of these shingles. Now, having done that, I can come in here and turn off the random color mode and instead start playing around with these different image effects. I can increase my contrast. I can tweak the amount of gamma variation which is sort of a brightness and darkness without hard blacks or hard whites. And I can even do a little bit of a hue shift here so I'm now getting a slight variation in color. You don't wanna do anything extreme and you can even play around with saturation. So perhaps some of this wood is older than other parts. So I'm already getting good variation in here. Next up I want to go into this UVW coordinate setting and this is where the real power of the shader lies. I can actually shift my UV coordinates around so I'm gonna add in a UV shift of one on X here and we're already seeing a pretty huge difference. Adding a UV shift of one on Y it starts slipping up and around and if I turn on flip X and flip Y, my texture is now varying so much shader to shader that it's almost hard to recognize. And if I crank on UV rotate and set that to 180 degrees, I'm now getting an incredible amount of variation all from one shader, all from one texture, all from a single object.
이 비디오에서는 릴리즈 17에 새로이 추가된 variation 셰이더를 간략하게 살펴보겠습니다. 여기서는 두가지 주된 응용 예를 살펴 볼 것입니다. 즉, 오브젝트들에 랜덤 칼라를 생성하는 것과 하나의 매끄러운 텍스쳐로 십여가지의 서로 다른 텍스쳐 작업을 하는 것을 살펴보겠습니다. 먼저 첫번째 프로젝트로서, 이는 모션 그래픽스 세계에서는 매우 일반적인 것입니다. 이 씬에서는 많은 프리미티브 오브젝트들이 공간을 통과하며 날고 있습니다. 그런데 이 씬에서 독특한 것은 클로너를 전혀 사용하지않고 있다는 것입니다. 여기 이 오브젝트들은 모두 이 씬에 들어있는 표준 프리미티브들입니다. 따라서, 이는 여러 서로 다른 오브젝트들을 애니메이션시킬 때에 특히 유용합니다. 이전 버젼의 Cinema 4D에서는 프랙쳐 오브젝트에 포함시키고 아마도 스텝 이펙터와 몇가지 다른 셰이더들을 사용하여 이들 각각의 오브젝트들 하나 하나를 랜덤하게 만들었을 것입니다. 그러나 릴리즈 17에서는 간단히 텍스쳐로 가서, effect에 있는 variation을 선택하면 됩니다. 이렇게 한 다음, 나아가서 인터랙티브 렌더 영역을 켜서, 우리가 작업을 해 나가면 어떤 일들이 벌어지는지를 보도록 하겠습니다. 우선 먼저, 모든 오브젝트들에 대하여 랜덤 칼라가 적용된 것을 볼 수 있습니다. 제법 유용합니다. 그러나, 분명히 여러분은 이 칼라들에 대하여 더 많은 컨트롤을 할 수 있기를 원할 것입니다. 이를 위하여 variation 셰이더 안에 있는 그라디언트로 가서 칼라 소스로 사용할 수 있는 여러 그라디언트들을 로드합니다. 그런 다음 여기 Scheme 7을 선택합니다. 이 그라디언트는 블루와 핑크 사이의 서로 다른 색상들로 이루어져 있습니다. 그런 다음 그라디언트 블렌드를 100%까지 올리고 랜덤 칼라 옵션을 좀 낮춥니다. 이렇게 하면, 이들 오브젝트들에 대한 모든 색상들은 엄밀히 이 그라디언트에서 가져오게 됩니다. 그런데 이들 색상을 보면 좀 오래되어 색이 바랜듯한 느낌입니다. 즉, 여기있는 색상들처럼 활기차지 않습니다. 그 이유는 바로 variation 셰이더가 동작하는 방식 때문입니다. 즉, 여러분이 어떤 설정을 여기서 적용하더라도, Variation 셰이더는 포토샾에서의 레이어처럼 베이스 칼라 위에 이 설정을 오버레이시킵니다. 베이스 칼라 또는 베이스 텍스쳐는 바로 여기서 정의합니다. 즉, 이미지나 칼라를 여기로 가져올 수 있습니다. 자 이제 베이스 칼라를 블랙으로 가져오면, 이 모든 색상들은 좀 어두워지게 됩니다. 그러나 만일 이 색상들이 정확하게 본래의 색상대로 보여지기를 원한다면, 여기서 모드를 노말이 아닌 replace로 바꾸어 이들 칼라들을 정확하게 대체시켜 버립니다. 이제 여기 여러개의 지붕 널들을 렌더링한 것이 있는데, 이 모든 것들은 동일한 택스쳐 맵을 사용한 것입니다. 이제 vqriation 셰이더가 적용된 동일한 씬을 보면 훨씬 더 멋지게 보이는 최종 결과를 얻을 수 있습니다. 이제 이러한 효과를 어떻게 만들어내는지를 살펴 보겠습니다. 먼저 이 씬 파일에 대하여 몇가지 말씀드리면, 많은 수의 개별 지붕 널판 오브젝트를 갖고 있으며 이들 모두는 동일한 폴리곤 수를 갖고 있고 또한 이 커다란 격자로 클론되어있습니다. 내가 이 주위를 내비게이션 하면 겨우 15 fps 밖에 얻을 수 없늗데, 이는 아주 많은 오브젝트들을 클론하고 있기 때문입니다. 이제 만일 이 레이어상의 solo를 끄고 polys-fast 씬으로 변경하면, 여기서 한 것은 이 모든 클론들을 취하여 이들을 상글 폴리곤 오브젝트 안으로 베이크하였습니다 이렇게 하고 이제 다시 뷰를 내비게이션하면, 거의 100 fps에 가까운 매끄러운 속도를 얻을 수 있습니다. 하지만 이를 렌더링해보면 모든 것들이 아직도 기능적으로 동일하게 보입니다. 그래서, 이에 대한 빠른 해결책으로서, 텍스쳐를 연 다음 칼라 채널에서, 미리 로딩한 텍스쳐가 있는데, 이를 variation 셰이더로 오버라이드시키겠습니다. effects로 가서 스크린상에는 나타나지 않겠지만, 여기 이 아래에 variation을 보실 수 있으며 이를 클릭합니다. 그리고 인터랙티브 렌더 리젼을 on 시키면 어떤 일이 벌어지는지를 볼 수 있습니다. 여기서 벌어지는 것은 전체 오브젝트들이 자주색으로 변한 것을 알 수 있는데, variation 셰이더로 가보면 오브젝트 배리에이션이 on 되어 있음을 알 수 있습니다. 사실 우리는 하나의 오브젝트만을 갖고 있기 때문에 서로 다른 많은 것들을 얻을 수는 없습니다. 그래서 그 밑에 있는 폴리곤 배리에이션 옵션으로 가서 이를 On하고 폴리곤 스텝을 24로 합니다. 폴리곤 스텝 숫자는 이들 각각 널빤들의 폴리곤 수입니다. 이제 이렇게 하고 나서 여기서 랜덤 칼라 모드를 끄고 그리고 대신에 이들 여러가지 이미지 효과들을 가지고 변화시켜 보겠습니다. 컨트라스트를 높이고, 감마 배리에이션의 양을 조정할 수있는데, 이는 일종의 밝기와 어둡기로서 경질 블랙이나 경질 화이트가 없습니다. 또한 여기서 hue를 조금 조절하여 칼라에서 약간의 배리이션을 가질 수 있습니다. 매우 극단적으로 크게 할 필요는 없겠지요. 또한 새츄레이션을 조정하여 일부 목재들이 다른 부분들보다 오래된 것처럼 보이게 할 수도 있습니다. 이렇게하여 이미 여러가지 멋진 배리에이션을 갖게 되었습니다. 그 다음, 여기 UVW 좌표 설정으로 갑니다. 이것은 셰이더가 갖고 있는 정말로 강력한 기능입니다. 여기서 UV 좌표를 움직일 수 있으며, 여기 X에서 UV를 1만큼 시프트시키면 아주 커다란 변화를 확인하실 수 있습니다. Y에도 1만큼 UV 시프트를 주면 일부분이 미끄러져 올라가고, flip X와 flip Y를 키면 텍스쳐는 셰이더에 따라 무궁하게 변화되어 알아차리기 어려울 정도입니다. 여기서 만일 UV 로테이트를 올리고 이를 180도로 설정하면 엄청난 양의 배리에이션을 얻을 수 있는 데, 이 모든 것이 하나의 셰이더로부터, 하나의 텍스쳐로부터 그리고 하나의 오브젝트로부터 얻어진 것입니다.
Resume Auto-Scroll?