godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Add function to camera / new node that allows one to do cropped rendering in pixel accurate . . . #2909

Open charlesmlamb opened 3 years ago

charlesmlamb commented 3 years ago

Describe the project you are working on

Have a big idea, for a Tomb Raider game, it's quite massive, so I want to make a shorter game, similar to 2.5D scrollers, but with sort of weird rendering, see below . . .

Describe the problem or limitation you are having in your project

I want to make a 2.5D side-scroller, bec. it means less work, 3D modelling, environment . . I sort of 'choke' on my big ideas, and want to make this first, to see how much work, it is . . . Here's problem . . I want the stage, to look like this . .

Skærmbillede (1912)

So, instead of looking like this, it looks like here . . .

Skærmbillede (1908)

Where planes have same angle, on both sides, I get this image, without rendering problems . . . .

Skærmbillede (1911)

To do that, I sort of need the camera, to be able to render at a higher resolution, and then send a ' cropped ' image, to the well game, or so . . .

Right now I can't find those settings under ' camera ', not sure . . Maybe one could make extra features under camera, to do this . . . So, one could type, render at 1920x1080p, then show only a 1280x720p area, well running the game . . . . I'd like to have pixel perfect sort-of, control, so it looks really good . . not sure if this is a shader problem, technically it's a problem, with the camera . . . Wanted to ask, if one could add to camera node, or make a CroppedCamera3D node, or something, so the result is pixel accurate, ie. the 1280x720p middle is, sent to the final game . . . Thx . . .

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Well, I want to make a smaller 2.5D game, to find out how much work it is, even making a game, at all . . And, make it simpler, sort of like Final Fight, Golden Axe, here . . . .

2021-06-23 1404

Right now I'm stuck, because it looks like a camera problem, but it might be a shader, I have no idea, etc . .

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Add a function to the camera3D, to show a cropped image, where one can type resolution, and position, x, y, or so . . Or, make a new camera node, that can do this, or maybe some expanded settings, under the normal camera . . Ideally, I want to be able to get the ' right ' pixels, and send them as a true 1280x720p image, to the run-time window, thx . . .

If this enhancement will not be used often, can it be worked around with a few lines of script?

I have got no idea, shaders are super - complex, also I think this is about the camera, not sure . . .

Is there a reason why this should be core and not an add-on in the asset library?

Well, don't really know, sorry . . . .

charlesmlamb commented 3 years ago

It's sort of, it's a bit weird in games, that the character can only see as far, as the image allows, was hoping to have more accurate vision, ie. player can see more in front, or so . . .

Skærmbillede (1912)

Might be a useful feature, be nice if under camera, was a menu, to render a cropped image, so . . .

One types original resolution, 1920x1080p . .

Then type cropped frame, so 1280x720p . .

And, types x, y displacement, in pixels, of the cropped image . . Maybe a new CroppedCamera3D, but not sure, it'd work for clipped camera, normal camera :OO . . that's where, I'm not sure . . .

So, one can send a pixel perfect cropped image, to the final game window, or so <3

ADD : Maybe it could be in viewport settings, in Project settings, some settings there . . Ideally, I'd like one camera with those settings, and another one, for cut-scenes, in the normal ' cropped ', ie. normal rendering . . . but, it might be a shader problem, have no idea what nodes to use, super - complex stuff . . . Thx . . .

Calinou commented 3 years ago

This kind of "cropped" rendering is already achievable with an add-on. Given how niche it is (and how poorly it would work with hiDPI displays), I don't think it should be a core feature.

charlesmlamb commented 3 years ago

Ok, wasn't sure it was a good idea or, possible . . Well, it might be niche, could look good in car - games, or so . . <3 Thx . .

I think it can be done with a shader but, don't know how to send the 'resulting' pixels, as full viewport . . . .