Of course, if you make a game for mobile
platform - not necessarily to create
the whole hair geometry in Ornatrix.
For mobile - you can create a base part
in Ornatrix, but model the basis
by the head polygons and bake hair at it.
What now we will do.
First, we create a hairstyle in Ornatrix and then
select the desired polygons on a mannequin.
And then separate them to create a base
On which we will bake the created hairstyle.
This manipulation is done in order
to save the budget of the hair polygons.
Since most game characters in the mobile games
loaded on such a scale - then in too
fancy polygonal hair does not make sense..
Because users who
play your game - won't see the all your efforts.
Of course, if in mobile games
the character will be on a such scale - you can
create the hair by planes and more efficiently.
Sometimes you can just do a polygonal
simplified mesh of the head and bake
the all hair on it.
So - now I will tell you how it's all done.
So, let's start.
So, select a mannequin and create the hair
with using the Furball preset.
In the Guide From Surface add a mask and
slightly reduce the length.
As a result - we get a basic hairstyle.
I didn't show the initial stage of the creation.
Since you already know about it from
the beginning of the chapter.
For the short haircuts - I usually just
increases the number of guides
in the Guide From Surface at a such value,
so that almost the whole head was covered with them.
In this example - would be enough 3000.
Then apply Ground Strands just in case
and on top of the Edit Guides apply the Surface Comb.
With using the Sinks option set the direction of hair -
upon enabling of the symmetry.
Then make a little changes to the curve
which named Bend Along Strand and
over Surface Comb appoint another Edit Guides for
make the edits.
Where there are missing guides -
add into the bottom Edit Guides by using Plant.
I think this kind of enough to
get a good short hairstyle.
Now let's turn on the Hair From Guides.
Set the Hair Count = 100% to see
the all hair and the amount of hair for the
beginning is set at 100,000.
In the Render Settings, to start
let's set the Radius value = 0.07mm.
Sometimes, this value is less
in depending on the position of the camera.
But the standard - such as.
As you understand - a task is to create
the realistic hair and then bake them
on the surface of the head.
Thus saving the number of polygons.
Go ahead...
On the top of all modifiers
adding Vray Ornatrix Mod and
note the dynamic tessellation option for smooth
shaped hairs.
Also start to configure
the material and lighting.
Assign VrayHairMtl to the hair
and for the lighting - create SIBL studio.
To this - run SIBL GUI,
choose any HDRI,
click Output Loader Script.
Then - Open Output Directory
and copy the path to the script.
In 3dsmax via scripts - run the script.
As a result - we get a ready studio
with setuped lighting.
Click Render and see what happens.
We see that we need to increase the exposure.
For this decreasing Shutter Speed to 50,
and ISO = 400.
Now in the Hair From Guides increase the number of
Hair = 300 000 and in the hair material
select the preset - Blond Matted and slightly
add variety to color with
Vray Hair InfoTex.
Which is loaded into the slots -
Transmission and two types of Reflection.
Then copy the base color from the preset and
add a Ox Hair map.
Downloading it into the slot A.
In the Vray Hair InfoTex - in Output
select Random by Strand Index option.
Then copy OxHair and loaded it into the Slot B.
In the first OXHair - set the roots shade
a little bit darker.
And we get an interesting blond shade.
The only thing I don't like - so it this moment.
Let's fix that.
Comb so that to have a more interesting profile
and use a Push Away From Surface modifier
so that the hair doesn't cross the geometry.
Click Render and I like this result.
Now we can proceed to bake.
Remove the all which created by SIBL -
since we don't need these objects to bake.
Then clean HDRi from the all slots.
And put the white color into Vray Environment.
Check what happens on the render.
As you can see - there is no direct shadows
and the lighting was uniform.
Slightly visible soft AO.
That's what we need.
There is diffuse color and there are no glare on the hair.
The value of the environment brightness set = 2,
that during the baking -
the hair was not too dark.
Now let's talk about the methods of baking,
that may be useful to you.
1. This is a clean baking into the diffuse color of the mesh.
For this method - you should already have
the texture which is applied to the head.
This is the easiest and fastest method, therefore,
I will not dwell on it.
It is very similar to the second.
The only difference is that -
separation of part geometry
for baking in the form of the hair.
About this method I will tell you in detail.
So, go to the side view and in a
selected polygons mode with a lasso -
select the part
which you want to delete on the mesh copy.
Leaving only the part - where there is a hair.
And if necessary - also go on the front view
and delete the unwanted ones.
In the end, we get a mesh for baking our hair.
Since I have used the decimated wire from Zbrush,
then let's to optimize
the prepared mesh with using the Pro Optimizer mod
and convert it to the Editable Poly.
Then, for the Baker to see our hair -
remove the Vray Ornatrix Mod and
instead assign - Ox Mesh From Strands.
Type - Prismatic / Cylindrical and Num.Points = 16.
After that - choose the our base for baking
and assign the Projection modifier.
Through the Pick add the hair and increase
the Cage, so that the hair was inside it.
Now press 0 to open
the Settings of Render to Texture.
At the same time you should select an object for baking.
In the Projecting mapping turn on an option
Enable and in the settings - turn off Ray Miss Check
in order not to be produced
the error checking, and we turn on
Include Working model so that the geometry
of the model is also baked into the texture.
This is done so that the texture of the hair
doesn't intersect with the parallel part.
Then adding Vray Complete Map and
Vray Normal Map into the Output.
Resolution is recommended to set = 1024 * 1024
And then reduce to your desired mobile phone.
Because if you just render less
resolution - the quality will be worse than
reduced from 1024 * 1024.
Since, when decreasing in Photoshop - applied
a special algorithm which
making the texture more clear and qualitative.
Next - down below and note
Output into source and Render to files only.
With the Render To Texture finished.
Now go to the Render Settings.
In Settings for the Default Geometry parameter
choose the Static option for the faster rendering.
GI = BruteForce / BruteForce
to accurately render of the hair.
Type = Bucket, Image Filter = Area.
In Bucket Image Sampler for value of min / max subdivs
set not too large.
So for mobiles games this doesn't make sense.
I usually sett a = 1/4, and for production = 2/32.
Before baking, to the mesh under the Projection
assign Unwrap for alignment the UV.
Since we separated it from the mannequin
with the total UV.
Simply go to the modifier settings
and press Pack.
Now you're ready to bake.
Again press 0 and at the bottom the Render button.
Total, as a render result we get 2 maps.
Albedo, which looks like this and
for the mobile games - this quality is sufficient,
and Normal Map with a wrong gamma.
Even if you set Override = 1
or 2.2 - it won't help you.
3dsmax will still save the normal map
with a such gamma.
Therefore, to fix this
misunderstanding - open the Photoshop
and make gamma correction.
For this go to Image-Adjustments-Exposure
and set the Gamma Correction = 0,47.
This is the same value - which normalizes it.
Then, open the Albedo -
desaturate it and make the Opacity map for the hair.
Next - invert the image
and save it as alpha to JPEG.
Now, let's open the Marmoset Toolbag and
import the model to check the texture.
To do this - select mesh, remove Projection
convert it to Editable Poly and exporting to FBX.
In the Marmoset - click Import model and assign
the standard material.
Now I will not talk about the all
shader settings and this manipulations
we do only to check
the baked maps - Albedo, Normal Map and Opacity.
Upload the Opacity map with a Dither mode.
As a result - we get the following result.
Now let's talk about - how to bake
the hair on the plane.
That is - when you have a ready-made form
of the hairstyles and you want to convert
them to the game hair.
With this method - you will get more
perfect high quality results which is suitable
is not only a game for mobile platform
but the game with the Uncharted level.
This method I like best.
Since it has more control and result
always pleasing to the eye.
No comments:
Post a Comment