logo80lv
Articlesclick_arrow
Professional Services
Research
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
Order outsourcing
Advertiseplayer
profile_loginLogIn

Cloth and Water Simulation: Overcoming Common Rendering Issues

The Virtuos Team discusses why developers are struggling with creating realistic-looking water and cloth physics and how it is helping game creators overcome these challenges in their projects. 

Introduction

High-quality, photorealistic graphics have become the norm for modern games, with the bar steadily increasing over the years. Even the most minute of details, from the rumpled clothes of an NPC to a shimmering oasis within a desert, add to a game’s sense of immersion. 

These feats of computational prowess are possible due to advances in rendering and powerful gaming rigs that are now more accessible to players. But with this increased demand for graphics come multiple rendering challenges.

Creating a virtual pool of liquid, for instance, is particularly resource-intensive, which is why accurately simulating the real-life interaction between water and other assets without reducing performance is a typical roadblock for many developers.

Meanwhile, realistic cloth simulation is usually time-consuming and tedious, with every ruffle and wrinkle to the cloth typically constituting a single animation that has to be meticulously crafted, sometimes manually.

Peter Sikachev, Technical Director at Virtuos Labs, believes that the biggest challenge in rendering is getting a photorealistic image at a high frame rate.

"Historically, we have been focusing our efforts on the most realistic rendering of massive amounts of opaque geometry: vast environments, props, characters. We have achieved remarkable success in that: it is getting harder to figure out that we are watching an in-engine cinematic rather than a movie," he said. "However, there are certain telltale signs that give the illusion away, such as any transparent geometry like smoke, fire, water, glass– or anything with complex dynamics: cloth, fluid, hair simulations."

Sikachev dissecting rendering technologies at Develop:Brighton 2024

The Trouble with Water and Cloth Rendering

Water rendering is particularly challenging because water is a transparent medium with properties that result in reflection, refraction, absorption, and light scattering. This means objects look different underwater, and it's even harder if you work with other transparent objects "that could be above, below, or even intersect the water surface. Then there’s foam rendering, which is a rabbit hole on its own," Sikachev explained.

Cloth simulation faces a similar set of issues. Ensuring that various fabric behaviors – bending, folding, stretching – can be replicated while still driving consistent performance takes significant effort, which is compounded by a unique set of challenges. Even specific qualities of the fabric, such as the cloth’s material and thickness, can affect how seamless the animation looks. 

"Cloth simulation is hard because for the sake of interactivity, we cannot yet run an accurate solver, akin to those used in offline simulation software, such as Houdini, in the runtime. That means we need to come up with approximations, and it gets challenging to nail down all the desired effects and stay within the frame budget," said Alexis Vaisse, Senior Technical Director at Virtuos.

Overcoming These Rendering Challenges

Simulating water and clothing is a calculated move and can be propelled by real-time physics calculations. Sikachev says that Virtuos crafted a complex system for rendering oceans and rivers, with one of the most crucial tasks being producing realistic waves. It was applied to an unnamed AAA project that Virtuos is currently working on.

"What we did was to use true simulation data from Houdini with minimal manual work needed, and automatically remap the UVs when the wave breaks. To avoid tessellation issues, rendering guiding splines to textures, and complexity to the whole ocean shader, we developed a technology that allows the rendering of these rolling waves as separate meshes, while preserving a seamless transition to the main ocean body," recounted Sikachev.

Sikachev explaining how some rendering challenges can be optimized with solutions like time-slicing

For another cross-platform AAA project, Virtuos has developed a full-featured cloth simulation on the GPU, which allowed it to achieve "at least 10 times improvement in speed over traditional solutions that you can find in other game engines, even when using advanced features such as continuous collision detection," according to Vaisse. "We plan to keep on improving our services and technologies with additional features such as layered cloth and cloth tearing."

Upgrade Your Rendering Capabilities

These solutions are part of a rendering upgrade service that Virtuos provides, which helps developers create better-looking and faster-running games by giving them the necessary expertise at the right time. Recommending and developing the most suitable rendering features, the studio's graphics engineers can tackle complex graphical challenges even before production begins. 

"Virtuos has supported several developers with their rendering needs—some of which we have discussed in talks such as at Develop:Brighton and Digital Dragons. We set up tech art pipelines, GPU and CPU optimizations, to large signature features, such as ocean and cloth simulation," said Sikachev. 

The studio has worked with both Unreal Engine and proprietary engines and can build a team that can overcome any rendering challenges.

Sikachev shared how Virtuos can support a variety of rendering needs

If you have similar rendering challenges, Sikachev also suggests checking out freely available information.

"The games industry stands on the shoulders of giants! Do not reinvent the wheel before conducting ample research; it is highly likely that someone tackled a similar problem before you. SIGGRAPH and GDC archives are a great starting point," he said. "But you will also need a qualified team of graphics programmers to implement a solution. And in case you do not have available resources in-house, do not hesitate to reach out to us."

To find out more about Virtuos' rendering upgrade service, contact the studio via email.

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more