Unity3d Halo fog Sky Box

Source: Internet
Author: User

Six years ago when the first contact with "World of Warcraft", was impressed by its beautiful picture, a place called barren land, deeply imprinted in my mind. At that time in Azeroth can not use flying mounts, imagine alone in the Silver Moonlight Travel, may also have your fighting partners, quiet night, Bright moonlight, together through six years ... Even now in retrospect, the mind is not t123456s123456, but the intersection of the night sky.

<ignore_js_op>

To get back to the point, it's not difficult to create such an effect in unity, in the jargon of a professional, just create a sky box and give it a sky texture. In layman's terms, the terrain created in our previous chapters is surrounded by a cube box and a picture of the sky above the box is taken care of. There are software that can extract World of Warcraft footage and use it in our own games.

But I'm not going to tell you this in this chapter, because the theme is to sort out the sky box and lens flare, and if there's time, I'll write another article about how to use the powerful "Wow model Viewer" to export World of Warcraft models, textures and more, and import into unity. In fact, the specific operation is not difficult, impatient friends can go to google code download this software:http://code.google.com/p/wowmodelviewer/downloads/list

Unity has brought in several sky boxes, from daylight to dusk to night, and it is fully enough to do the scene exercises. To use the Sky box footage, just import the Skyboxes package (as for how to import can refer to my previous notes, each time to repeat a little bit of the egg pain ^_^). After the successful import can see a lot of sky box material in the "Standard assets->skyboxes" directory of the Project Resources panel, Unity has already made the box, we directly use it OK, very humane.

Next to add the Sky box material to the game scene, there are two ways to add the Sky box, here first write a relatively easy to understand one, the other will be written in the future of the Presets and components to explain again.

Click on the main Menu "edit"->render Settings (Render settings), the viewing panel view will appear in the rendering settings options, note that there is a skybox Material (Sky box material) option, click on its right side of the small circle, A dialog box will pop up to select the Sky box material. Click on any of the material balls, the Design view will provide a preview immediately, double-click to confirm the use, quite convenient.

<ignore_js_op>

The light is not enough, remember the previously added "linear Light"? Yes, that's the "infinity, Infinity Flashlight Like the Sun" ^_^. It is now quietly lying in the hierarchy of the panel silently burning themselves, illuminating the world, it is not called Lei Feng, its name is called directional light. This name is a bit of a mouthful, select it and press the shortcut key F2 change, change to Sun, it as the game of the Sun. Careful friends will find that the direction of the sun and the Sky box on the false sun will not necessarily be the same direction, may lead to the position of the sun and the shadow of the location of the reality, so you have to manually adjust, let them coincide.

Here is a convenient way to first drag the view in the Design view, let the center of the lens align the sun on the Sky box, and then temporarily set the Sky box to none in the render setup (to make it easier to adjust sun's angle, the sky box is too bright to see clearly). Then select sun and use the Rotate tool (shortcut E) to orient the light in the direction of yourself and then restore the Sky box. This will not make the sun and shadow in the same direction of the joke.

<ignore_js_op>

Friends who have played photography should all have this common sense, when the lens of the sun, there may be one or more colorful halo phenomenon. Baidu a halo, found all about a game of @[email protected], finally find a picture, wronged aunt you. The top right corner is the legendary halo. Import the Unity-brought package "light flares", select the linear Ray "Sun", find the Flare property in the Sun's inspector, select a halo picture (I chose the "Zoom"), when when the ~ look at the sun in the sky, is it more dazzling?

<ignore_js_op>

<ignore_js_op>

After completing the halo, by the way, the fog and other settings also understand that the so-called "to the poor Trinidad and higher," and put in today's city is not quite suitable. Because of pollution, a variety of small dust floating in the air, usually may be difficult to detect, but when the eyes overlooking the time will find that the distance is simply a confused, with the same fog days. This mist can be easily adjusted in Unity's rendering settings, and can even change colors and concentrations, among others:

    • Fog (whether fog effect is enabled)
    • Fog color (fog colors)
    • Fog mode (FOG) can choose "Linear (Linear)", "Exponential (exponential)", "EXP2 (exponential 2)" Three kinds of rendering mode, the specific hands can be tried, the difference is not very large.
    • Fog Density (Fog concentration)
    • Linear Fog Start (linear fog start distance)
    • Linear Fog End (linear fog termination distance) when you select a linear fog pattern, these two parameters represent the range of fog relative to the lens. In this range the concentration of fog is averaged, that is, when the range is very small, objects in the distance are very clear and the objects near them are not visible at all.
    • Ambient Light (ambient light) adjusts this color to affect the lighting of the entire game scene, such as pink words. Just so ambiguous ah haha.
    • Skybox Material (Sky Box material)
    • Halo Strength (Halo strength, not clear)
    • Flare Strength (Glow strength)
    • Halo Textrue (Halo map, not clear)
    • Spot Cookie (spot?) Didn't get it)
<ignore_js_op>

Last Zhang, scorching bored ah haha ~ seems the next chapter must add Water:)

Unity3d Halo fog Sky Box

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.