Closed BielBdeLuna closed 8 years ago
I see that taking screen shots sometimes fails, and that the whole process has changed heavily (I guess in order to accommodate the new way of handling the window of the game (you can change the window and the game in real time changes the aspect ratio as well as the resolution)
tile rendering of renders far bigger than the window size doesn't work.
envshot uses makeScreenShot wich has changed to PNG's instead of Targa's, i might create a separate makescreenshot and all the functions that it calls just for the envshot functionality.
I might create a new "renderView_t" just for envshot (and derivatives that I'm thinking on creating at later stage, cubemaps for reflections and for ambient lights) at the dhewm3 stage envshot used the player "primary view" I'm looking forward to create a somewhat closer "secundary view" that doesn't follow the player and that stays in a specific point on the space (for those derivatives) and I wonder if the cubemap texture could be stored in ram or vram instead of the hard drive.
but this is far more difficult that whatever I've ever done.
I've got it, now takeScreenshot
has a new int exten
that you can specify "PNG" "TGA" "JPG" (a enum that I included in image.h) that way screen shot can write both PNGs (for screenshots) and TGAs (for envshots), I've restored the original TGA implementation while I've maintained the new PNG implementation.
that's all because takeScreenshot
is used in both an artistic way ( screenshots ) and in a technical way ( in order to get envshots ).
on the envshot side. it produces good results but the first one always come out wrong. So I'll try to hack it some more to get a better result.
as always you can check it out here: https://github.com/BielBdeLuna/RBDOOM-3-BFG/tree/envshot
guys do you know how can we rotate an image? i have the envshot working correctly, and I want to transform the "px" "ny" etc. images to "down" "forward" "left" etc. from skyboxes but it needs some rotations for most of the images and some flipping for all of them. do you know how to do it? for the pull request then I'll make also the inverse process, so we can have enviroment textures ( "p" and "n" textures) out of skybox textures ("up" "left" "back" etc. )
the thing is don't understand how does the buffer get rotated and flipped. do you guy know how?
I would look at these first: void R_HorizontalFlip( byte* data, int width, int height ) void R_VerticalFlip( byte* data, int width, int height ) void R_RotatePic( byte* data, int width )
done! check out here: https://github.com/BielBdeLuna/RBDOOM-3-BFG/tree/envshot
new functionality:
as well as infrastructure functions to support those new console commands
I've modified "take screenshot" so now it can take PNG and TGA (and if ever there is a JPG handler available, it should be possible to add a call to it quite easily)
possible future improvements:
I'm not going to work on those improvements, next step for me is skipable cinematics.
I've fount a bug if MotionBlur is On, the motion blur effect disturbs the process, it should be an easy fix, where is r_motionblur defined? how I get and set it's state?
I've restored "envshot" that creates a cubemap from your point of view. I've pasted the process from dhewm3 to bfg, and now I can create cubemaps. but the process had to be modified because the "view object" had changed due to the stereoscopy options that were added in BFG, and so the renders from envshot are not well scaled and proportioned.
you can check the process in my branch here: https://github.com/BielBdeLuna/RBDOOM-3-BFG/tree/envshot
what do you guys think?