DanW58 Posted February 6, 2021 Report Share Posted February 6, 2021 (edited) gameboy, try the mesh attached. Backup binaries/data/mods/public/art/meshes/structural/ptol_civic_centre.dae then put my modified mesh in the same folder, see if that fixes the problem. I found no duplicate polygon; all I did was increase the depth of the terrace floors. EDIT: Nevermind; the building became invisible, except for statues floating in the air... Probably some export setting in Blender that I don't know about. EDIT2: There are overlapping polygons in the mesh, elsewhere, there's a bunch of square windows that are co-planar with the walls without there being square holes on the walls for them; just overlapping. The UV unwrap is all overlapping islands; there'd be no way to bake an AO on this thing, not sure if you guys ever plan to have ao textures... They can do magic for the lighting, but you'd need non-overlapping UV unwraps to bake them. ptol_civic_centre.dae Edited February 6, 2021 by DanW58 1 Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted February 6, 2021 Report Share Posted February 6, 2021 @DanW58 several of the structures do have AO maps just not all ATM as you said some of the UV maps need some TLC before baking. Enjoy the Choice Quote Link to comment Share on other sites More sharing options...
gameboy Posted February 6, 2021 Author Report Share Posted February 6, 2021 @DanW58 I tested the graphic file you provided, and the result is as follows: 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 6, 2021 Report Share Posted February 6, 2021 6 hours ago, DanW58 said: EDIT2: There are overlapping polygons in the mesh, elsewhere, there's a bunch of square windows that are co-planar with the walls without there being square holes on the walls for them; just overlapping. The UV unwrap is all overlapping islands; there'd be no way to bake an AO on this thing, not sure if you guys ever plan to have ao textures... They can do magic for the lighting, but you'd need non-overlapping UV unwraps to bake them. AO Maps are baked using a second UVMap. We use texture Atlases to reduce the number of textures loaded for a single civilisation. 6 hours ago, DanW58 said: Probably some export setting in Blender that I don't know about. Maybe you forgot to tick "Import Units" 7 hours ago, DanW58 said: there's a bunch of square windows that are co-planar with the walls without there being square holes on the walls for them; just overlapping. T That's to save polygons. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted February 6, 2021 Report Share Posted February 6, 2021 Same thing happens with this Noba granary. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 6, 2021 Report Share Posted February 6, 2021 (edited) I didn't touch the Noba granary. Where is this "load units" thing? NM, found it! Alright, here it is, attached. The flickering is still on, but less; at least the shadows don't disappear altogether. I think this proves it's a precision problem; perhaps a depth rounding error; might be solved with a bit of bias tweaking; but I could be wrong. 2 hours ago, Stan` said: AO Maps are baked using a second UVMap. We use texture Atlases to reduce the number of textures loaded for a single civilisation. ..... That's to save polygons. That's actually a pretty good idea, to separate texture from AO. Not a bad idea at all! R.e. polygons, they are grossly overrated. We're not in the days of software rendering anymore. What is REALLY the killer of GPU's, old and new, is overdraw. Painting or trying to paint the same pixel multiple times, letting the z-buffer to decide whether or not. That's the big killer. I could double the polygons on this civ center and have it render faster simply by getting rid of all the invisible surfaces inside the building. Fun hedge trimming work. ptol_civic_centre.dae Edited February 6, 2021 by DanW58 Quote Link to comment Share on other sites More sharing options...
gameboy Posted February 6, 2021 Author Report Share Posted February 6, 2021 We need to wait for his @vladislavbelovpatch, we need his fix patch. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 6, 2021 Report Share Posted February 6, 2021 (edited) There's probably not going to be a patch, gameboy. We'd need to know what the problem is before we try to fix it. That's what I'm trying to find out; just working on a theory for now. And there's little incentive to patch a problem with a piece of code that's going away anyways; there's a new shadows implementation coming soon. Just try this civic center I just attached to my previous post. It works ingame for me now. Consider it THE patch. Edited February 6, 2021 by DanW58 Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted February 6, 2021 Report Share Posted February 6, 2021 10 minutes ago, DanW58 said: What is REALLY the killer of GPU's, old and new, is overdraw. Painting or trying to paint the same pixel multiple times, letting the z-buffer to decide whether or not. Overdraw is important. Though modern cards have things like early-z which reduces cost of opaque objects. Anyway our current problem is that we're CPU bound on most platforms (beside some potato GPU). 2 minutes ago, gameboy said: We need to wait for his @vladislavbelovpatch, we need his fix patch. Planned for A25. 1 Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 6, 2021 Report Share Posted February 6, 2021 (edited) Quote We already have a some kind of solution for that. It's not the production ready, but it works. I plan it for A25. There's a new solution in the works; I would not expect a patch if I were you. Ok, he just told you. 2 minutes ago, vladislavbelov said: Overdraw is important. Though modern cards have things like early-z which reduces cost of opaque objects. Anyway our current problem is that we're CPU bound on most platforms (beside some potato GPU). Ahhh, gottcha. Is that due to using fixed point? Edited February 6, 2021 by DanW58 Quote Link to comment Share on other sites More sharing options...
gameboy Posted February 6, 2021 Author Report Share Posted February 6, 2021 (edited) Oh my God, that's the most amazing answer I've ever heard. @vladislavbelov Can you offer a temporary solution to the problem I have raised? Edited February 6, 2021 by gameboy Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted February 6, 2021 Report Share Posted February 6, 2021 1 hour ago, DanW58 said: Ahhh, gottcha. Is that due to using fixed point? No, because of a lot of OpenGL function calls (including draw calls). Quote Link to comment Share on other sites More sharing options...
gameboy Posted February 7, 2021 Author Report Share Posted February 7, 2021 @DanW58 Okay, I tested the improved graphics file you provided again, but I saw that the shadow became like this, and the shadow on the roof was strange. 1 Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 7, 2021 Report Share Posted February 7, 2021 That's strange! I never saw anything like it. Light is leaking under... Hmmm... Let me look into this. Gameboy, I've looked at it, and nothing indicates to me this should be happening. And in my computer it does not happen. The floor in those roofs is not attached to the walls; i mean not welded; but the edge of the wall and the edge of the floor coincide seamlessly. Now, I do remember, many years ago, decades ago, there were graphics cards that exhibited such a light leakage problem say under walls that sat on a floor plane but did not connect to the floor, with certain shadowing algorithms. I'm tempted to just weld the terrace floors to the walls, but I fear this would break the existing UV-mapping of the model. I'm going to have to let someone with a better idea what may be going on weight in. EDIT: Another thing I notice is that Blender somehow triangulated all the quads on this model for me without even asking. I imported and exported a lot of .obj and .stl with Blender, but this is my first time touching Collada things; it may be some setting... I have good news. I was able to reproduce the problem in my computer. This is only a matter of time now... 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 7, 2021 Report Share Posted February 7, 2021 All models are triangulated prior to getting into the game. I believe they need to for PMD / PSA conversions. https://trac.wildfiregames.com/wiki/PMD_File_Format https://trac.wildfiregames.com/wiki/PSA_File_Format Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 7, 2021 Report Share Posted February 7, 2021 (edited) Yes, that may be true at run-time; but if I load the model I just saved and it's all triangulated it is impossible to work with; and Blender does a terrible job of converting triangles to quads; whoever coded that should get life in prison. Anyways, I found the culprit: A stupid flag for triangulate on export, hidden in a second tab in the Collada exports options, absurdly defaults to checked ON. Another candidate for life in prison... Yeah, about the problem, I remember dealing with something similar, a very long time ago. I tried adding a thin outer trim to the terrace floor, but it made no difference. Now I'm trying a brute force approach, adding a hidden light-blocking frame. Of course, doing so is not ideal, as it causes the very problem I was talking about regarding graphics performance: overdraw... Which is a misnomer; should be called "over-visit", as the problem is revisiting the same fragment, whether it results in something drawn or not, z-buffer notwithstanding. Edited February 7, 2021 by DanW58 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 7, 2021 Report Share Posted February 7, 2021 44 minutes ago, DanW58 said: Yes, that may be true at run-time; but if I load the model I just saved and it's all triangulated it is impossible to work with; and Blender does a terrible job of converting triangles to quads; whoever coded that should get life in prison. Anyways, I found the culprit: A stupid flag for triangulate on export, hidden in a second tab in the Collada exports options, absurdly defaults to checked ON. Another candidate for life in prison... I find ALT+J to work pretty good. Sure it sometimes need adjustments but it work well enough. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 7, 2021 Report Share Posted February 7, 2021 The problem is that the moment it makes ONE bad choice of triangles to merge, from then on it propagates the badness. I frankly don't understand how the coder could be so dumb. If you had a cloud of triangles on a shapeless surface I would understand; but in a model that is aligned with the axes, it should be obvious which triangles to merge. Life in prison is not enough. Regarding the problem; brute force doesn't work. I placed a chunky sun shield inside the wall of the building around the top terrace, see pic, and it makes no difference whatsoever; light gets through anyways. Looks like we'll have to wait for release 25 and hope it fixes it. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 7, 2021 Report Share Posted February 7, 2021 FIXED!!!! Well, it's a dishonorable fix; I just slanted the walls inwards to hide the part of the floor that gets leaked light. But I also fixed other problems with the model. There were many spurious edges tagged "sharp" around the columns, for example. I did a general clean-up of missing or unwarranted sharp edges. ptol_civic_centre.dae Quote Link to comment Share on other sites More sharing options...
Stan` Posted February 7, 2021 Report Share Posted February 7, 2021 Interesting fix. Thanks for looking into it. I don't particularly like it because it doesn't fit the style of other buildings with such roofs but it might help us understand the problem and avoid it in the future. Can you elaborate on what edges you changed ? I suppose I should look into improving this model to a more greek style in a future lifetime as suggested in some other thread. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 7, 2021 Report Share Posted February 7, 2021 I don't like it either. It would be preferable to just pile on 50 kilo coffee bean bags along the walls... Did Greeks drink coffee? Close to Rome... Anyways, the edges that were spuriously sharp were mostly around the columns. I highlighted some edges yellow to give you a general idea; I don't remember which edges were sharp and which weren't. In Blender you have to be careful with selection by angle. It only works 95% of the time... Quote Link to comment Share on other sites More sharing options...
gameboy Posted February 8, 2021 Author Report Share Posted February 8, 2021 (edited) @DanW58 The direction of the shadows on the balcony is interesting. The shadow direction on the balcony top seems wrong, it should be behind, refer to the shadow direction of those women workers. Edited February 8, 2021 by gameboy Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 8, 2021 Report Share Posted February 8, 2021 It's totally correct. There's no balcony; it's a terrace. The inside is lower than the periphery. I think you're looking at it the wrong way. Try it in-game you'll see. Quote Link to comment Share on other sites More sharing options...
gameboy Posted February 8, 2021 Author Report Share Posted February 8, 2021 @DanW58 I tested your latest graphics file and I found a shadow problem. When I rotated the camera, I found the shadow on the doorpost flickered. Quote Link to comment Share on other sites More sharing options...
DanW58 Posted February 8, 2021 Report Share Posted February 8, 2021 (edited) Okay, I don't see the flicker from the images, but I believe you. EDIT: Ah, I see it now; the shadow behind the column. Frankly, if there was a proper ao in this building, the wall behind the column should be dark enough from the ao you probably would not notice the direct light shadow missing... However, the problem is not the building itself; it is something about the shadow algorithm and/or the precision of the hardware; and there's a new algorithm coming soon, so there's not much to gain fixing the current one; --much less from changing the buildings. Have you played with the settings of the shadow quality? The more bits of depth the better, as long as your hardware can handle it. I see that your images are high rez, which suggests you have better hardware than mine. In the Menu, Settings, there's shadow quality options going from Very Low to Very High, and whether to have filtering or not. Try playing with those and see if the problem goes away. Edited February 8, 2021 by DanW58 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.