Worldcraft v0_1_4 fastest terrain editor ;)

Source: Internet
Author: User

During the National Day, I did not go anywhere and spent a few days writingProgram. Sleep when sleepy, eat when hungry, programming at other times. It feels good. I think it should be closed for several days every other time.

Worldcraft achieves a breakthrough in performance. In terms of terrain painting, it is the fastest terrain editor I have ever seen. In fact, I have seen a thing that is faster than me, that is, zbrush 3.1, and that is not a terrain painting, but an Arbitrary Mesh (indeed awesome); compared with zbrush, the bottleneck mainly lies in the GPU. The CPU optimization work has been done quite well. I have no way to make the CPU process faster. zbrush is used for software rendering. Therefore, the modification of the painting process does not require data passing through the system bus, so the speed is the fastest. Below is the latest:

This is the terrain made in one minute. It is very simple and I have not made any adjustments. With a lot of special "brushes" added, the details of the terrain are much more enhanced (but not enough ).

Tips for optimization:

1. the terrain mesh is segmented. Each terrain mesh corresponds to a region of the global height map.

2. During the painting process, only the mesh in the corresponding area is updated for the height chart.

3. Use Dynamic vertex buffer for Terrain Mesh

4. Update normal only when the "brush is lifted"

5. For normal calculation, use "quick square root"

6. Use inline functions whenever possible. When creating a height chart, you can use pointer + offset to obtain the pixel, which is much faster.

//---------------------------------

At another time during the National Day, I began to rewrite the underlying engine. In fact, most ofCodeBut many components have been reconstructed. The layers between components are clearer and the tests are stricter. The references are nebula device 3, ID tech 4 SDK, and tgea. I like the design principles of nebula device 3 very much. It should be viewed by people who actually write engines, rather than looking at ogre ...... (Don't get me wrong. You have to ask me what is my best open-source game engine. I still answer ogre, but I prefer Nd3's pragmatic style.) I will rewrite the underlying part this time, it is for an open-source project (well, a real open-source project, cross-platform, similar to bigworld's game middleware), and worldcraft is only a small part of it. Why do I need to write worldcraft first? It is because when developing a new engine, I need a lot of test data. In large scenarios, I already have enough. X format. You should have developed an editor by yourself.

These projects are all out of work, so I don't have a lot of time for the moment. For example, worldcraft's simple framework took about two months. At the end of the year, it will be much better, and my full-time job will be to develop new engines ;)

The new framework should remove all things that should not be available, so that the Code is as concise and efficient as possible. In addition, it also supports multi-Renderer DX9, dx10 -- well, no OpenGL, i'm already totally disappointed with OpenGL. To write an effect, I need dozens of different extensions, and this is just a platform... It would be a painful process to develop a universal Renderer for ATI and NVIDIA that fully uses the graphics card features. In China, the client is nothing more than windows. It makes no sense to make OpenGL compatible. Development focuses on efficiency and stability. That is to say, it supports ultra-large scale scenarios, as many entities as possible, and as many client connections as possible in the same region. As for special effects, to be honest, it will not be added until later. In the early stage, I only wanted to make several key special effects (several common illumination models and one or two shadow maps). Of course, the framework should be completed in the very early stage. The following sections have been written:

There are still many basic libraries that are not implemented by themselves. The standard library components will be used and will be modified later...

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.