Blog

Making a Game. Part 7: Enriching the Game World

2015-01-23

We continue our gamedev series about the adventures of Pyatigor! (Yes, this is how we decided to name our protagonist.) In this article, we'll explain how to create environment FX and other details which make the game world more diverse and dynamic.

Overall view of the game scene.

Environment FX

By running the game or just viewing the screenshot above, you can see new elements in the scene. Let's take a look at them one by one:

  • heat haze, that is optical distortion due to differences in air temperature,
  • smoking near the perimeter of the level,
  • lava flaming,
  • small rocks floating in lava,
  • smoking in the sky.

First of all, let's talk about heat haze, smoking and lava flaming. All these effects were created using dynamically updated materials.

Preparing the geometry for effects.

For the heat haze material, a solid encircling geometry in the form of a cylinder (1) was created around the islands. As a result, all objects behind this geometry will be distorted when viewing from the center.

For the smoking material, geometry around the islands was created as well, but with spaces (2).

Lava flaming geometry (3) is situated in places where other objects make contact with lava.

Heat Haze

This effect is based on the refraction effect coupled with UV animation of a normal map. Let's take a look at the material.

Heat haze material.

The normal map (1) is at the heart of this material and is used with different scaling twice. Thanks to a Time Blend4Web-specific node, which is being added to one of the UV channels (2), this texture glides through the material creating an illusion of rising heated air.

The normal map is passed to a Refraction node (3), which is yet another Blend4Web-specific node. Also, a mask is generated (4) to be passed into this Refraction node in order to specify in which places distortions will be observed, and in which places will not.

The Levels Of Quality nodes (5) situated before the final color and alpha, cause this material to disappear at low quality settings, where the refraction effect is not available.

Results of using a Refraction node with a mask.

See the above picture to see how it works. On the left the original red sphere is shown ("clean"), then the mask is pictured ("mask"), more to the right the normal map is shown ("normal") which glides through the UV. This will result in visible distortions ("refraction") of the sphere when observing it through the material.

Smoking Material

The material for smoking effect is made similar to the heat haze.

Smoking material.

It is based on the tile texture resembling smoke (1), which is passed to the alpha channel of the material. It moves along the UV coordinates under the influence of the Time node (2) and is combined with the vertex color with a different scale (3 and 4). This vertex color fades the material out on the edges of the geometry.

Alpha mask for the smoking material.

In the above picture you can see how it works. In this case, black color corresponds to fully transparent areas.

Lava Flaming

Lava flaming.

Lava flames are located near bunches of stones. Their geometry is constructed of groups of spreaded polygons, which are painted with a black and white vertex color mask, darker to the top.

Lava flaming material.

Again, this material uses the same UV animation principle. Moreover, it uses the same tile smoke texture (1). With a Time node it is being shifted through the UV in three different directions (2). The resulting color obtained from this shifting is combined with the vertex color, and then all this is used to generate the alpha mask (3). In addition, this texture is mixed a bit differently, painted with fire-like colors (4) and passed into the diffuse channel of the output.

Floating Stones

In order to add further details, I have also added small stones floating in lava.

Series of models for floating stones.

While the source .blend file only keeps five different stones, I managed to make seven variations by adding or excluding different stones from the groups. For optimization purposes, I re-used the island material for these stones.

If you launch the game, you may notice that these stones are slightly rocking. This effect was achieved using procedural vertex animation, namely Wind Bending, which is normally used for grass, bushes and so on. This animation can be enabled for objects under the Blend4Web panel.

Setting up wind bending.

In this particular case I only needed to tweak two parameters: Angle for max object inclination and Frequency, which is how fast the bending will happen.

Note

The wind bending effect is a simple and resource-conserving way to deform geometry compared with animation of any other types. Its settings are described in detail in the user manual.

Smoking in the Sky

New sky material.

If you stare at the sky, you may notice that it is now much more diverse because of smoking. I did that with dynamically updated material.

Sky material nodes.

Once again, I re-used the smoke texture (1) and made it shifting with a Time node (2). The important distinction from the above mentioned materials is that the texture is moving not through the UV coordinates but through global coordinates. The only thing left was to paint this texture with the right colors (3). It is also worth it to note the Levels Of Quality node which switches the material to a primitive two-color gradient at the low quality mode.

Note

The Levels Of Quality node allows to create parallel settings inside a single material for rendering at different quality modes.

Game screenshot depicting new FX.

