RenderingJadeEmpire

From xoreos Wiki
Revision as of 00:11, 24 November 2023 by Mirv (talk | contribs) (Created page with "In rendering Jade Empire, much of the data looks to be very similar to Neverwinter Nights, with some modest tweaks for things like grass patches, god rays, and the like. Much like with other games, rendering order is thankfully dictated by loading order from the model files themselves. There still exists transparency hints (render order hints) for the most part, but it seems there must be something else that influences render order. While almost everything renders corre...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In rendering Jade Empire, much of the data looks to be very similar to Neverwinter Nights, with some modest tweaks for things like grass patches, god rays, and the like. Much like with other games, rendering order is thankfully dictated by loading order from the model files themselves.

There still exists transparency hints (render order hints) for the most part, but it seems there must be something else that influences render order. While almost everything renders correctly with just those hints, the god rays in particular are causing quite a few problems. The assumption is that they're going to be rendered last (or very close to it) with possibly different blending to normal. Jade Empire has "self illumination" properties for model nodes, and I've noticed that all of those rays (and some water) have non-zero values for that.

Some of the additions for Jade Empire are a complete texture material definition. This includes two options relating to opacity, and two options relating to blending. Presumably these will be used in whatever shaders exist - which xoreos does not have access to. There's also a render path id, which might simply be an index into different shader rendering combinations; the game was in the early days of shaders and there isn't likely to be thousands of combinations available. Given different possible blending options, which might translate nicely enough to OpenGL blending parameters, there could be a need to tweak the rendering and material code to handle that better.

Lights

So far lights appear to be very similar to NWN, although the node specific data relating to lights is currently very sparse. Inspection of the model file format might need to pick up so that more of the format can be guessed at.

Grass

Jade Empire makes heavy usage of grass. This is likely procedural generation: the mesh information itself isn't store, but a texture mask could indicate where to "grow" grass on terrain.