This is the post that is the second day of "Shader Advent Calendar". It is content who make easily even a beginner for making material.
格子付きモザイクマテリアルのメイキング記事を書きます。とてもシンプルなマテリアルです。 I'm gonna open to the public an article about the making of checker and mosaic material like this video on January 2nd, 2020. It's a very simple material.#UE4#UE4Studypic.twitter.com/ALHdpm1dIR
First, set a value depending on a number of blocks in U and V for the mosaic to the parameter "Tile Number". This example is setting to 8. So the gradation 0-1 of UV become 0-8. Next, Use the "Floor" node, and gradation became flat per integer as 0, 1, 2... Last, Divided by 8, So It make 8 blocks within 0-1.
Take out a decimal point by not "Floor" bat "Flac" node, so it become gradation 0-1 of repeating 8 times. Then the result and a width of a checker who is set the parameter "Line Width" connect to the input of self-made custom node "PULSE". So the horizontal and vertical stripes are created. Then multiply by each other, and it becomes a checker pattern.
However, In the case of how to make this mosaic pattern, It uses a top-left pixel of texture per block for coloring.You want to use a center pixel, don't you?
Then, Add 0.5 between "Floor" and "Divide", So that's OK.
こんなテクスチャを用意してみました。白い点が4つあります。
I made this texture. There are 4 white points.
「Tile Number」を2にすると、真っ白に塗り潰されました。バッチリです!
If I set "2" to the parameter "Tile Number", It's colored completely white. Year, it's perfect!
Before I forget, I wrote this post about "the Description of VFX on the "Devil May Cry 5" that I was interested in, and I also tried hard to write in English.
By the way, at every presentation of the conference, they allowed not only taking photos and posting to SNS but also taking videos. So I've posted some slide picture from this video.
First, he talked about the concept of DMC5's VFX. Next, he talked about the depiction of realtime fluids using "Vertex Animation Textures(VAT)" of fluids.
He said "it is easy to deal with changing speed when game speed becomes slow" as one of the merit of using VAT. However, he also refers to changing the indices of vertices per frame in the case of fluids(at 5:03~).
As one solution, a normal map is projected along the mesh's normal in a shader. There is a texture that is baked mesh's normal per frame. So I think a bumpy normal map is projected from 3 or 6 directions with referencing to that normal direction of the mesh.
In this game, it's a bit disappointing that seems to be skipped frames because the pose of death and the pose of the first frame of the melting body does not match. However, I feel that melting is so good, and VAT of fluids displays working so much.
First, he talked there is a depiction of geyser, and system of slowing game speed depending on the equipment. So he said we made the fanction of emitting mesh particles using VAT. I think... DMC5's effects speed according to the game's speed, and he said "parts number" for the explanation, so it probably uses the animation with consecutive meshes(This page will read "parts animation".).
I have one question. This page will read on the right "Compared to changing the pattern", and there is comparing the parts animation and baked variable vertex animation. As the comparing blend animation of sprites and without blend animation above this page, it seems the explanation that VAT is more appropriate at slow speed than the parts animation, so I surprised and I thought "How are the vertices interpolated by VAT(fluids)?".
As Mr. Aiso has already talked about, I'm aware that it's difficult to interpolate because changing the number of vertices and changing the indices of vertices per frame in the case of fluids. So I talked about this with my co-workers.
Lately, I can see various examples of VAT at various scenes, but that's so CAPCOM, everything has great looks and seems to be used effectually. This black enemy as a Yellow Devil(that's cool!) moves with twisting motion is so nice.
It seems that processing is so heavy because it is sampling mask textures for dissolving while emitting particles from skeletal mesh skinned per frame. However, It can decrease that processing by using the LOD model of that character. It's a great idea!
Anyone should think that I want to emit particle from the accurate position on the surface of dissolving character once in my life...! Then, I felt it works wonderfully by the video of dissolving the enemy on slide.
●真魔人化/ゆがみ表現で環境変化を表現 "Transfrome to Gradely Deamon / Depiction of changing environment by distotion"
I may have misunderstood, but... First, they constrain a sphere model to the camera. Next, they apply the shader that has distorted scene color to that model. It may refers the scene depth then, and it distorted only from the specified distance to the back. (Is there also a specified width for the fading strength of distortion? Is it correct?) What a really interesting idea!
When the scene color is distorted, I want to know which timing is actually, before drawing translucent objects or after. If it's before that and translucent objects are behind the sphere model, the scene color doesn't include that translucent objects, so the sphere model may hide that translucent objects. They must have solved the problem, but how have they solved that?
It's so cool! Besides, we can depict gradually flip meshes by using VAT, and we can animate a cross-shaped mask texture. We can probably be widely applicable to various cases by using this technique.
●その他Shaderによる物体/環境変化 "Changing the environment/objects by other shaders"
It looks like a projected decal at narrow width depending on slashed trail by sword. However, It can't follow the character's moving by only that, so It requires UV mapping properly. To summary, It bakes at the first frame when hitting an attack, and it doesn't need to bake again after that, so It seems that performance is reasonable.
He talks this technique was also used in "BIOHAZARD 7" and "BIOHAZARD RE:2". In other words, I can say they had already practiced it more than 3 years ago. (Wow! It's been such a long time since BIOHAZARD 7 released...! Time passes by so quickly...)
●Expressionによる効率化 "Improve work efficiency by Expression"
「Extern」についてはモンハンワールドの講演でも登場していましたね。
"Extern" was also explained in the plesentation of "MONSTER HUNTER WORLD".
I think it's so useful. For example, they can keep a constant density of particles even if the range of emitting particles scales up, and they can keep a constant resolution of texture even if it changes the UV scale of the trail of slash, and so on. They can apply this to various cases.