Another busy week and this one might be not better.
There were couple of minor things related to room generation. I added temporary door generation, so at least there are some doors now visible. I also fixed, and I hope that it is final solution, pixel alignment, so objects inside room, room pieces and other elements are properly aligned now.
And final, probably post important thing, that was done last week is support for rendering masked objects. This is what I need to render objects going through doors (or that are on other side of door). Current solution is not optimized (but marked with TODO marker and description what should be done) and is quite simple. Render target is created that bases on graphics for door hole (source). All objects should be rendered then on that render target. Then alpha channel is copied from source (door hole) and finally result is rendered where hole should be rendered. Well, it will be so, as at the moment it was just tested without proper placement of objects and hole.
When I do rendering of door holes, I will add doors and I will focus on something that I hoped to avoid. To be honest I also thought at some point that I will be able to avoid this door hole rendering but even without doors I noticed that wizard sometimes is rendered on wall although it should go through hole. And second problem seemed also like something that most users won't notice but I know that it will look bad unless I do something. I thought that I will find some easy, maybe even hacky solution for rendering objects inside room. For normal objects there is no problem but when it comes to door wings it starts to get trickier. I decided to stick with simplest solution and use BSP (binary space partition) to properly render objects behind and in front door wings.
And one screenshot to show progress. I used grey background to test alpha blending (well, not blending, as now it is used just for masking) and it resulted in quite nice look. Of course door hole look strange like that as shadow seems to leak out from them. You may also notice that right door hole is not aligned to wall (it is rendered 1 pixel left to where it is supposed to be). I want to fix it, but if I don't, I think that nothing bad will happen, as proper graphics should not have such visible issues). How I would fix it? Add info about alignment, in this case, this camera angle, it should be 2 pixels and all doors should have locations aligned using this value. But for now, I will leave it, as it is.
I hope that during next update, I will show you not only door holes, but fully working doors - but maybe without proper ordering method.
There were couple of minor things related to room generation. I added temporary door generation, so at least there are some doors now visible. I also fixed, and I hope that it is final solution, pixel alignment, so objects inside room, room pieces and other elements are properly aligned now.
And final, probably post important thing, that was done last week is support for rendering masked objects. This is what I need to render objects going through doors (or that are on other side of door). Current solution is not optimized (but marked with TODO marker and description what should be done) and is quite simple. Render target is created that bases on graphics for door hole (source). All objects should be rendered then on that render target. Then alpha channel is copied from source (door hole) and finally result is rendered where hole should be rendered. Well, it will be so, as at the moment it was just tested without proper placement of objects and hole.
When I do rendering of door holes, I will add doors and I will focus on something that I hoped to avoid. To be honest I also thought at some point that I will be able to avoid this door hole rendering but even without doors I noticed that wizard sometimes is rendered on wall although it should go through hole. And second problem seemed also like something that most users won't notice but I know that it will look bad unless I do something. I thought that I will find some easy, maybe even hacky solution for rendering objects inside room. For normal objects there is no problem but when it comes to door wings it starts to get trickier. I decided to stick with simplest solution and use BSP (binary space partition) to properly render objects behind and in front door wings.
And one screenshot to show progress. I used grey background to test alpha blending (well, not blending, as now it is used just for masking) and it resulted in quite nice look. Of course door hole look strange like that as shadow seems to leak out from them. You may also notice that right door hole is not aligned to wall (it is rendered 1 pixel left to where it is supposed to be). I want to fix it, but if I don't, I think that nothing bad will happen, as proper graphics should not have such visible issues). How I would fix it? Add info about alignment, in this case, this camera angle, it should be 2 pixels and all doors should have locations aligned using this value. But for now, I will leave it, as it is.
I hope that during next update, I will show you not only door holes, but fully working doors - but maybe without proper ordering method.

No comments:
Post a Comment