RosaryMala / armok-vision

A 3d realtime visualizer for Dwarf Fortress
MIT License
320 stars 27 forks source link

Some Z-layers are never rendered in FPS mode. #59

Open alexchandel opened 6 years ago

alexchandel commented 6 years ago

When switching to FPS mode on a certain layer, then moving up or down a layer, some Z-layers are never rendered. Notice here, multiple tree layers aren't shown:

screen shot 2017-11-04 at 2 00 15 pm
RosaryMala commented 6 years ago

There are a number of possible causes. Most likely is just the fact that updating the meshes is currently a lot slower than it could be, in which case waiting for those layers to get generated should work.

Otherwise if there's an error in the meshing, I would need to look into that.

alexchandel commented 6 years ago

It's always a few Z layers above (and maybe below) where you spawn in FPS mode. And layers above the missing Z layers always spawn (notice the tops of the trees in that pictures).

Do you regenerate the entire mesh whenever the god-mode camera is moved up or down, or just hide certain layers? Is the mesh deleted & regenerated when the camera moves around in FPS mode? That could account for the lag.

RosaryMala commented 6 years ago

Is this problem still there in 0.18.0?

I made changes to the visibility there, which should have fixed this.

alexchandel commented 6 years ago

Yes, it just happened to me about a week ago in 0.18.0. I'm waiting to test a build that includes the new update timers, to see if it's due to extremely slow mesh updating.

alexchandel commented 6 years ago

I may have found the problem. Does AV always render based on where the FPS camera is in FPS mode?

I can't always replicate it, but after cutting my "Draw Range Side" down to 2, I'm sometimes able to reach the edge. Upon returning to god mode, the god mode camera hadn't moved. I don't think it's due to mesh generation lag either, because AV never rose above 35% CPU during that time (though inputs still lag).

alexchandel commented 6 years ago

After more testing, this seems to happen after the god mode camera has moved, when following the DF screen.

Update: This is absolutely the cause. When in FPS mode after doing this, moving the main DF screen causes what's rendered to change; if I approach the rendering edge in FPS mode, then move the main DF screen, the ground below me disappears and I fall to -infinity.