Jump to content
The Dark Mod Forums

Arcturus

Development Role
  • Posts

    2168
  • Joined

  • Last visited

  • Days Won

    107

Everything posted by Arcturus

  1. I just remembered that you can make a material that's part metallic, part non-metallic using image mask: But you can't mix reflective and and non-reflective with this method. Cubemap is always applied to the whole material. But in a case like those teapots, the horn could be made non-metallic (albeit still shiny). All using just one material.
  2. Here's a version of the "banking" script in a separate file. These go into the tdm_ai_base.script: In the tdm_main.script: In the tdm_ai_humanoid.def This way it will only apply to humanoids, and mappers will be able to disable it or change strength for individual NPCs by overwriting those values in Darkradiant. The rest goes to tdm_ai_banking_humanoid.script tdm_main.script tdm_ai_humanoid.def tdm_ai_base.script tdm_ai_banking_humanoid.script
  3. @SeriousToni It's perhaps explained somewhere in id tech's code.
  4. The horse pathfinding bug is indeed fixed. But the bug where walk cycle animations reset at every turn remains: I uploaded map/turn.map to repository. Apart from twitching, you can see that at 300 FPS they also stop more often and play idle animations.
  5. Horse has a different orientation of joints. It has x axis forward but NPCs in Darkmod have y forward. Different software have different conventions. I re-exported the mesh, af.md5anim and walk_01.md5anim with y forward and x up orientations on head bone: Vision cone is tied to it. So I wonder if there's a way to correct cone's rotation independently from the head bone. Herbivores have close to 360 field of view, btw. Realistically there probably should be two cones. Anyway, that doesn't change the erroneous behavior at 300 FPS. In 2018 I also changed "tun_rate" from 150 to 41. Looks good for walking horse, and matches the turning animations, but it's too slow for running one. So when galloping, horses bump into walls and lose track of path nodes. Changing it back to 150 will fix that, but that's unrelated to super high frame rate bug.
  6. Bug happens at any frame rate higher than 60. But it's more pronounced the higher it is. I just checked and in test/horse.map, the horse loses track at 240 FPS.
  7. Seems to work: I have only 60hz monitor, so I can't really see those FPS above 60. Animations play in a loop and turning can happen at any point during that cycle, but the speed never changes. Origin bone moves at a constant rate forward. Tilting is modified by speed already, so walking animation has lower tilt and running has bigger. It's also proportional to the turning arc. What I've been thinking is to try to lower walking / running speed on turns. "anim_rate_run" is set to "0.8" in tdm_ai_humanoid.def which means that running animations are already slowed down. That would however further complicate the code, if it's even possible to do.
  8. I used "clean weights" before exporting, but there must've been some left. I used slightly higher limit this time - 0.01 This removes low weights. There were probably some vertices in the legs assigned to something they shouldn't have (?). I don't know what exactly this box does, but it's probably better to fix it. LOD models will need to be cleaned too.
  9. I'm trying to figure out what is this bounding box. It's purple when you type r_showskel 1 And yellow when r_showViewEntitys 1 "r_showViewEntitys 1" is unstable and will eventually crash the game. I can't figure out why it's so different on old man's model. It can't be animation cause those are shared. Old man inherits tdm_ai_proguard definitions. City watch's box changes as I walk away, probably due to LOD. I don't know what in the mesh file could cause this. There aren't any hidden triangles that could cause the bounding box to expand like that. I imported and re-exported other models with Blender and those were ok, so exporter seems to work fine. At least I know it's not the pants. EDIT: Narrowed it down to the legs part.
  10. I animated spine in the other direction. What I mean is that the head bone needs to be animated too, in order to compensate for the body tilt. tdm_ai_base.script
  11. The bug is more than cosmetic. It affects pathfinding. I noticed in test/horse.map that a horse can't find path nodes with those settings. Turning v-sync on, or lowering FPS fixes it:
  12. Gemini managed to come up with a solution that's frame rate independent. However, I discovered a bug in Darkmod (unless it's a known issue). With vertical sync off, uncap FPS on and high max FPS values (around 100 and above), the character animations get restarted (walking, running) when AI makes a turn. It looks bad and causes NPCs to stop a lot, too: Beyond that, some additional checks were added, whether AI is dormant and for speed. It's possible to limit which AIs use this script by adding "can_bank" "1" argument in the def files. It would be better to make separate script files for different types of creatures. A horse especially could use a custom one. Those are just visual changes. They don't affect the behavior of AI. Right now NPCs don't slow down at all when they make a turn, which makes them look like trains on tracks. Click on images to watch the videos:
  13. The robots may be real, but that video above is fictional.
  14. That particular video is just pretty good visual effects. But not that far from reality any more.
  15. There's a run animation called run_jog that lays unused. I think it could be used in nobles or the old man. Made some small fixes: I did both run animations before I had a proper rig in Blender. They are based on mocap files from Carnegie Mellon University. It was pure forward kinematics and pure nightmare. So they are a bit messy.
  16. I don't think we need to use spine. Rotation on the origin bone plus slight arms and head rotation is enough. Added a clamp on arms rotation. Attenuation is slightly faster. They return to straight pose a bit quicker. Should I make it stronger during walking? I guess because of the speed multiplier, they no longer sway while rotating in place, which I guess is ok. tdm_ai_base.script
  17. Here's another special animation, this time from Thief: Deadly Shadows. NPC being startled by an arrow:
  18. @Taffingtaffer Thanks. There's still room for tweaking. I have some ideas for other uses of this method. I wonder how far can we push scripting.
  19. If there was a body in first person perhaps you could see that your arm is sticking out. Right now it's a little confusing, even if not game-breaking. Are you sure that that's what's happening here? There's this weird thing about NPC eye bones. In the skeleton and in animations they are were you would expect them: But in game they are hovering two meters in front of the character. I don't know where this comes from, maybe it's hard-coded. It means that even if we had proper eyeballs we wouldn't be able to use eye animations right now. Why was this done? Is this just cosmetic? Some kind of makeshift vision cone? Or does it serve a purpose? Yes, they should be saying something like 'who are you?' or 'what are you doing here?'
  20. Here's more subtle version. Added slight arm movement outwards. Also added speed modifier, so the faster the NPC moves forward the stronger the tilt: Example of the speed modifier's effect: They will never be fully realistic, but at least we can make them less stiff.
  21. @wesp5 Read the title of the video. And no, it doesn't look better.
×
×
  • Create New...