Now the scene looks much more lively and detailed. However, the most interesting things are still ahead: I mean the gameplay elements for the player to interact with and for which this small virtual space was created. But about that you'll find in one of the following articles, don't miss it!

Launch the game!

The source files are included in the Blend4Web SDK.

Please leave your comments in this forum thread.

Changelog

[2015-01-23] Initial release.

Comments
20 oct. 2024 11:27
Thank you very much, from this sharing of yours I can understand more about the formation process of the game fnaf, this is definitely one of the great shares and not everyone is willing to tell you.
14 nov. 2024 19:05
ในยุคดิจิทัลที่เต็มไปด้วยความสะดวกสบาย การดู ซีรี่ย์เกาหลี ออนไลน์ได้กลายเป็นกิจกรรมที่คนรักกันทั่วโลก ไม่เพียงแค่เพื่อความบันเทิงเท่านั้น แต่ยังสามารถสร้างแรงบันดาลใจและจุดประกายความคิดสร้างสรรค์ได้อย่างไม่น่าเชื่อ การเลือกซีรี่ย์ที่สามารถให้ทั้งความสุขและความคิดสร้างสรรค์สามารถช่วยเสริมพลังให้กับชีวิตทั้งในแง่ของอารมณ์และความคิดเชิงบวก
การเลือกดูซีรี่ย์ที่มีเนื้อหาน่าสนใจและเป็นมิตรสามารถช่วยให้คุณผ่อนคลายหลังจากวันทำงานที่หนักหน่วง ซีรี่ย์ที่เต็มไปด้วยความอบอุ่นในครอบครัวหรือความสนุกสนานในแง่มุมต่างๆ ช่วยให้คุณรู้สึกมีความสุขและเติมพลังให้กับตัวเองได้ ซีรี่ย์ที่มีเนื้อหาผ่อนคลายเช่น โรแมนติกคอมเมดี้ หรือ ชีวิตและความรัก จะช่วยลดความเครียดและเพิ่มความสุขในชีวิตประจำวัน
บางครั้งการดูซีรี่ย์ไม่เพียงแค่ช่วยให้เราหลีกหนีจากความเครียด แต่ยังช่วยเปิดมุมมองใหม่ๆ และจุดประกายไอเดียสร้างสรรค์ ซีรี่ย์ที่มีเนื้อหาลึกซึ้ง หรือแสดงให้เห็นถึงความท้าทายในชีวิต สามารถสร้างแรงบันดาลใจให้กับผู้ชมในการแก้ปัญหาหรือการคิดนอกกรอบ ตัวละครในเรื่องที่มีความคิดสร้างสรรค์ หรือการเล่าเรื่องที่แหวกแนวอาจช่วยกระตุ้นความคิดและพัฒนาทักษะการคิดเชิงสร้างสรรค์ได้
การได้เห็นการเติบโตของตัวละครในซีรี่ย์จะช่วยเสริมสร้างมุมมองใหม่ๆ เช่น การแก้ไขปัญหาชีวิต การเผชิญกับอุปสรรคต่างๆ และการพัฒนาความสัมพันธ์กับผู้อื่น โดยเฉพาะซีรี่ย์ที่เน้นเรื่องการพัฒนาตนเองและการเผชิญหน้ากับความท้าทาย เป็นการเรียนรู้ที่สามารถนำมาประยุกต์ใช้ในชีวิตจริงได้อย่างมีประสิทธิภาพ
การดูซีรี่ย์ออนไลน์สามารถเป็นแรงบันดาลใจในการสร้างงานศิลปะหรือเนื้อหาต่างๆ บางคนอาจได้รับไอเดียสำหรับการเขียนเรื่องราวใหม่ๆ หรือการสร้างสรรค์ผลงานในสาขาต่างๆ จากเรื่องราวที่ดู ซีรี่ย์บางเรื่องอาจมีความคิดที่ล้ำหน้า และทำให้คุณสามารถต่อยอดความคิดไปสู่การพัฒนาโปรเจกต์ใหม่ๆ หรือแม้แต่การทดลองไอเดียที่ไม่เคยคิดมาก่อน
การดูซีรี่ย์ออนไลน์ไม่ได้เป็นเพียงแค่กิจกรรมผ่อนคลายเท่านั้น แต่ยังเป็นแหล่งที่ช่วยกระตุ้นความคิดสร้างสรรค์และเสริมสร้างความสุขในชีวิตประจำวัน ซีรี่ย์ที่มีเนื้อหาหลากหลายและหลากหลายอารมณ์สามารถเป็นเครื่องมือที่ช่วยให้เรามองเห็นโลกในมุมมองที่แตกต่าง และจุดประกายไอเดียใหม่ๆ ที่สามารถนำไปประยุกต์ใช้ในชีวิตจริงได้อย่างมีประสิทธิภาพ
03 mar. 2025 08:44
The world of games and online movie watching are two industries that are very closely linked in the digital age. Both provide users with a variety of entertainment experiences, relying on cutting-edge technology to develop more realistic content. Enriching the game world does not only mean beautiful graphics or smooth gameplay, but also the creation of immersive stories and experiences. This concept can be compared to the film industry and online movie streaming.
Currently, technologies used in game development, such as Virtual Reality and Augmented Reality, have played an important role in enhancing the realism of games. The same concept is used in streaming platforms to enhance the experience of ดูหนังออนไลน์ฟรี and series, such as watching movies in 360 degrees at newhd2025 or using surround sound systems that help viewers feel like they are in the real event.
In addition, the world of games and movies are constantly exchanging content. We will see movies made from popular games or games inspired by famous movies. This helps complete both industries by allowing users to seamlessly connect stories from one platform to another. The future trend of both industries will be towards deeper integration. Users will be able to experience a more connected experience between playing games and watching movies online, whether it is accessing additional content or even participating in the story of the movie through interactive games, which will make digital entertainment more diverse and exciting.
13 mar. 2025 10:58
In this era where the world is moving faster, everyone has their own responsibilities, whether it is work, study or personal activities. Many families may find that the time spent together is unknowingly decreasing. But one of the simple ways that can help strengthen relationships and create warmth within the family is to ดูซีรี่ย์ออนไลน์ from a website with a large number of visitors like https://series-888.net/ Because it is not just about watching entertainment, but also about sharing valuable moments and creating conversations that fill the hearts of everyone in the house. Imagine a weekend when family members are sitting around together, with a soft sofa, warm blankets and delicious snacks in front of them. The TV is playing a favorite series that everyone has chosen to watch together. Every laugh, every word, every opinion exchanged naturally creates a feeling of closeness and warmth. Watching series online has become more than just a leisure activity, but a time for family members to connect their hearts together. Choosing a series that is right for everyone in the house is also important. Family-oriented or comedy series can fill the atmosphere in the house with laughter, while mystery or drama series create deep conversations and encourage everyone to express their opinions. Sometimes we can even learn stories and ideas from series that we watch together, such as love, sacrifice or even solving problems in real life. These can become topics that help family members understand each other better. In addition, watching online series helps create quality time, which is different from just being together without interaction. When we watch series together, we share emotions, whether it is excitement, sadness or gratitude. And whenever the characters in the series face problems, it can cause family members to bring up that issue to talk about, exchange views and encourage each other. Sometimes, online series can help families understand each other's age better.
25 mar. 2025 23:25
Games, watch free series, easy-to-access entertainment but need to know the balance
Nowadays, playing games and ดูซีรี่ย์ฟรี on leading platforms like https://serie-day.net/ have become a pair for many people. Some people play games and then take a break to watch series. Some people watch series until their eyes are wet and then play games to relieve drowsiness this is the cycle of life, which is understandable because both are very accessible entertainment, especially if there are free series to watch nowadays, there are thousands and tens of thousands of games to choose from. Whether it's action, fighting or relaxing, building houses, or farming, there are all kinds. Some games have very good stories, so sometimes it feels like playing and watching a series at the same time. For example, RPG games with intense stories are like watching an anime or an interactive series it's another kind of fun. Or online games that have to party with friends are like watching a series where you are the main character.
As for series, I must say that these days, the good thing is that there are a lot of free games to watch. But sometimes the quality of free websites may have ads popping up, which can be annoying but in exchange for being able to watch without spending money, it's worth it. If you have the funds, you can choose to subscribe to streaming platforms for a better experience but if you don't want to spend money, watching for free is the way to go sometimes, watching a series can help enhance the enjoyment of playing games. For example, watching a fantasy series and then playing a game of the same genre can make you more immersed in the atmosphere. Or some people may watch a series directly related to games and then apply it to their actual games. For example, watching a series about strategy and applying it when playing a strategy game can help you become better at it. Whether you're playing a game or watching a series, just don't forget to manage your time appropriately. Because no matter how fun the game is or how exciting the series is, our bodies still need to rest and go out into the real world sometimes do it in moderation. Play and have fun. Watch and enjoy yourself. But don't forget to live your life too
Please register or log in to leave a reply.