-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wind Waker: Add black bars to top and bottom during demos #736
Conversation
I'm not sure I want this. The original letterboxing effect was there to frame things in a more 16:9 ratio. We already allow users to resize the window to see the same cutscene in different aspect ratios, meaning that we're already not going to get the original viewing proportions correct. So I don't see a major reason to add the letterboxing effect, and I think it goes against the goals of noclip as being a way to "step outside" the game. |
Aww, I was afraid you'd say that, but I really like it. When you pause (which allows you to move the camera), they animate it away and it makes it clear that you're stepping outside the game. But when it's playing it does make it seem more cinematic. But of course I really don't want to mess with your vision for noclip. If this doesn't fit with that vision, then I'll leave it out. |
I could be convinced otherwise, but I'd need to spend some time with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also make sure to replace the clear color from TransparentBlack to OpaqueBlack in Main.ts to ensure that the black bars work correctly, since you're now relying on that.
|
||
public execute(globals: dGlobals, viewerInput: Viewer.ViewerRenderInput) { | ||
// Near/far planes are decided by the stage data. | ||
const stag = globals.dStage_dt.stag; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of splitting dCamera_c out to a separate class, but I believe we should replace globals.camera
with it. Search for setupFromCamera to see other examples of how I do this elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! It turned out to be a bit messier than the other users of setFromCamera because there are several places in src/Common/ and src/gx/ that use viewerInput.camera
directly. To work around this without doing some bigger refactoring, I made dCamera_c
extend Camera
.
I think we'd be better off if Camera wasn't used anywhere in src/Common, and we just passed in matrices, frustums, etc or abstracted whatever is using those up to a higher level. But take a look through this and let me know what you think . And feel free to either make changes directly in the branch too.
What do you think about adding a "Demo Options" UI element? We could add letterboxing as a toggle and stick some play speed / scrubbing controls in there too (after looking through Studio, I think it'd be tough to integrate the scrubbing UI) |
I've added `viewerCamera: Camera` as a member of `dCamera_c`, so all the old logic that required a Camera just passes through to that. It makes it very clear which places will require logic changes once everything is just using dCamera_c
No logic changes.
I didn't want to extend noclip's Camera, but there are too many places in common code (gx, J3DGraph, etc) that rely on the `Camera` class.
…erInput.camera Avoid gx.ts' `fillSceneParamsDataOnTemplate` uses viewerInput.camera.projectionMatrix. I decided not to modify it or use a default parameter since it is already used by so many other files.
These bars disappear when the demo is paused or when viewing a normal scene. They animate in and out using the same logic as the game.
More interestingly, I had to add a few camera-related member variables, which made it seem like time to create
dCamera_c
. For simplicity I left it inMain.ts
. I also implemented the scissoring as simply as I could, which is a bit hacky. We could introducedDlst_window_c
which would get set on each draw list. ThendCamera_c
would just modify the window during its update. Thoughts?