Nico de Poel
c5cefca10d
Minor fixes for compatibility issues with QRally:
- Handle null frame names when matching with animation regex
- Default to skin 0 when the provided skin number is out of range
- Convert polygon vertices directly to Unity coordinate positions
5 years ago
Nico de Poel
fdaee3321f
Start on organization of textures into texture sets, and implemented a basic test for alias model entities, which are now properly textured including fullbright (emissive) textures.
5 years ago
Nico de Poel
a2b8d32c00
Implemented automatic animating of group frame alias models, using the existing AliasModelAnimator component.
5 years ago
Nico de Poel
5390483b0b
Upload non-world brush models and allow them to be assigned to entities. It's not terribly pretty but it (mostly) works. There still seems to be an issue with texture assignment on subsequent map loads.
5 years ago
Nico de Poel
883bc26026
Keep mesh data for alias models in CPU RAM (i.e. read/write) because apparently that's necessary to make them visible on skinned mesh renderers in standalone builds.
5 years ago
Nico de Poel
c14faf2666
Dynamically create either MeshRenderer/MeshFilter or SkinnedMeshRenderer based on whether the model being assigned is animated or not. Gets rid of warnings on un-animated SkinnedMeshRenderers, and removes unnecessary components on brush model entities.
5 years ago
Nico de Poel
66c62001d0
Squashed a bunch of bugs in the alias model animation system and integrated transform/animation updates into the alias model lerping system. Entities are now correctly animated, yay!
5 years ago
Nico de Poel
e6fd7b83ae
First bits of entity logic: assign alias models, update transform and animation, remove entity. Still lots of problems to solve, but it's starting to do something.
5 years ago
Nico de Poel
f944b7d4ff
Moved some files around
5 years ago
Nico de Poel
211c64a879
"Fixed" coordinate conversion from Quake to Unity, by swizzling Y and Z coordinates during vector conversion. There seems to be a lot of confusion and disagreement about Quake's coordinate system, but this setup is simple and looks correct both in-game and in-editor, and the world isn't mirrored anymore either.
5 years ago
Nico de Poel
9ce90431f4
Reapplied model origin offset, which now actually makes sense
5 years ago
Nico de Poel
e70d363998
Implemented uploading of skin texture data to Unity, and linking loaded alias models to their primary skin texture
5 years ago
Nico de Poel
10e54f10ca
Added a separate code path for converting frame group animations, and renamed some variables to use the correct frame/pose terminology
5 years ago
Nico de Poel
428eebb941
Pass along alias frame type and correctly count the total number of poses in a model, so that the correct number of pose vertices are marshaled and we can identify models that use group frame animations instead of typical single frames. Quake's model formats are weird.
5 years ago
Nico de Poel
dec2be66c6
Keep track of already duplicated vertices and reuse those for triangles that need them. Fixes vertex counts being way too high because seam vertices would get duplicated multiple times.
5 years ago
Nico de Poel
a19d9b546e
Added disposal code for alias models
5 years ago
Nico de Poel
08c16f71a1
Moved importing and conversion of mesh data into AliasModel class. Also:
- Do not create blend shapes if a model does not have any animations
- Handle cases when mesh does not have any blend shapes
5 years ago
Nico de Poel
e8a3313d88
Some cleanup
5 years ago
Nico de Poel
4138290723
Further mesh research: create an individual mesh for each animation sequence, with a single blend shape animation per mesh. Added an AliasModel class to manage meshes and find the correct animations. With this we can smoothly animate looped animation cycles.
5 years ago