RagnarokFileFormats icon indicating copy to clipboard operation
RagnarokFileFormats copied to clipboard

Research how 3D effects are rendered by the client

Open rdw-software opened this issue 5 years ago • 0 comments

Just dumping here my notes so I can delete them and have it archived for later:

Are they created as mesh objects, unwrapped, textured, and animated all in code?

That is about right. All effects (CRagEffect) simply configure instances of effect primitives (CEffectPrim), with the only exception of effects based on the STR format (what Gravity calls the "EZ effects" :D). Effect primitives are animated in code, and buffers for effect primitives are constructed on a per-frame basis. Making these effects is basically like working with a 3D canvas from the code, where everything is dumped in the renderer's queue. In many cases an effect primitive is something non-specific like a half sphere, where properties like radius and opacity is changed over time. There are also many primitives specific to individual skills. A skill can have multiple effects, which in turn can use multiple effect primitives and STR effects. For instance, Acolyte's Heal uses four different effects based on the amount healed.

A rough description of how the skills you picked out are implemented:

  • Magnum Break - Two expanding spheres and a 3D circle on the ground
  • Cold/Fire Bolt - The bolts are just textures moving towards the target, combined with an expanding 3D circle on target
  • Frost Diver/Grimtooth/Frost Nova - just multiple spikes growing in random directions, spawned one by one for the duration of the skill
  • Safety Wall/Heal - 3D cylinder changing height with the texture fading out in the top, plus some floating particles here and there
  • Cart Revolution - Combination of STR effect, an expanding 3D sphere and an expanding 3D circle

Attack skills will often have one part for the skill itself, and one for when the target is hit. Damage effect is also varied, often based on the element of the attack. Most skills will additionally have a special effect on the player, like the glowing cylinder around the magician when a spell begins. There are lots of different ones. Skills using only a simple STR are relatively uncommon.

rdw-software avatar Nov 29 '20 03:11 rdw-software