Jump to content
The Dark Mod Forums

Ai Rendering Weirdness


ascottk

Recommended Posts

Well <_< I wanted to get the maya binary animations to use the AI models they were intended for which would be easier for future animators. The builder guard, the city watch, and the thief are pretty much done but there's a strange side effect:

ai_weirdness.jpg

 

The newly revised versions do not render when you look up towards them. I resynced the md5meshes to make sure it wasn't the meshes themselves. I have no idea why the revisions are doing this :huh: The fresh md5anims might be the cause although that wouldn't make sense.

 

The copies on cvs do not do this. There are some problems with some of the walking animations and I was fixing those along the way. The Hip joint is to blame because it rotates 360 degrees in the middle of the animation. If you didn't go frame by frame in maya you probably wouldn't catch it. That why some of the AI tend to walk in circles.

 

Well, it's past my bedtime, but I don't know if the maya 7 -> doom 3 importer is doing it or not or some of my conversions have gone awry.

Link to comment
Share on other sites

So the bodies normally render fine, but only disappear when viewed at a certain angle?

 

If so, I think it may have something to do with the object occlusion system that makes models automatically avoid being drawn if the engine doesn't think you could see them. From what I can tell, it sets a point or points on the model to use as a guide to determine if you'd be able to see the model or not, and if it those points don't show up on the screen then it doesn't draw the model.

 

This may have something to do with that. It's possible the system used for setting up those points didn't convert correctly somewhere along the line, if nothing else it may be possible to copy them from the original models that dont' have this issue. Chances are it's using the origin as the point of reference for this and looking up too far on the character causes it to think you wouldn't be able to see the model. A lot of games actually do this, if you ever notice models popping in and out at the edges of the screen it's almost always caused by that.

 

Although I'm not sure if Doom 3 uses the same system, this is a bit of a shot in the dark since I can't think of any other reason that would happen. But if someone knows what I'm talking about it might point us into the right direction for a solution.

Link to comment
Share on other sites

I would assume it has to do with bounds checking. D3 only renders a model if its screen bounds intersect with visible screen/portal space. What do the bounding boxes look like? Try checking with r_showViewEntities to see their bounding boxes. I think r_showInteractionScissors is intended to debug shadow culling, but it may also be applicable to whether or not an entity is rendered on screen.

 

I also agree with Solis that a poorly placed origin might have that effect.

Link to comment
Share on other sites

This is possibly the same thing that causes snow and rain to disappear when looking at certain angles - an apparent optimization that (incorrectly) determines an object's origin is sufficiently out of FOV and therefore stops drawing the object.

 

It's bad. If it's going to make weather change instantly and models to run around body-less, let's hope real hard there's a fix for it.

 

Edit: whoops missed the above post.

Link to comment
Share on other sites

This may have something to do with that. It's possible the system used for setting up those points didn't convert correctly somewhere along the line, if nothing else it may be possible to copy them from the original models that dont' have this issue. Chances are it's using the origin as the point of reference for this and looking up too far on the character causes it to think you wouldn't be able to see the model. A lot of games actually do this, if you ever notice models popping in and out at the edges of the screen it's almost always caused by that.

 

Although I'm not sure if Doom 3 uses the same system, this is a bit of a shot in the dark since I can't think of any other reason that would happen. But if someone knows what I'm talking about it might point us into the right direction for a solution.

I moved the origin slightly above the plane in the idle & walking animation of the thief but I get the same result.

 

I would assume it has to do with bounds checking. D3 only renders a model if its screen bounds intersect with visible screen/portal space. What do the bounding boxes look like? Try checking with r_showViewEntities to see their bounding boxes. I think r_showInteractionScissors is intended to debug shadow culling, but it may also be applicable to whether or not an entity is rendered on screen.

 

I also agree with Solis that a poorly placed origin might have that effect.

It's r_showViewEntitys with a 'y' btw. That and the r_showInteractionScissors didn't reveal anything suspicious.

 

I'll keep looking at it. It only happens when the AI body mesh is in the lower 20% of the screen.

Link to comment
Share on other sites

I would assume it has to do with bounds checking. D3 only renders a model if its screen bounds intersect with visible screen/portal space. What do the bounding boxes look like? Try checking with r_showViewEntities to see their bounding boxes. I think r_showInteractionScissors is intended to debug shadow culling, but it may also be applicable to whether or not an entity is rendered on screen.

Ahh, much better explaination than what I wrote, thanks.

 

Hmm, maybe check between the models on cvs and see if their bounding boxes look any different. I wonder if it uses anything else to try and determine whether the model is in the player's view range. Can you see the bounding box around the model as it disappears when you turn in a direction that makes them disappear?

 

I also wonder if there's a way to disable this entirely for specific models, the weather effects may require that since I wouldn't trust the occlusion system to always determine whether you're within range of an outdoor area or not.

Link to comment
Share on other sites

Hmm, maybe check between the models on cvs and see if their bounding boxes look any different. I wonder if it uses anything else to try and determine whether the model is in the player's view range. Can you see the bounding box around the model as it disappears when you turn in a direction that makes them disappear?
The bounding box is still visible. I have the player shadow enabled & it disappears as well.
Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • The Black Arrow

      Hey @nbohr1morehow come the zombies in The Dark Mod don't have a "resurrection" mechanic to it, similar to how Thief has it?
      They're quite a weak creature as of right now, it's merely a walking corpse that slashes you, making attacking them to kill them an actual strategy.
      Would be better if they had some cool mechanism to it that truly makes them a danger, such as the resurrection idea itself.
      · 2 replies
    • Ansome

      Query: when was the last time a zombie in a video game was unnerving or scary to you? I'm chipping away at my anniversary submission and I've been trying to gather opinions on the subject. I'm perfectly capable of lighting them well, changing their sfx, and creating effective ambience, but I'm worried that zombies at their core are just too overdone to be an effective payoff to the tension I'm creating.
      · 4 replies
    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
×
×
  • Create New...