Previously: 2021 New Technology – Build rendering engine series from scratch

Before you start writing code, you need to know exactly what a rendering engine is to know what to write.

Search 🔍 rendering engine in Google and the results are all about the browser rendering engine.

The browser rendering engine is mainly used to render web content, such as content layout, text style and so on, which is obviously not what I want.

However, on the one hand, we can see that the search engines are more oriented towards browser rendering, on the other hand, the keywords we search are not clear and accurate enough.

Instead, a Github search for RenderEngine brought up a bunch of projects that many of you have written about.

Take Google’s Filament project, for example, which has the following address

Github.com/google/fila…

Filament is a physics-based real-time rendering engine that runs on Android, iOS, Windows, Linux, macOS, etc.

Some examples can be seen from README as follows:

When I didn’t know much about rendering engines, seeing these images was a bit confusing, especially after seeing several similar projects.

I wanted to see what the rendering engine would look like when it was written in code, and I ended up with a couple of images, a bit of an opening image, all edited.

Later I found out that these images were renderings made by a rendering engine.

The objects in the image are imported by loading the model, then rendered on top of the original model, adding colors, lighting, shadows and so on, and rendered to the screen, which is what the rendering engine does.

It seems simple, but every detail is worth studying.

If a rendering engine renders an image that looks like a real camera image and you can’t tell the difference between real and simulated, then the rendering engine is very sophisticated and technically realistic.

Just like the first picture above, the positions of several objects match the background of the picture, just like someone put something on the ground, which makes people confused.

There are a lot of rendering techniques involved in the rendering engine. Refer to several Gihtub projects and describe what they do. The more you write, the worse it gets.

  • HDR Lighting
  • Deferered Rendering
  • Depth of Field
  • Screen Spacc grass
  • Spot Lighting
  • Directional Lighting
  • .

List a little bit for reference, most of which I don’t know, I’ve heard of the concepts, and I’ll implement them later when I start coding.

Here we can try to make a simple definition of a rendering engine: it is a framework that implements a set of rendering techniques.

There are two main points, one is implementation and one is framework.

The first is to treat the rendering engine as a framework with a complete architecture and life cycle that can provide external capabilities. The second is to achieve the rendering ability, ability not once in place, first and then gradually add; Finally, the rendering engine is used in the actual project application, presenting more wonderful content.

At this point, one might think that the rendering engine is very similar to a game engine. Yes, the rendering engine is more like a subset of the game engine, a very important subset, in the implementation of the time will go to reference the game engine architecture design, functional characteristics, is touch the game engine across the river.

For game engines like Unity, Unreal, And Cocos, rendering capabilities are very important. It’s the most important thing, but there are other important features of game engines, such as audio capabilities, object systems, scripting systems, web engines, artificial intelligence, scene management, and so on, that we don’t need at the moment. We’ll analyze it in detail when we need to.

Once you know what a rendering engine is, you’ll get a clearer picture of what you need to do: apply + frame + render.