Source Filmmaker

Source Filmmaker

Samson Nov 11, 2018 @ 1:21pm
aligning a camera's frustum to an area on a surface
Hi. So here's what I'm trying to do: I want to play a clip and at the end of it have the camera pull back, revealing that it was playing on a tv screen.

In my video editing program, I'm currently playing through the clip and then at its last frame I cut to my SFM footage where the tv model's screen has an image of the last frame of the clip on it. Basically, I'm trying to make that transition from the clip to the sfm footage as smooth as possible. I tried to align the camera's frustum so that it shows only the screen of the tv, but this is incredibly hard to do by hand. I can't get it to align perfectly.

Note: the aspect ratio of the tv screen is the same as that of the camera.
< >
Showing 1-8 of 8 comments
Marco Skoll Nov 11, 2018 @ 1:31pm 
I'm not even sure it's possible to get this perfect, as it may be that SFM's rectilinear rendering will distort the proportions. (My gut instinct is that it might work, but I'm not sure).

In any case, the best method for lining it up is at least partially going to depend on what your "TV" is.

There is always option B though, of not faking it at all and actually having the video playing in SFM...
https://steamcommunity.com/sharedfiles/filedetails/?id=1128700370
... but because SFM doesn't support this by default, it's very much into the "advanced user" category.
Last edited by Marco Skoll; Nov 11, 2018 @ 1:33pm
Samson Nov 11, 2018 @ 1:45pm 
The TV i'm using is the same as the one you used in that link you provided. Option B is very impressive but sounds like it's too much work. I might have to try animated VTFs, which was something I only wanted to do as a last resort.
Marco Skoll Nov 11, 2018 @ 2:14pm 
Originally posted by Samson:
The TV i'm using is the same as the one you used in that link you provided.
That's... not actually possible. The screen I'm using there is one I personally modified, and I've never released it.

Even ignoring that, phrasing it that way isn't very useful to anyone else who might want to help but cannot recognise where it's originally from. For their benefit, please link directly to where you got it.

(I can't do that for you - I know there's several variants of this model floating around, and I can't be sure I'll get the one you used).
Samson Nov 11, 2018 @ 2:33pm 
I wasn't saying it's the one you personally modified yourself; I'm just saying its the one yours is based on: https://steamcommunity.com/sharedfiles/filedetails/?id=740415699
Marco Skoll Nov 11, 2018 @ 6:55pm 
If locked to the TV's root transform, then a camera at:

Pos [X] -0.378 50.721
Rot 0 0 180

Will be centred on the screen. Pick an appropriate X value and field of view to have the camera the distance you would like from the screen.

However, unfortunately, the UV mapping for the screen is not perfectly square and does not perfectly cover the texture used, so without modifying the model to fix the issue, the texture will be at least slightly distorted. (Even if the camera's rectilinear rendering doesn't fox you).
Samson Nov 12, 2018 @ 4:51am 
What did you do to get those coordinates and rotation values?
Marco Skoll Nov 12, 2018 @ 9:44am 
I decompiled the model and loaded it into Blender to get the co-ordinates of the centre of the screen.
Samson Nov 12, 2018 @ 9:53am 
That's quite clever. Those coordinates and rotation was closer and more precise than what I was able to achieve. Thanks!
< >
Showing 1-8 of 8 comments
Per page: 1530 50

Date Posted: Nov 11, 2018 @ 1:21pm
Posts: 8