Talk about Unity2018 's LWRP and mixed lighting.

Source: Internet
Author: User
Tags svn update

0x00 Preface

In this article, we have selected some of the more representative issues of Unity's official community Exchange Group and UUG community group over the past few weeks and are here to share with you. Mainly covers the fields of * * Scripting, Assetsbundle, Tilemap, Graphic, Ugui, Asset, Profiler, App, Shader, Timeline, lighting**, etc. It will highlight topics related to LWRP and mixed lighting.

At the same time, you are welcome to join our official Technical group to discuss dry goods, exchange views sharing experience.
Unity Official Community Exchange Group:629212643

0x01 Scripting

Q: Unity2018.2 Create a new project, and then create a new script, open to prompt this, unity did not generate the SLn file, do you want to set where?

A: First Look at the visual Studio 2017 that was used when creating a new project in Unity2018? UNITY2018 no longer supports visual Studio 2015. To resolve this issue, download the latest version of Visual Studio 2017. In addition, you can also use Visual Studio Code, which is a faster, lighter, and compatible script editor for unity.

0x02 Assetsbundle

Q: have you encountered the same project that has been updated from SVN, the assetbundle of most of the files from different computers and the MD5 of Unity's own hash value?
A: are there leaks uploading meta files? Our project was tried once, and a colleague missed uploading the. meta file, and then when the other colleagues updated it, because there was no meta file for him, unity was automatically generated locally, allowing different people to generate their meta files from the SVN update, and then the MD5 was empty. The meta file is a unity record GUID, and unlike that, there seems to be a problem with calculating MD5 in Assetbundle. ( Guangzhou-wood snake stick )

0x03 Tilemap

Q:Tilemap at the time of drawing, in the scene, a tile cannot fill a block of units in a whole scene. Excuse me, what's going on?

A1: I cut the size, a piece is 64 * 64. Sprite Settings pixels oer Unit I set the 100, set to 64 just fine.
( Chengdu-mid)
A2: In addition to checking the Pixels Per Unit property of the Sprite, you can also see if the Tilemap component's Scale property is 1, and the settings here may cause the tile to not match the unit block in the scene.

0x04 Graphic

Q:@ Murong Small Bastard This reflection how to change its range, they do not. Thanks a lot.

A: This is a problem caused by incorrect sampling. If you are using reflect probe, then check the box projection for indoor or small-scale scene reflections. This is because the objects in different positions should have different reflection effects when they correspond to the same reflection Probe. The general cubemap is more suitable for simulating the reflection of large outdoor scene objects, the small indoor range if used cubemap may be confused. Checking box projection can be used to fix this error.

0x05 Ugui

Q:The Ugui font is displayed normally in the editor, but the packaged PC cannot be displayed, is anyone ever in this situation? The editor is normal to load from resources, or from assetbundle, and what fonts are normal, But you can't show them after you pack your PC.

A: missing Unity's built-in UI part of shader, I downloaded it and included it in the graphics. ( Beijing-Rabbit No. 2nd )

0x06 Asset

Q: for help, when packaging crazy output This, also can not see which file.

A: looks a bit like Pvrtextool's error. Unity calls Pvrtextool's command-line tool to compress the map, so we can reduce the range of error files to the map resource.
First, you can check whether there is a PVRTC format of the compressed texture, you can also look at your etc2_x texture format, the works of the texture to do an elimination method.
A discussion of related bugs can be viewed in the relevant topics in the Imgtec community:
https://forums.imgtec.com/t/pvrtextoolcli-bug-encoding-etc2-rgb-a1-etc2-rgb-a1-ubn-srgb/2365

0x07 Profiler

Q: See the Unity Profiler on Windows, where the total system memory usage has grown infinitely normal?

A: It doesn't look normal. This value is obtained using the PROCESS_MEMORY_COUNTERS_EX on Windows. You can take a look at your project reserved total these have no sustained growth. If it's all up, just optimize it.

0x08 App

Q1: I want to do a loaded window now and then display the game content when it's finished loading. However, the window you want to load does not have a border (no closing is minimized, and so on). Now call the Win32 API to set, always see a border first, and then quickly to the borderless. There is a jump in the process, look uncomfortable.
A: you can call SetWindowLong. The code is as follows:

If there is a jump, you can consider the program start parameter plus Popupwindow. ( Beijing-Rabbit No. 2nd )

Q2:
A: This problem is usually caused by a plugin. You can check in the project if there are duplicate jars and delete them if there are duplicates. If you do not want to find one, you can also consider deleting the project's "Plugins" folder and re-importing all the plugins.

0x09 Shader

Q: Using "Usepass" in shader to refer to another Subshader pass of the same shader causes a crash, is this a bug or is it impossible to write? The version I'm using is 2017.4.6f1. For example, this:

A: Usepass is primarily used to implement code reuse in different shader, and the relevant description can be seen when viewing a document:

Some of the shaders could reuse existing passes from other shaders, reducing code duplication

So don't use Usepass to refer to a pass in the same shader.

0xA Timeline

Q: I would like to ask you teachers a question about timeline, the position of the timeline in the middle of why the play after the run will be offset?

A: does the animator component on your model have a controller? You can remove the controller from the animator and control the action entirely by the timeline. Because its animation is an increment effect at run-time, it also covers the upper-layer data during the editing phase. So it might not be the same.

0xB Lighting

Q: This is the light probe of the default pipeline, and you can see that the dynamic object is dimmed into the shadow range.

This is the effect of LWRP, after baking light prob shadows will not have any effect on dynamic objects

Baking mode is Mix subtractive, lighting a mixed mode of directional light, ask, whether LWRP subtractive baking mode will make light probe ignore the impact of shadows?
a: This is not the cause of lightprobe, but the current LWRP to mixed light support is not perfect. More support for mixed light is still under development. Under the LWRP pipeline, if the mixed is not used, only bake lights are used, light probe can function correctly on the dynamic object.

Is the contrast between the traditional rendering pipeline and the LWRP in light mode.
For a complete comparison, you can refer to this document:
Pipeline Feature Comparison:https://docs.google.com/document/d/1mgoycuhs9xqkxxbty1yht7ocbyi10rds3tyrbcslfmg/edit

0xC PostScript

Well, here are a few of the small issues that we are going to share with you in the group.
Again, we welcome you to join us in this discussion of the official technical Group of dry goods, exchange and share.
Unity Official Community Exchange Group:629212643

Talk about Unity2018 's LWRP and mixed lighting.

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.