37 Commits (c9a3d0430cd8ee167cc1919a3f27c72126bc746a)

Author SHA1 Message Date
Nico de Poel c9a3d0430c First implementation of dynamically updated lightmap textures. These are uploaded from the Quake engine to Unity on map load, and whenever a lightmap texture changes. 5 years ago
Nico de Poel a479d7246b Reworked coordinate and rotation conversion from Quake to Unity. It still feels weird, but entity models are now seemingly oriented correctly, and some strange edge cases with entities rotating in the wrong direction have been cleared up. 5 years ago
Nico de Poel c12ff0c503 Organize alias model textures into skins and animation frames 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 2e35a148b8 Use visual style reference to set up world and entity renderers and textures. With this we can clear out a LOT of debug code that was kept around for reference. 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 453664031c Moved creation of game objects for the world to GameState, which is where the bridge between Quake's game logic and Unity's game objects will happen. Also includes destruction of said game objects, so that the world is properly destroyed and recreated on map change. 5 years ago
Nico de Poel a886f3d993 First steps in reorganizing the project, so that assets and game state are managed separately from the interop modules. This will allow for a clearer picture of where gameplay-related interactions should take place, and how entities and such should be linked to their associated assets. 5 years ago
Nico de Poel 45bfa16950 Use emissive property on default material to simulate fullbright pixels, instead of adding a second unlit material 5 years ago
Nico de Poel 3de63008b7 Further cleaned up BrushModel code and moved creation of debug game objects into RenderModule, where the models can be linked to their textures now as well. The result: properly textured maps are being rendered! 5 years ago
Nico de Poel 331aa4bccc Some cleanup and organization: 5 years ago
Nico de Poel 15e3faa753 Added callback function to allow Quake to send the view parameters to Unity, and apply them to the main camera. This makes actual movement through the map in Unity possible. 5 years ago
Nico de Poel 11c3b2d826 Defined structs for BSP SubModels and Nodes, which will allow for a more systematic conversion to Unity meshes. Also moved more marshalling code into the data classes, which seems like a more natural place. 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 05731a8e09 Removed redundant division in QTriVertex conversion, and scaled up the rest of the test scene to match. Fixes scale of imported alias models when compared to the world brush model. 5 years ago
Nico de Poel 89f3600608 Reconstruct brush model data based on glpoly_t data generated by GLQuake. We can now successfully display BSP maps in Unity! 5 years ago
Nico de Poel 3988db5f8e Defined a bunch more data for brush models and initial marshaling of model data 5 years ago
Nico de Poel eaaac619b3 Change the Z-position of models in the test scene every time a RenderModule is instantiated, so that subsequent runs of Quake don't cause all of the uploaded models to overlap 5 years ago
Nico de Poel 4a7155bb1b Fixed marshaling of multi-dimensional arrays of QGLTextures, and add a second unlit material layer with additive blending for models that use fullbright textures 5 years ago
Nico de Poel 3da2d4ba59 Made a few tweaks to make texture uploading work properly in headless mode 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 96d2a1fe7b First setup to upload brush models (specifically: the world model) from Quake to Unity. Updated the QWorld class to include the fields added by QuakeSpasm. 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: 5 years ago
Nico de Poel 4d974bf6cd Solved the UV correcting problem for backside triangles by pre-processing the model input data, whereby vertices on the seam are duplicated and adjusted. The rest of the mesh conversion process then remains as it was. 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
Nico de Poel 61a845338e Further mesh conversion research: animation frames are now converted into blend shape animations, which can be played back either with or without smoothing. 5 years ago
Nico de Poel 834ff9a794 First test converting models from Quake into Unity meshes, including normals and UVs. It's still far from perfect (back side UVs are not handled at all yet) but it's a good demonstration of what will be possible. 5 years ago
Nico de Poel 754812d63e Split all of the callback modules' native interop boilerplate code off into separate partial class files, to keep the actual logic code clean and easy to read. 5 years ago
Nico de Poel e416868650 Modifications to make UniQuake work with a new engine DLL based on QuakeSpasm: 5 years ago
Nico de Poel 0f02005c58 Reimplemented uploading of alias model data, which now includes all vertex, triangle index and UV data 5 years ago
Nico de Poel 3b4382954a Some renaming and reorganization 5 years ago
Nico de Poel ec8951fa7c First test to upload model data (brush models and alias models) from Quake to Unity 5 years ago