Jump to content

How to instance .m2 model?

By FiftyTifty
in Level Design

Recommended Posts

After digging through the renderer, I found that there are areas that issue a huge number of draw calls when the server's distance is maxed. Icecrown in particular is a bad offender, with there being over 8,000 draw calls issued at certain vantage points.

Now, the grass uses instancing, so I'm wondering; is it possible to have other .m2 models use instancing? In Icecrown, it's filled with a hundreds of the same skeleton mob wandering around, a prime candidate for instancing. How would I go about making them instanced?

Link to comment
Share on other sites

The client does automatically do some batching for static models. Detail doodads is a special and hardcoded thing. Without modifying the client itself a lot, adding more batching won’t be possible, it surely is nothing a designer could toggle.

Link to comment
Share on other sites

11 minutes ago, wungasaurus said:

The client does automatically do some batching for static models. Detail doodads is a special and hardcoded thing. Without modifying the client itself a lot, adding more batching won’t be possible, it surely is nothing a designer could toggle.

Batching's different; that's when the 3D data of multiple models is combined at runtime. Instancing is where the same object is drawn once, and then the GPU just redraws that same object wherever there are other objects with the same 3D data, rather than issuing another draw call. I'm certain that the grass uses instancing, as increasing the density barely adds to the draw call count.

If there's no way to trigger instancing, are there other ways to reduce the number of draw calls for a large number of actors with the same model and texture? I imagine that creating proper WMO's with texture atlases is a way of reducing the total draw call count, but man, it would be great for Ice Crown to have decent framerates with the draw distance maxed.

Link to comment
Share on other sites

×
×
  • Create New...