Lawn laying System for outdoor terrain

Source: Internet
Author: User

Dense lawns have always been difficult to express in 3D games, because rendering lawns requires a large number of polygon and a high pixel filling rate. However, the gaming industry has never given up its desire to render lawns. About two years ago, some promotional texts of Games gradually promoted dense lawns as their own characteristics. The Treasure of the treasure of wonder, a fixed-angle game, impressed many people. However, currently, lawn rendering is still not a simple task. A masterpiece like World of Warcraft just uses grass as an ornament and places it on the terrain.

Finally, I couldn't resist the temptation of lawn, and added the lawn building system to the terrain editor. The results of system implementation are satisfactory. The following features are summarized:
1. Art does not need to provide grass models. As long as the grass textures with symmetric edges are provided, the system will automatically generate cross patches.
2. vertexshader is used to control the four vertices on each grass to swing according to certain rules to simulate the effect of breeze blowing.
3. obtain the ground light brightness information from the ground where each grass is located as the basic brightness of the grass. The above four vertices are randomly brightened by a range, the following four vertices are randomly dimmed to simulate uneven illumination of the grass.
4. Draw the invisible patch by means of the cone clipping and the PVS information mentioned earlier, and update the grass on the visible patch to a dynamic vertex buffer by sort by category. Each grass is drawn by a drawindexedprimitive call. The total number of calls will not exceed the grass type.
5. A special record method is used, which occupies only four bytes in the storage file.
6. The grass-laying system is fully integrated into the existing Undo/Redo architecture.

Through Cone Cutting and PVS elimination, and a few dip calls, the grass-laying system achieves good rendering efficiency. In the future, the terrain design should be able to show the grassland effect more freely, it provides richer landform features and a more interesting gaming experience.

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.