Unity3d game art: From Getting started to mastering

Source: Internet
Author: User
Tags deprecated

Unity now has a wide range of uses, but there has been no art to the tutorial.

The contents of the program are discussed in various forums, but the art seems to be very weak.

Obviously the art also needs to master the engine aspect content well!

The wild lilies of the valley and the spring. We also have a tutorial for art!

Did you choose the sub-area where the chicken is less than the dish? Unity3d 3D Art Module

Art little friends must be too lazy to read so many words, so I write as far as possible interesting ...

The plan is from the introduction to the hospital all finished, but can not finish I do not know, digging pits not fill what is the happiest

As for why it is from getting started to being hospitalized, because you have learned this set of things, you have the strength to tear down the program in the project.

Point out the programmer's error put forward an effective solution punch Nanshan old planning foot kicking Beihai programmer

(Aha haha, joking, the research and Development Group's small partner is to phase ♂ pro-phase ♀ love Ah ... )

But considering that the program's been single for years, I guess your last brawn is in the hospital.

OK now we've made a cool awesome cock bombing Day animation <ignore_js_op>

Next we need to see it in the engine, and configure everything so that the program Master (APE) can use it smoothly, this is what I want to share with you next. <ignore_js_op>

We need to export the format of the FBX file from Max for the engine to use, the exported file is usually divided into the binding model and animation two, the export method is divided into direct export and export selected objects two kinds.

Model files to export mesh, bone, skin information, materials, and other mesh-related sections. Map files do not check the export time, otherwise it will cause unnecessary trouble during maintenance, as long as the manual map copy to the specified folder, the engine is re-designated. It is important to note that mesh, the name of the material in the engine modification is more error-prone, so be sure to change the mesh in Max, the name of the material and then export.

Is the place to note when exporting, skins is the skin information morphs is the vertex deformation animation (emoticon animation) Embed media is a decal file.

<ignore_js_op>

Animation file to be exported is mainly animation information, note that the animation file skeleton structure and naming must be consistent with the model file, otherwise it will cause the animation to be lost. If you are using an older version of unity that does not support link links, prop bones, and so on, you should tick bake animations when exporting. Such as:

<ignore_js_op>


After exporting an animation, there are usually some such errors,

<ignore_js_op>


Encounter Max unhappy those days of the error will be special, there are several pages ... <ignore_js_op>

<ignore_js_op>


Here I give you an effective solution, that is to point it! Yes, right, just make sure you don't hesitate at all. Believe me, your 90% error is not related to these errors, the remaining 10%, you do not have to look at these error messages will also know that the file has a problem!

Export is divided into direct export and export of selected objects, the difference between the two is

One is to export the selected object directly ...? <ignore_js_op>

Well, actually, I was just saying that their differences are not much of a practical significance in my opinion. With direct export, everything in your max, visible like mesh and invisible like particle view will be exported, the skeleton model you need to export and the helper dummy points you don't need to export will also be exported. But you don't have to be nervous, we're in the u3d. You can edit all this, leaving only what we need, and the rest will not be packaged into the game to occupy resources. So usually we just export directly, but sometimes if you encounter a Virgo programmer, they will ask for concise specification of resources, as well as visually neat and clean, no ♂ can not be used, at this time you need to export the selected object. Exporting the selected object is what you choose to export, meaning that if you select only one bone when a full animation is exported, only the animation of the root bone will be exported. But when you go into the u3d, you will find that ........

You didn't find anything ... <ignore_js_op>

Because there is only one bone, there is no full parent-child connection engine that cannot read the animation information. <ignore_js_op>

Smart you are not already thinking of what. Yes, you can rip it off with the program.

<ignore_js_op>


Tearing force guide: Because the export of selected objects will be a mistake, if the amount of resources, maintenance costs will be very large. Just to meet your ape's unreasonable needs to consume the baby's how much energy, and after all, human maintenance, it is impossible to completely error, once the error checking the changes will take time.

So why not just export the simple insurance?

<ignore_js_op>


I guess this step of the process will not say anything, at most again how to use the time to clean up the useless resources, the problem we left in the import content.

By the way, how to delete the above mentioned particle view, so that in case you lose, the file appeared in the invisible particle view, uh ... If you have never met him ... 13

Just when I said nothing ... <ignore_js_op>

<ignore_js_op>


Attach an export interface for translation and basic introduction

<ignore_js_op>


OK, now we have exported a clean or dirty fbx, in short he is available. Now that we've exported it, how do we use it in unity? Don't worry, we'll see where he is.

<ignore_js_op>


This is a standard unity project, as an art that does not write code <ignore_js_op>

, you just have to care about assets the folder of this resource. There are two common types of engineering management in Unity: Resources and code within a project, and resources and code separated under two projects. Each of the two options have advantages and disadvantages here does not expand said, but no matter what kind of you use, there must be assets, here to store all the art resources to use in the game, that is, the game is not used in resources, do not put in this, otherwise ... <ignore_js_op>
Assets there will be a lot of folders, according to different items of classification methods have different, ask your program uncle to go to the path of the action file, and then remember it, in the future, the contents of this path by us to protect!

<ignore_js_op>


Before becoming a qualified guardian, first to learn the basic operation, the eight windows of one can not be less, all to remember is what to use!

<ignore_js_op>


1.Hierarchy It can be simply understood as the outline view in Max, which is the H-key view, when you want to view, edit, and modify a thing, you usually drag it in this view first. Here you can view, edit the object hierarchy, or you can do the prefab here, this view of the top left corner of the Create drop-down menu, you can create a lot of unity built-in objects such as lights, geometry, cameras, UI board and so on.

A file Management window within the 2.Project Unity engine, where you can view and edit all the files under assets. Here is a file Management window to create folders and other common files in the unity engine, such as scripts, materials, state machines, and so on, is created here.

3.Animator Animation state Machine editing window in some project group animation state Machine is edited by the program, and in other projects by the animator to edit, that is, the content here is a lot of work with the program of the intersection of the section, the following will be described in detail here the use of the method, Here the main function is to edit the animation state machine, processing layered animation, editing animation mask and so on.

4.Inspector simple to understand as a Property edit window This window is primarily used to edit the properties of the currently selected object, and if you ask me what properties you are editing ... I can only say what attributes are edited ... Depending on the script, plugins, and editors written by the program, the editable content is different. The number of times the toilet is used is almost the sum of the other panels.

5.Scene scene It's easy for you to drag an object to 1. Hierarchy, this object will be displayed in the scene window. The approximate function is similar to Max's main window.

6.Game Game window Of course it's a game. Click the play key at the top center of the Unity Interface, and the window will start to run the game. is the local PC version that we often say, when you export new resources or modify the original resources, you can use this method to see his actual performance in the game.

7.Animation is an animated window, but it's still a little complicated to use. You can view animations, or you can use it to do some simple scenes animated camera animations in unity.

8.Console? I usually call him error window ... Here will be reported all kinds of yellow red error reminder, for you it is the biggest meaning, it can be reported to the wrong program to see ...

Okay, now we're going to formally introduce the import process for a model file.

First of all, when we export, we follow the path provided by the program and the name of the FBX, then we will find it in Unity's Project window. Check its properties in the Inspector window

<ignore_js_op>

In order to save ink (lazy <ignore_js_op>) I will not explain, say a few commonly used.

Scale factor model scaling this should theoretically be 1, which is the original size of the model. But it could be 0.1 or 10 or something like that, with your Max's unit setting, whether it's a couple of things, as long as it's uniform with the other models, OK.

Mesh compression mesh compression, used to reduce the number of faces of the model, this is generally chosen to close, if you program said that the number of faces of our model is too high, I want to compress here, beat him, and then called the model of the students to find ways to reduce the number of polygons in Max.

Import blendshapes importing Blendshapes? Blendshapes is Maya's saying that Max is called Morpher, which is the expression controller. If you make Morpher emoticons in max, check this option to import directly.

Material naming material name there are several drop-down options that ask if you are using a map name or a model name. Because you import the model in the time will automatically bring the material ball into the engine (if you do not want to bring in the back of the import materials to remove), this option determines how the material ball named, if it is selected according to the model named, the material ball will be the same as the name of the material ball in Max, If the material is named according to the map, the ball will be the same as the map name it is associated with.

OK, go ahead and say a page sign rig, here is the setup model for that animation system and the configuration under the animation system. Animation type can be pulled down by four tabs, respectively n\l\g\h. It's a long story ... I'm here to say a little bit about the model here, and I'll write a chapter on the animation system behind it.

n This tag we can just ignore. <ignore_js_op>

L is a 4.0 version of the previous animation system, is older than the insurance of the animation system, provide less functionality, but there will be no error, suitable for very simple game.

G and H are two sets of animation systems at the same time in the 4.0 version, they have a lot of similarities, such as all have their own state machine, the integration of their own animation, with Avatar and so on. The big difference is that h, the animation system is specifically designed to do the human-like biped, it provides the redirection of animation, that is, it provides a set of animations given to different models of the solution. Does that sound too deep? In fact, the actual use of the time limit is still a lot of, after I slowly say I have encountered the pit!

Both the G and H animation systems have Avatar, and generally the model files are using the create from the this model, and the animation files use copy from the other Avatar.

<ignore_js_op>


G animation system allows us to manually specify the root bone is in the root node side drop-down menu selected

<ignore_js_op>


H Animation System There is no specified option for the root skeleton on this page, but there is a mysterious button, let's try it out.

<ignore_js_op>

<ignore_js_op>

<ignore_js_op>



Suddenly draw the wind a turn, this person green (also may be gray) ... In short, this is mainly used to configure the redirection of bones, small green people on the body of the dots corresponding to the following green dots, each point after the box can specify a bone.

I come to try to talk about its principle, can say clear also don't small red flower, don't know also don't hit me. This green man is the character skeleton structure of the H animation system, each node allows us to manually configure the skeleton of the current model, that is to say, the left hand bone of this model is called "Mann Jade", we assign the jade to

<ignore_js_op>


Here, the right hand hand bone is called "Zi Yi", we assign to

<ignore_js_op>


Over here. We completed the skeletal redirection of the current model through the specified skeleton, and we got another animation of the model specified by the skeleton, whether he is called Cecilia or ice ice, and through the redirection of the skeletal structure of the character, we can ignore the name, length, size ... Use the animation information directly! Not bad! In fact, you lazy use of BIP is also used this theory yo!

Say a little trick,

<ignore_js_op>


The classmate who uses Max to animate must remember the second option, he can configure the skeleton information according to the max default bone name one key, save you one drag and drop trouble.

<ignore_js_op>


There is also this biped pose, sometimes the file will be reported that the current file is not tpose, but also a point to fix it!

Now that we've imported the model perfectly, let's talk about the play animation import settings. Because the animation import how to set up depends on the use of the animation system, so I will put three animation system import settings Separately, three animation system will have some overlapping content, this kind of content in front of the next will not repeat.

Good first is the Legacy animation system (hereinafter referred to as L), the Legacy animation system used to not call this name, formerly he was the Unity animation system of the tall handsome Wuli of the only son

<ignore_js_op>


, when it was not called the name, he called Animation animation system, the corresponding animation script name is also animation. The next 4.0 versions came out, with the new generic (hereinafter referred to as G) and humanoid (hereinafter referred to as h) animation system, unity officials changed their son named Legacy (Legacy).

The advantage of legacy is simplicity, he only provides the most basic features of the animation system, animation segmentation, animation compression, and some basic parameter settings. Less function means less error, so the Legacy animation system more stable production of fewer bugs, but also because of the lack of functionality, when you need new features when you need to write the program, which requires more work of the program. and encountered the novice program, may be written out of things, as the official in humanoid and generic animation system of the <ignore_js_op>, which is the legacy system shortcomings. <ignore_js_op>

<ignore_js_op>

<ignore_js_op>

First this interface, actually I do not want to say because in addition to the store in the root (New) This option, the other has been put on the deprecated (deprecated) tag, here I have tried to use other options what is the difference, the answer is no difference ... Writing this paragraph is entirely for the benefit of curious babies and obsessive-compulsive patients ...

<ignore_js_op>

<ignore_js_op>


Then the first part of the page is signed.

Import animation is the literal meaning, animation import does not tick the words will not be animated (so in other words, if the model file is not careful also with the animation information, you can remove the check here).

The Wrap mode animation loop drop-down options are default, once, loop, ping-pong loops (one-time rewind of a broadcast), and stay at the last frame.

Anim.compression animation Compression There are three options for turning off compression, reducing keyframes, reducing keyframes, and compressing. The next two main difference is that the third option compresses the size of the file while reducing the keyframe.

The following three error parameters are compression thresholds His compression principle is that when two frames move, rotate, and scale less than the 0.5 you are currently filling, this frame is deleted. This 0.5 is in what units I really do not know ...

<ignore_js_op>


Tear force guide: This value I open up to 0.8, then the big words will appear more serious distortion, animation will be with you in Max see a lot of difference. But the program will often ask you to increase this value as much as possible, big, big, big ... He's asking for performance, but we're asking for a picture. You tell him that the real optimization is to ensure that the picture effect under the premise of optimizing performance, rather than blindly reduce the effect of art, it is a fart optimization!

<ignore_js_op>


Some common footstep shaking, object jitter may be related to the root animation compression, small compression values are usually able to solve the animation jitter problem. Of course, animation jitter is a giant pit, there are countless reasons for jitter, and some of the reasons are even non-solvable ... If you change the compression threshold is not good, you can explain ...

<ignore_js_op>



<ignore_js_op>


Here is the animation segmentation, sometimes for the convenience of making and modifying, we will put a few animations in the same animation file, so that you need to cut them apart in unity. Click the Red box to add or subtract animation segments, then select the Orange box to rename the currently selected animations, and the blue section to modify the starting and ending frames of the animation. Add some of the orange-related content, the Unity standard animation naming format? model name @ animated name like [email protected]? Once this is imported, unity will automatically name the animation idle instead of Take 001.

<ignore_js_op>


See a familiar name here? Wrap mode animation cycle mode, where the animation cycle mode is for our segmentation of the animation section, the above is for the entire animated file. Note that there is an add loop Frame above wrap mode, and this option uses the overall looping mode setting for the entire animation file, and you can set the cycle mode individually without checking.

Mask Animation mask? Definition This part is said to use the animation itself mask or from elsewhere to obtain an animated matte, the use of this mask is to block part of the body animation, then how to use us to put in the animation state machine part. The following transform will list all the bones of this animation, which you can tick according to your needs. If there are no special requirements should be checked, but there will be such as the end of bone bones, the end of the CS skeleton dummy This kind can be unchecked.

Import Messages Import Information If an error occurs, you will be prompted here. The most common is the skeleton link is not standardized error ...

The lower right corner of the two keys is to restore and execute. You do a bunch of operation settings and you must remember to apply, or you can give it all up and start from scratch revert.

Generic? This is the unity of the official used to replace the second son of legacy, unlike his eldest brother, Generic in 4.0 just launched a variety of bugs, the use of various pits, simply can not formally used in the project, is simply the devil ...

<ignore_js_op>


But with the iteration of the version, generic more and more perfect, more and more powerful, the little demon has become the Dragon Mother's king hand ... Cough, I mean generic has become the first choice for most projects ...

<ignore_js_op>



Avatar Definition? Avatar mode model with its own avatar, animation with copy of the Avatar before said not to repeat.

Root node here can specify the root skeleton, which itself has nothing to say, just select the root bone you need to fill in. But here to focus on the none of this option, if you give the root bone straight to none, which is empty, then unity will itself according to the center of gravity to calculate a root bone, the root bone is real-time operations out of, well ... In a nutshell, he's going to play you dead ...

And then there's an option called the Optimize Game object. I checked the official readme to the effect that he would optimize the bone node on the avatar and optimize the extraction of the skin skeleton, in general, it is not very useful not very please chu ...

<ignore_js_op>


Loop time is the animation loop setting, and the animation loops after the tick, which refers to looping through the state machine, speaking of state machine I'll say it again.

Loop pose can be understood as a position loop. For example, the animation is moving forward a meter, and then cycle the second time, is the location of a meter or the origin of the location broadcast depends on this option.

Cycle offset literally means a loop offset. Can be understood as a playback delay. Assuming a 40-frame animation, where 0.5 is filled, the animation will start at the 20-frame position.

Specific application: I casually say you casually listen to, this function estimate few people use to get. Suppose a burst of the shooting game, there is a left-running and ultra-right-running animation, and animation is mirrored copy out (the Mirror method will say below), and need to do a fusion of animation left to run the right run seamless switch. Left running the first frame of the painting is the left foot, and run is mirrored in the past, the first frame is naturally right foot, so that is seamless! Then we'll just fill in the 0.5,ok of the cycle offset. He will start from the middle of the animation is the first left foot.

Well, it's very tear-resistant ...

<ignore_js_op>


As for the back loop match is the check loop is not a match, in the language of the animator, is the end frame is not consistent ... The more green the more consistent the more red the difference is greater ...

The following three options are one thing: rotation, y-axis displacement (vertical direction), XZ axis Displacement (horizontal direction). Bake into pose refers to "based on what" but you can simply rough the understanding of the lock, after the tick will lock the rotation or displacement, whether it is the animation of the displacement or the engine calculated displacement will be killed. Based upon probably understood as the initial position, axial bar. Body orientation is the physical orientation, original is the original appearance of the animation, Center of the Mass The truth is the center of mass, but certainly not you understand the centroid ... In this case, the official Readme I did not look at, I said these basic is my performance based on the use of anti-push theory. If you see it in another tutorial that is not the same as I said, I don't care, anyway, he is wrong ...

<ignore_js_op>

<ignore_js_op>


Mirror image For example, you made a left-hand run, in the animation segmentation where more than one animated paragraph renamed to the right to run, and then tick mirror can get a right turn to run.

Additive Reference Pose Add Reference Pose As for what to do with ... The baby is not clear ... And the following curves this curve function I also ... Never used to ... I don't know what to do with ...

Events this is mainly for the program, in the animation of the timeline to add an event point, the program can check the event point, and then execute a command. For example, in the attack animation of a frame plus the event point, as a notice to play effects.

Mask above said definition above said transform above said there is still a humanoid. This humanoid can be understood as a switch bar, hand and foot ik and various parts of the animation switch. The default is a green villain, if you do not need a part of the animation, you can point it into red.

Motion Specifies the root bone, and yes, that's the reason. Clearly specified once the root skeleton, here again specify. But what is the difference between the two sides, I still do not understand, I asked the program, the program did not understand, so this problem left you. Ask the program these two places are what use, what difference! Go to the programmer to ask, who is the program to give him a love hug, and then come here to share yo!

<ignore_js_op>

<ignore_js_op>


Humanoid

I found out what humanoid can tell, and I've talked about it before ... This is embarrassing.

<ignore_js_op>

Unity3d game art: From Getting started to mastering

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.