Is it possible to render the first person completely seperately. Not panini related

You are overthinking it.
If it’s an acog, the nozzle is transparent.

Chances are the first 10 inches under the scope won’t be in view anyway.
It likely won’t matter where you put the scope on the picatini rail either.
And unless you are putting a double sided material, it’s very unlikely you could see inside the magazine or any other geometry.
Obviously this depends on how well made the geometry of the weapon is too. But the idea is that you control that by creating or editing the assets…

Ive tried multiple different scopes, on multiple different weapons, as well as modifying the geometry of the scopes to try to avoid this problem, and you’re underthinking it massively. You almost always see the geometry of the scope interior/front sights/barrel unless the zoom on the scope is massive. Anywhere from 2x-6x ive tested and you could always see something. It dosent look nice, if you want to make something look AAA you cant just ignore this issue.

Great job! I read a ton of threads to try to find a solution for this problem but you and Arkiras really came up with the next best thing. Going to play around with it in the next few days and post back when we have something semi polished.

Should be a godsend for future people looking to do proper scopes!

2 Likes

Yeah I figured, I mean I understand but from what ive understood its something that could be done in a very short period for a professional engine dev, and really its something widely used in other high end games, so you would think they’d make it a possibility for other shooters to use.

I think we’re going to use the virtual plane for now, and in the future we can look into making the change ourselves, I certainly cant make the change but in future hopefully we can find someone who can. I think its definitely worth it long term just for the fact it works out of the box on every scope every weapon without any manual work after its initial setup.

Thanks for chiming in with the posts and confirming you have seen it done this way, I felt like it was obvious that COD etc must be using that exact thing, but didnt know for sure, so to hear someone saying they’ve seen it and it being a great solution cemented that. Really wish Epic would do it, lots of shooters out there using UE4…

So this is the last bit I’m gonna do on this. I wanted to get it to work on only one mesh so you didn’t need two copies of it (and the whole scene). It works in the video (minus the bugs), but it only scales the vertices if their scaled positions are inside the scope. I don’t think this will work on flat surfaces like planes because none of the vertices will ever be inside the scope. So I think the two mesh method works better.

What’s happening inside the scope is fixable (it’s just not masking/clamping any vertices that go outside the scope). But besides that, the video shows a big artifact that I think makes this method unviable: you can see the zoomed meshes/vertices in the shadows (this happens in the two mesh method, too). That’s because the mask & zoom are being applied to the material itself, not the screen. So anything that should only happen on the screen also happens in the world.
image
Here, inside the scope looks fine, but outside, it’s clearly not right.

Maybe somebody can improve this, but that’s it for me. Fun experiment, though.

1 Like

HlOD.
And you still break the illusion 90% of the time.
Paperboard trees, wierd shading on impostors, etc.

Why?
Regardless of what you do if you have 2 materials you have 2 draw calls.

You can cheat this by specifically rendering a known UV as glass inside the same material, so you could
Just set a different UV for the transparent materials to use…
But what kind of performance benefit would you get? None.

Yea every little bit helps, but you are thinking of something that’s more of a core feature. There’s no sense over optimizing core features when then they take up a ton of your time to setup correctly.

There’s an element index for setting materials. Easier to stick to a specific format (0 is lense, everything else is to be chabged). And/or you could read the material name beforehand.
Avoid anything that starts off by something.

Last but not least, you could always just use a render target instead, and print to the texture when you want to swap pattern. It just shifts costs.
The RT way only costs performance when it’s getting swapped or designed.

Since we aren’t making N64 games anymore, I don’t think that there’s any difference between any of the approaches…

1 Like

even with MP assets you can rename or use YOUR lense material…
I don’t think you can make something that just works with “everything” that’s put on the marketplace.
The rule of thumb on publishing is…
If it’s a good product we will find SOME reason to deny you publishing 10 times or so.
If it’s a BAD product we’ll just publish it because we cannot possibly comment on how bad it is.

1 Like

I’m never wrong when it comes to telling how things are for epic >:P

1 Like

Version 4.20. Materials are a mess, so if you have any questions, feel free to ask.

Also, these were just experiments, so don’t assume anything is “correct”.

1 Like