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
a8defed5de
Allow game and viewmodel layers to be specified at the level of each UniQuake instance. This will allow multiple instances of the game to run side-by-side with each their own rendering layers.
5 years ago
Nico de Poel
4adc71eca8
Added layer masks to separate game and view model, and added a secondary overlay camera to render the view model separately after the main pass. Fixes gun view model clipping into walls.
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
c9271a7772
Cache brush surface texture numbers instead of re-marshaling them on each access. Fixes textures getting mixed up on brush model entities after map switch.
5 years ago
Nico de Poel
3c2ca26a99
Properly destroy brush model child game objects when clearing an entity's model. Fixes explosive barrels not disappearing when blown up.
5 years ago
Nico de Poel
fab7f6503f
Allow entity skin number to be passed and apply the corresponding textures to the entity material
5 years ago
Nico de Poel
c12ff0c503
Organize alias model textures into skins and animation frames
5 years ago
Nico de Poel
0073dddfb1
Enable _EMISSION keyword on materials included in the standard visual style. Fixes fullbright emissive textures not appearing correctly in standalone builds.
5 years ago
Nico de Poel
67980400ef
Apply full bright textures to brush models. This is really starting to look a lot like Quake now!
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
e4903ca391
Made a start on scriptable visual styles, which encompasses material templates, mesh renderer configuration and texture assignment. The default implementation is based on the GLQuake look, but everything can be overridden to create completely new visual styles.
5 years ago
Nico de Poel
a52b497ccb
Reworked entity renderer assignment: both MeshRenderer and SkinnedMeshRenderer are created at the same time on init, and are enabled/disabled on demand.
Also: destroy overridden textures, and disable lerping on alias model animator by default.
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
0dc5c1a14b
Create world submodel game objects and link them to entities, allowing doors and buttons and such to work properly. Also don't bother linking the view entity to a model.
5 years ago
Nico de Poel
9345b0d15c
Allow GameModule to directly access entities. Removes some pointless indirection and boilerplate code in GameState.
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
1a1c219bf6
Removed frame number stuff from SetEntityModel since it's not producing the correct values. Correctly detect non-world brush models and sprites, although they're not implemented yet.
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
2c6f5bed1c
Destroy game assets when the game is shut down. We can still inspect assets in-editor by using the Pause function.
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
f944b7d4ff
Moved some files around
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:
- Removed a bunch of dead testing code
- Provide a camera to the UniQuake script which the render module can then manipulate
- Removed unused fields from QModel, which also fixes yet another text decoding issue in Zerstörer (the ö appears in the map's entity data)
- Shut down Quake engine OnApplicationQuit, which allows clean shutdown using the Play button in the Unity editor
- Use QTexture pointer as key for grouping surfaces, which removes the need for a bunch of redundant data marshaling
- Added disposal function for brush models
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
ebfce9863b
Allow additional arguments to be passed from debug UI, giving me a few more testing options
5 years ago
Nico de Poel
32897138b5
Build a single giant mesh for every texture-lightmap group of surfaces. Greatly improves rendering performance.
5 years ago
Nico de Poel
5598ceeeed
Group surfaces based on texture and lightmap, while keeping them grouped inside each brush submodel
5 years ago
Nico de Poel
8fcbac51a4
Fixed some minor issues related to Unity update
5 years ago
Nico de Poel
e753e1cc34
Recreate the BSP tree structure through a GameObject hierarchy. This gives a bit more insight into the structure of the map data.
5 years ago
Nico de Poel
a615495c25
Recursively traverse the BSP tree and create surface meshes per node
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
9ce90431f4
Reapplied model origin offset, which now actually makes sense
5 years ago
Nico de Poel
403e7d0eb4
Added struct definitions and marshaling code to obtain texture numbers for brush model surfaces
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
9dc4eb17d0
Added URP Unlit shader to shader variants collection
5 years ago
Nico de Poel
02a8e6b844
Fixed non-smoothed animations not actually landing on the key frames
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
e8e04b666d
Allow run-time switching between lerped animations and keyframe-only animation, and made the playback speed configurable
5 years ago
Nico de Poel
3da2d4ba59
Made a few tweaks to make texture uploading work properly in headless mode
5 years ago