#[WIP] Seamless Dungeon

1640 messages · Page 2 of 2 (latest)

gilded dust
#

also, things go back to normal when the camera moves a certain way, like when dancing or jumping, but when standing normally it looks like this

#

wondering if this might give you any clues as to where to look for a fix for this bug

#

I feel like this might be a matter of patching something in HDRenderPipeline, but not exactly sure what or where

gilded dust
#

oh I freakin forgor that you mentioned it was caused by the custom pass Dentge

#

makes perfect sense that it only flips opaques

#

at some point I gotta look at what AssetRipper can do with the posterization to see if that lets us work around or even fix the bug with obliques

slate barn
#

I only know hlsl and glsl

#

I hate that i keep having to like leave this project and come back to reread all the code i've done ; -; I SHOULD be pretty stable with free time to work on this now got a new job so less stress regarding that

slate thistle
#

where could I get teh mod?

shell dagger
#

its just a WIP

#

not out yet

#

am also waiting for the release of this mod

gilded dust
#

it would be really cool to finally get this working

#

I'm still wondering about my idea to add a depth offset, I gotta try and see if I can make a custom opaque shader that does that and see if the posterization shader reacts as I hope

gilded dust
#

or do you mean that it decompiles into hlsl or something similar, but it uses very basic operations that make it really verbose?

slate barn
gilded dust
#

a lot of it might just be due to how shader graph compiles, since it places a method for each node type into the shader

#

even reading a compiled shader graph is really not pleasant

paper adder
#

is this abandoned

paper adder
#

oh

olive abyss
#

I just heard news that someone is going to eat this mod and

left trellis
celest epoch
#

finish this now

#

i dont like it when cool things become

#

LOST MEDIA

#

read up a bit and

#

yeah what i just said was /j

#

but still would like this done when you finally get time

#

atleast where do i get the beta i saw this in a yt vid

slate barn
#

No I get it, I want to finish it badly! I’m just not the best at balancing my time, especially when I get busy

celest epoch
slate barn
#

I don’t believe I’ve given it out except to one person, that was before my rewrite

#

I do have videos throughout the thread though

celest epoch
#

cant find it but i know i saw it

celest epoch
urban thistle
peak blade
#

I JUST HAD A DREAM ABOUT THIS MOD WEEKS AGO

#

it was exactly like this one holy shit.

slate barn
#

The conception of this started with the christmas event last year lol

#

It ended up being alot more work than i originally thought. You can code portals from scratch very easy but the mix of zeekers shaders, and HDRP is a nightmare

peak blade
#

im glad there was someone who thought about the same thing as me

#

cant wait to use this!

celest epoch
#

Maybe ask the lethalmon team for help or smthn they made portals for barber and i think its only not see-throuh to save resources

urban thistle
slate barn
#

My issue isn't the portals them selves it's that parts of the celshader wasn't working properly with it i've yet to try zagster's suggestions though havn't had the time

celest epoch
slate barn
celest epoch
#

Different

#

Own thing

#

He cut walls

waxen cedar
#

(You sent the wrong thread)

celest epoch
#

Oh yeah

#

I did

#

Well then

#

Fixed

slate barn
#

That doesn't really help me I have the movement perfect and seamless

#

It's the graphics that arent

#

Especially going from inside to outside

#

Zeekers turns the sun off and all the lights, I almost got the steam valves to render last time I worked on it as well

#

It's alot of like rendering fuckery

celest epoch
#

ah ok

#

does it work at all? i would really like a beta to be released

trim flower
celest epoch
#

and they said they understand bc they do aswell

trim flower
#

Nonetheless, she doesn't seem comfortable releasing it without polishing/fixing the rendering and shading issues (for what I've read it is a headache)

celest epoch
#

yea

trim flower
#

I know we all have been waiting for this mod to release for quite a while, the concept of the mod is freakin' cool and I also want to see this finished some day

#

All I'm saying is

#

Let her cook

celest epoch
trim flower
# celest epoch onki

btw don't take what I wrote as something directed towards you, nor as if I'm talking for the mod's dev. It's more of a general message for others who keep asking, especially if they aren't polite xd

celest epoch
#

oki

slate barn
#

The other thing about portals in unity HDRP is that they aren't performant i had to write my own algorithms because unitys hdrp versions suck badly. This one in specific takes 7ms(with the other stuff i'm doing) on my computer RenderCamera.CalculateObliqueMatrix which you need to be below 6.9ms for 144hz(fps)
So ontop of everything else that's already ill performant.

I took nvidias algorithm to calculate oblique projection matricies and decimated it, i do alot of assumptions which isn't great, but is really performant and can now achieve ~3ms which still isn't great, but way better than unitys. You can see the math representation of it in this image

#

Figuring out where this bug lies whether it's in my math, something unity is doing, or in the celshader itself is awful. Especially since i can't reproduce it in unityengine, only in lethal company

gilded dust
#

I'm 90% sure it's an issue with the cel shader

#

@hallow basin had an issue with it flipping the result of a planar reflection probe as well, and once we disabled custom passes on the probe it worked perfectly

slate barn
gilded dust
#

I haven't had the chance to test it out, but I still wonder what would happen if you make an opaque shader with a depth offset that samples the depth texture of the render texture

#

should be possible in shader graph, I believe

#

okay maybe not ??? not sure what this is about

#

but if you can output the render texture to SV_Depth in a shader lab shader instead maybe?

quaint vault
#

👋🏻👋🏻👋🏻 How is it going in here?

fickle gull
#

PING I want to follow this mod

celest epoch
#

Maybe ask how minecraft immersive portals mod did it

slate barn
#

Once again it’s not about how it’s done. It’s the cel shader

#

I’ll be free around Christmas to work on this though

slate barn
wraith cairn
#

Good mod

celest epoch
#

WAIT! How does this work for the doors?

gilded dust
#

but it's not something I've had a chance to experiment with much

#

if at all

celest epoch
nimble fossil
celest epoch
#

Ok

#

Btw what does iirc stand for

slate barn
nimble fossil
#

gotcha

#

but it should work with mansion doors right

slate barn
#

Last time I worked on it I was reworking how it identified doors, because it was inconsistent with mansion doors

rugged cargo
#

Still clicking on this thread everytime I see a new message in here :3

stable galleon
left trellis
peak blade
slate barn
#

Can you guys like stay on topic please, I like to scroll through here to look at actual information that can help fix stuff

#

On a related note I might try to make a mirror object inside the ship to test stuff on so it’s disconnected from the portal logic. Since mirrors act similar to a portals lol

celest epoch
#

Called morror decor

slate barn
#

Hmm I’ll take a look at it see if they do anything with the celshader

gilded dust
gilded dust
#

it's a very primitive implementation

slate barn
gilded dust
#

I would definitely like to have a look at the shader situation once I'm done with the stuff I've had on hold for a while but idk how long that'd be

#

I can definitely help out occasionally until then at least

#

would be cool to figure out how to make a portal shader work with the custom pass

slate barn
#

Portals are less shader stuff more gameplay logic, atleast without writing a ton of manual hdrp shader code. Which I don’t want to do because editing hdrp shaders is a nightmare

#

It’s like a lot of boiler plate baked in. Other branches of unity shaders are piss easy to do portals with

#

Idek why lethal uses hdrp it’s not a high fidelity game

#

Besides the steam valves

gilded dust
#

yeahh the shaders are a pain for sure

celest epoch
#

Wait i think i know a vid that may help

slate barn
#

If it’s unrelated to lethal company it won’t

celest epoch
slate barn
#

Ohh

#

I love acerola

celest epoch
slate barn
#

Decompiling shaders though sounds kinda awful if the next time I work on it I can’t get it I’m going to make my own celshader lol it’ll be easier and hopefully look similar

celest epoch
#

The vid explains how the shaders work for you to make it similar

short minnow
#

oh man i havent checked this thread in ages

edgy vector
#

unusual for acerola

gilded dust
#

I forget who, but someone put a lot of work into getting it quite similar to vanilla

slate barn
#

He normally goes really in depth

slate barn
quaint vault
#

This is my most anticipated mod 👁👁

slate barn
#

It’s not even the most advanced mod I’ve ever made but it’s for some reason the most annoying to make lol

#

I made an separate game/network engine that works asynchronously for the game rust for doing really advanced server side shit

#

Was too much effort to maintain but that was a good amount of code in comparison to this

gilded dust
#

@slate barn I wanna see if I can fiddle with the depth-write shader now actually, would the camera output the desired depth value for the screen already or would I need to use an offset from the portal quad's fragment depth?

#

writing the depth directly without modification is probably significantly easier if I had to guess, but either way it changes how it has to be written I think

short minnow
gilded dust
slate barn
gilded dust
#

oh god

#

good question tbh

#

is there an easy way for me to set up a camera with an oblique frustum in the editor? doesn't matter how bad perf is, just for testing

slate barn
# short minnow wait so whats currently the problem?

So I have the mod working well without the celshader on, but with it on I get weird stuff happening, where the rasterized colors are upside down but the depth isn’t. And then if you look directly at a door it fixes it self but it’s pretty pixel perfect it’s extremely weird behavior

gilded dust
#

I think cameras normally do use the near plane, but hard to say whether it's the flat value that is set on the Camera or something based on the near plane of the frustum

slate barn
gilded dust
#

ah I see, so I can just use a helper object and an editor script hopefully

slate barn
gilded dust
#

yeah

slate barn
#

So any logic based on it breaks

gilded dust
#

if we can set it to match the main camera then maybe

slate barn
#

I did a deep clone of the main camera before

#

Its performance intensive and didn’t help

gilded dust
#

oh yeah I know it wouldn't help with the flipping thing yet, but if the near clip is the same, it might result in us getting back main-camera-space depth values

slate barn
#

Ohh

gilded dust
#

I really have no idea though, I just gotta test this out I think

#

I assume before creating the oblique matrix you have to set the portal camera to the same relative position to the interior door that the main camera is to the exterior door?

slate barn
#

No the camera is inversed to the player

#

Oh

#

Yeah I misread

#

I can give you my portal code it’s essentially written to be a generic unity one

gilded dust
#

oh sure, that might help

#

would you be willing to hop on vc? might make this go faster lol

sacred viper
#

Will this mod support the moon mod and the interiors mod?

peak blade
#

so yeah, it will def support a lot of moons/interiors

#

(might have some issues here and there)

quaint vault
#

How are things going👁👁

amber zinc
#

Still really looking forward to this one

amber stone
robust stream
#

what happened to this one

celest epoch
#

being worked on

robust stream
#

its just like i remember this thread opening up in like.. february or january 2024?

#

lol

#

i really hope it sees the light of day!

#

yeah february 1st 2024 lol

slate barn
#

So tempted to close the thread

robust stream
#

i mean i dont want to say that LC is dieing because maybe its not that bad

#

but stuff like this really helps keep it relevant for now

slate barn
#

I get you guys want this, it's not a small mod and i am not a mentally stable person, and i some how am keeping a job where i work 65 hours a week. I'm exhausted i want to finish it, but context switching alot makes it hard

robust stream
slate barn
#

I was unemployed when i did the majority of the work on the mod

gilded dust
#

I think at this point I really wanna ask zeekerss if we could see the custom pass to see if we can make it work with oblique projection or something

slate barn
#

He replies on twitter, i messaged him before about stuff

#

Albiet i used my of twit account lmao

gilded dust
#

except I guess I haven't yet explored the avenue of using the one from the patcher project

robust stream
#

the rumor has always been that he's very modding-adverse

gilded dust
#

I highly doubt that

robust stream
#

key word rumor

#

i think he just doesn't really entertain it much given hes working on like three projects

gilded dust
#

indeed, that's why we have to keep our requests fairly small and easy to fulfill

#

it's understandable

robust stream
faint musk
#

so you wouldn't be able to draw any direct conclusions from testing with it

gilded dust
#

it's not about comparing them, it's about straight up using it

slate barn
#

I wonder if that's relating to why i have issues, aren't cellshaders typically a fullscreen shader?

gilded dust
#

but yeah I don't really understand why the vanilla custom pass uses a draw renderers custom pass, it's bizarre

faint musk
#

that's very probable, because if you manipulate depth values this thing overrides it

gilded dust
#

the camera has a transparent quad in front of it so that the custom pass applies to every pixel anyway

robust stream
gilded dust
#

and from what I could tell it doesn't actually use the depth of the fragment? only the depth from the buffer?

faint musk
gilded dust
#

I am talking about the game

#

there is a plane in front of the camera

slate barn
#

I COMPLETELY FORGOT THATS HOW IT DOES IT

faint musk
#

yes, but the filter applicaation is not going on that plane

gilded dust
#

hmm

slate barn
#

i remember when i first opened up lethal company and flew around i saw that and just thought it was the stupidest thing

faint musk
#

the plane just has a render texture right?

gilded dust
#

no

#

not that I know of anyway

slate barn
#

I think its to crush the resolution though right?

gilded dust
#

no

#

that's the UI camera

#

the plane I'm talking about affects the fog mainly

faint musk
#

it seemed like there is a gameplay camera and a ui camera and we see the image from the second one

gilded dust
#

when you remove it, the fog in infinite depth on snow maps just disappears

faint musk
#

and the gameplay camera gives the world view

gilded dust
#

right, but that's not what I'm referring to

faint musk
#

and the custom posterization pass only affects the gameplay camera

gilded dust
#

that's true yeah

faint musk
#

so from my analysis it just reads a depth, normal and color buffers in view space and uses it to calculate the outlines and posterization and then uses that as a texture when redrawing each object in the scene

gilded dust
#

the thing I wondered is whether the draw renderers custom pass just screws up projection when it involves an oblique projection matrix, which would make me think that if we could get the vanilla shader to draw on a fullscreen pass it might work

#

but when I tried to do that it didn't draw anything iirc

faint musk
#

i kinda made it work, but it needs some tweaking to get 1:1 correspondence

gilded dust
#

oh how so?

#

if you managed that, it would be good to show how so that tsunderella could check if it fixes the issue in the oblique projection

faint musk
#

the only thing that is not possible to replicate is the fact that most objects glow white-ish in the distance even through fog in the original pass

gilded dust
#

even if it doesn't totally work right it would hopefully tell us if it's worth pursuing

faint musk
#

i took the one in ripped project and modified some things that were wrong (from my perspective), nothing super crazy

gilded dust
#

I wonder if you could create a pass to write to the stencil buffer to make it skip drawing to infinite depth?

faint musk
#

unfortunately the one in game cannot be used as a fullscreen one cuz it's not compiled for this

gilded dust
#

oh wait I thought you were talking about the original custom pass

#

I see

faint musk
#

ah no, that's not obtainable D:

faint musk
#

it's applied only to opaque objects

#

the one in the patcher is fucked up in that regard, yes, that's what i fixed

gilded dust
#

so objects that are far but still within the far plane will already white for some reason?

faint musk
#

one sec, let me get a pic

faint musk
#

they actually shouldn't be that visible, but I'm not sure if this is a stylistic choice or a bug

gilded dust
#

do you have a visor remover?

faint musk
#

yes it is, nope

gilded dust
faint musk
#

if you stand in a light beam it gets way more intense for some reason

#

go in the light

#

😇

gilded dust
#

top of the hill by the ship on exp

#

what you're seeing is what happens when you remove the plane:

#

or at least it looks similar

#

idk if that's the cause in your case

faint musk
#

this is just vanilla, but with sun turned off

#

in my pic

gilded dust
#

wait sun off? where was all that light from then

faint musk
#

from the ship xD

gilded dust
faint musk
#

it is with mrov's blackout weather, but he doesn't change anything about rendering

#

i think you can observe this effect when you look at far unlit (as in dark) objects while standing in a bright spot

gilded dust
#

sun off

#

not sure what's going on on your end

faint musk
#

wtf lol

gilded dust
#

what's your GPU?

#

I'm wondering if maybe fog on transparent requires some feature that some GPUs would be missing

faint musk
#

intel 😎 💀

gilded dust
#

hmm

#

could be then

slate barn
gilded dust
#

I would imagine it might involve some compute shader stuff more than transparency issues tbh

#

volumetrics use compute heavily I think

faint musk
#

but fog on transparent works for me, at least when i made the snow shader i could see that

gilded dust
#

hum, not sure then

#

really weird

faint musk
# gilded dust really weird

ok, this effect is very obvious on vow
when you land you can see white silhouettes of the surrounding hills, for example

faint musk
gilded dust
#

no weather effects here? or is this foggy again?

#

I'll check how it looks for me

faint musk
#

nope, just clear weather on vow

gilded dust
#

huh, yeah, that's pretty much the same for me here

#

maybe I had thicker fog on exp than you

#

frick you discord

faint musk
#

i actually went on exp and it's hard to replicate there on vanilla, i agree, guess it was made way more obvious by the blackout weather

#

it looked like your pics during normal weather

#

so yeah, this particular effect is hard to replicate in the fullscreen shader without demolishing fog or lighting (at least judging by my first attempt)

#

in any case i want to make a proper fullscreen shader that matches vanilla as close as possible and publish as a mod, because the original doesn't work for tesselated or transparent materials. this is mostly to make snow look more inline with the game, but maybe it would find some use elsewhere

gilded dust
#

@slate barn what I would want to test instead then is whether disabling the material override (or changing it to a plain unlit material) in the posterization custom pass results in things appearing right side up again

I would test but I don't really have an easy way to see an oblique projection in-game :(

#

if it doesn't change the opaques' orientation, then I wonder if the bug might be in HDRP itself

#

which we can probably just patch ourselves

#

(if we can figure out where it's going wrong)

gilded dust
faint musk
#

it doesn't break it outright, i meant in a way that when you draw outlines (or anything really) over the current view they themselves aren't affected by fog. there are ways to fix it or at least minimize, but i havent played with this too much yet to be honest

#

there is also an injection point "Before Sky and Fog" but it's broken in that version of hdrp and is actually AFTER fog is rendered D:

gilded dust
#

oh well sounds like something worth patching :^)

#

but as far as the outlines, I think that maybe they just fade by distance, then the rest of it is taken care of by the fog on transparent that normally comes from the plane in front of the visor?

faint musk
#

that moment when you need to patch a whole render graph pipeline to make a rather simple thing agony

gilded dust
#

I've done it multiple times already teehee

faint musk
#

but in general yeah, it's possible to carefully reuse the color and depth buffer so this overlap is not noticable

gilded dust
#

well what's odd is that the effect of the plane is sometimes visible on some other invisible object in the scene so it's hard to see the difference always

#

but it often makes distant objects have fog when they didn't before

#

fog also becomes slightly thicker in the ship

#

on the light volumetrics

#

plane off

#

plane on

faint musk
#

oh god, so it uses some custom material?

gilded dust
#

I forget tbh

faint musk
#

damn that's quite a difference lol

gilded dust
#

it really varies in its effect

#

on snowy moons it mostly just affects where opaques have not drawn to depth

#

it's just HDRP/Lit

#

it has a texture "dropsCondensation", so perhaps it is controlled by something in HUDManager?

#

I'm pretty sure that something else also has the same effect in the scene as well, though, and I haven't got a clue what it is

#

it is only visible at certain camera angles, which is why the sky can become visible in spectate randomly

#

or it might not even be another object, it might just straight up be a bug in the fog rendering

faint musk
#

ye, just found it too, but it seems to change the alpha value of the texture and that's it

#

if we're talking about HelmetCondensationDrops()

gilded dust
#

yeah

robust stream
#

love y'all thanks for caring so much about this project. i think im gonna disappear again now for an indeterminate amount of time... lmao

hallow basin
#

Thats a lot to read

echo parrot
#

Indeed

rich schooner
#

I'll try to make my mod compatible with this one as mine only does the preview and not the pass-through, that said my mods also adds the sound exchange between interior and exterior. Definitely looking forward to this though

split mountain
#

@slate barn I was wondering if you could make compatibility for Mimics (fake fire exits). Also, is it possible for smaller outside enemies to access the interior? It’d be cool to be chased around the facility by an eyeless dog

rich schooner
#

They said that the navmesh stuff was very buggy and caused sutterings, so apparently no they can't go inside

split mountain
rich schooner
#

Can't tell, I don't know

split mountain
gilded dust
#

she is aware of it, I don't believe that is among the current issues that are holding it back

quaint vault
#

How are things going? 👀

rich schooner
slate barn
#

I believe it was more of a shader issue than anything

slate barn
#

Unless i can some how get 6 figures modding i can't neglect my job and it's currently it's busy season so its hard to find time.
I will update this thread when i have something of substance, but i'm literally working right now lol

rich schooner
#

It's fine, nobody is forced to work 24/7 on their plugin 👍

#

Life has its reason that reason wouldn't be able to ignore

#

it's not the right quote at all but it's fine

#

matrices projection... I know how hard it is to deal with matrices, I made a level viewer almost from scratch, rendering worldtoclip and cliptoview, or was it worldtoview and cliptoview ? Anyways

#

tough

#

But I never heard of "oblique" projections, what does it mean exactly ?

slate barn
rich schooner
#

Oh I see

#

But why is it not flat ? Why is it oblique ?

#

Wait, that's how you calculate the position of the camera and the camera clip plane ?

#

yeah my bad it sounds logical to make the camera clip plane oblique compared to camera's origin

#

So the issue has something to do with shaders, why though ? The ship has cameras and it works fine iirc

#

I get why it's not possible to get rid of the effects on the camera though

slate barn
#

its easier to visualize in 2d.
imagine the blue lines being a normal clipping plane for near and far.
red would be an oblique near clipping plane

rich schooner
#

It will make that the post-processing is visible on everything but not through the portal

rich schooner
slate barn
#

You would allign the oblique plane with the portal surface

rich schooner
#

Yeah so it means that the rect has 4 different points, instead of an origin and a length/height

slate barn
#

its computationally expensive and awful to debug.

#

sec

rich schooner
#

I've watched this video by Sebastian Lague to understand how portal effects were made in videogames, it was very interesting and it had an optimization part iirc -- That said I don't know if it applies to HDRP Unity projects

Experimenting with portals, for science.

The project is available here: https://github.com/SebLague/Portals/tree/master
If you'd like to get early access to new projects, or simply want to support me in creating more videos, please visit https://www.patreon.com/SebastianLague

Resources I used:
http://tomhulton.blogspot.com/2015/08/portal-rende...

▶ Play video
slate barn
#

this was my implementation because unitys built in was slow.

        public static void SetObliqueProjectionMatrix(
            this Camera camera,
            ref Vector4 clipPlane,
            Matrix4x4 sourceProjection,
            ref Matrix4x4 inverseProjection
        )
        {
            float sX = Mathf.Sign(clipPlane.x);
            float sY = Mathf.Sign(clipPlane.y);
            float qX =
                inverseProjection.m00 * sX
                + inverseProjection.m01 * sY
                + inverseProjection.m02
                + inverseProjection.m03;
            float qY =
                inverseProjection.m10 * sX
                + inverseProjection.m11 * sY
                + inverseProjection.m12
                + inverseProjection.m13;
            float qZ =
                inverseProjection.m20 * sX
                + inverseProjection.m21 * sY
                + inverseProjection.m22
                + inverseProjection.m23;
            float qW =
                inverseProjection.m30 * sX
                + inverseProjection.m31 * sY
                + inverseProjection.m32
                + inverseProjection.m33;
            float cMult =
                (
                    2.0f
                    * (
                        sourceProjection.m30 * qX
                        + sourceProjection.m31 * qY
                        + sourceProjection.m32 * qZ
                        + sourceProjection.m33 * qW
                    )
                ) / (clipPlane.x * qX + clipPlane.y * qY + clipPlane.z * qZ + clipPlane.w * qW);

            sourceProjection.m20 = clipPlane.x * cMult - sourceProjection.m30;
            sourceProjection.m21 = clipPlane.y * cMult - sourceProjection.m31;
            sourceProjection.m22 = clipPlane.z * cMult - sourceProjection.m32;
            sourceProjection.m23 = clipPlane.w * cMult - sourceProjection.m33;
            camera.projectionMatrix = sourceProjection;
        }
    }```
#

This makes ALOT of static assumptions

rich schooner
urban thistle
rich schooner
#

But it sounds a bit "newbie"-esque to follow youtube tutorials lol

slate barn
rich schooner
slate barn
#

I know some shader stuff, but cel shaders aren't the easiest to make look good/replicate. IIRC someone in the discord did replicate it though was thinking of asking to use it

rich schooner
#

Either way, have you seen how rendering to main camera is made in the game ? The actual camera is under the map

#

It would probably be possible to get the portal clip area on the render texture and render it over the render-texture of the camera

#

I don't know if it's clear

#

but the game actually shows a texture rendered on a plane, as the gameplay camera

slate barn
#

Yeah, the issue ends up being one of two things.
When you look directly at the portals center it flips the depth upside down. thats why i think its more towards a dot product error. I might of have a picture of it still

rich schooner
#

I'd really be interested into looking at what it looks like

slate barn
rich schooner
#

It's hard to imagine, only described with words

rich schooner
#

😂

#

Okay this looks funny

slate barn
#

Like I HAVE NEVER SEEN SOMETHING LIKE THAT

rich schooner
#

yeah it feels pyschedelic

#

Colourmap is inverted hmm

slate barn
#

I believe its the depth, because the cel shader colors the depth

#

I think

rich schooner
#

I don't want to suggest already tried solutions, and it's quite hard to explain to be honest

#

But have you tried to negate the Y multiplier used to render the colour texture ?

#

the skybox seems to render correctly over it

#

or, more like, behind it ?

slate barn
#

I'm not in context of unity so i can't say if i did try that or not.

#

Without the celshader it looks similar to this (in editor)

rich schooner
#

it does look like an error in the dot product yes, I would love to fuck around and find out with these portals, last time I did that I reversed the terrain meshes metadata of a game engine, but it took 3 weeks, playing around with matrices and multipliers and all

#

clearly not worth

#

i lack of mathematical a computer-scientific comprehension of matrices in rendering

rich schooner
# slate barn Without the celshader it looks similar to this (in editor)

To be honest, I planned to implement a similar feature into my mod, not exactly a portal, but a way to see through the windows of the facility's doors to see what's going on inside, it would also have sound exchange, that said I don't know if it's really a good idea for several reasons, first my mod is meant to enhance monsters, it's not a Global Game Overhaul, secondly it looks quite tough due to the celshading (?) and lastly, I would like to make another mod that would use portals, which is a mod idea I'd really like to work on before I start my preparatory classes.
It would be a mod called "Theatre of Insanity", and basically what it does is that it smoothly transports isolated players outside of the dungeon, inside the affectionately called "Theatre of Insanity" that is canonically a place that doesn't exist (it does, but it's for the lore), that is just the materialization of the insanity of the player. It would be a liminal place, similar to backrooms but based on dungeon's theme, repeating indefinitely the same intersection, and after like 30 seconds, a mob similar to the little girl would spawn, make the player's flashlight blink and then, due to the fear caused by loneliness and overthinking, the player would run around and be smoothly transported back into the normal dungeon, in an isolated area.

That's an ambitious project, but I know that the worst part will be doing the actual portal, closely followed by making a new DunGen system generating and deleting intersections on the fly, all that based on current dungeon's theme

#

i think I lost myself, all that to say that I won't be doing the same thing as do you but I would love to work on your project as well

gilded dust
# slate barn Yeah, the issue ends up being one of two things. When you look directly at the p...

based on the image, it feels to me more like it's flipping just the color buffer when it applies posterization, which comes right after the opaques are rendered, and then the skybox renders where the depth is >= far clip in the un-flipped depth buffer

in theory, transparents should also show up right side up, you could probably test by looking at a lootbug through the portal since they use a translucent shader

#

I have a feeling that the issue lies somewhere in one of the nodes that zeekerss used in the posterization shader graph, but I don't really have anything to back that up

#

I really want to ask zeekerss if it's possible for us to see the graph and test out some solutions with the original graph, but that might be overstepping

#

I do want to make sure that it's not caused by a bug in HDRP first though, since the posterization uses a draw renderers custom pass that might just be projecting the opaques completely wrong

rich schooner
#

I was gonna tell something, but then I remembered that the opaque texture is rendered correctly

quaint vault
#

It's been a while. How are things going?

ionic wedge
#

🧟‍♂️

rich schooner
#

This project is technically extremely complex, I ask you for the dev of this mod not to urge it 😄

rich schooner
#

Just thought about this @slate barn, what's the big difference between "MirrorDecor" and Seamless Dungeon that prevents you to use its camera thing ?

#

Looks pretty fine to me

shell dagger
#

Look at it from the side

slate barn
#

I remember looking at the code of it before i can't remember what was off about it, it might have the same issiue i had with dot products. It's been a bit since i've looked at it though so i can't say for certain

slate barn
rich schooner
rich schooner
#

Where the human rights at ?

slate barn
rich schooner
#

America

iron lake
#

Wonder how this mod is going

#

Havent checked up on it since someone told me about it

slate barn
#

At this point i feel like im being trolled

slate barn
rich schooner
iron lake
hallow basin
rich schooner
#

Opaques ?

#

It's obviously not a real reflection tho

#

It's using a camera that shows what it sees

#

"reflections" doesn't have this quality

edgy vector
#

The lack of proper post processing and the fact that’s a very isolated area

#

Handling lighting between the moon and the interior is fucked conceptually

rich schooner
#

Yeah that's fair

edgy vector
#

When you go through doors the sun literally tuns on and off

slate barn
#

I accomdated for that mostly

#

I couldn't get steam from the valves to render properly though either

rich schooner
#

Steam is on its own layer

#

Did you set the camera to catch this layer too ?

slate barn
#

Yeah i deep clone the players camera to have all the same settings except for ui related features

rich schooner
#

Which one ?

slate barn
#

Uhm the one on the actual model

rich schooner
#

Oh ok

gilded dust
#

it is a fixed camera

#

as far as I'm aware, there's not a single live mod using oblique projection except for the planar reflection probes in Liminal Pools

slate barn
#

Oh right

#

That's what it was

rich schooner
#

I mean the oblique projection is far from being the worst problem

#

It's a certain math problem of course

#

But it's not a wall, unlike the shader thing

gilded dust
#

the shader thing doesn't happen without an oblique projection matrix

#

the oblique projection matrix is non optional

slate barn
#

This is true

rich schooner
#

Yeah I get the shader issue, it's caused because the surface of the portal is not skipped by the render pipeline of the main shader

#

So it actually shades it

#

But what we want is not to shade it

#

And apply the shader yo the other camera

#

So the projection has no effect on it

#

But it's not just an oblique proj thing, in facts it's not really because of the oblique proj, it's just that the oblique proj makes it remarkable

slate barn
#

Which is why there’s issues

rich schooner
#

Yeah the solution is to make a layer mask that the celshading doesn't celshade on

#

if there's not already one

gilded dust
#

the posterization shader running on the portal camera is what makes it flip, not the gameplay camera

#

the issue is avoided by disabling custom passes on the portal camera, but we don't want that, because it will then look out of place unless it is rendered onto an opaque material, which causes it to lack the thick lines that come from the depth buffer edge detection on everything else in the gameplay camera

rich schooner
#

Yeah that's why it needs to skip the portal surface but apply again the posterization on the portal camera

slate barn
#

The issue is coming from the cel shader being applied to an oblique projection matrix

#

It causes dot product errors of some kind

rich schooner
#

Hmm...

#

I really need to see what it looks like to be more precise

slate barn
# slate barn

I linked it before, but
scenario one:
It's aways flipped unless you are looking straight at it and are perpendicular.
scenario two:
Invert it and its correct until you look straight at it then it flips

#

When the celshader is turned off it works fine but looks awful

#

I could just recreate/use another celshader that looks similar

#

Because without the source code to the actual celshader its really hard to debug

#

#dev-general message
I encountered this when i first started making this a year ago, and i've rewritten the plugin 3 different times to try to counter it

rich schooner
minor epoch
#

🔥

quaint vault
#

Does it live? 🥺

minor epoch
#

is it?

stoic locust
#

☠️

cloud atlas
#

killing my balls

peak blade
#

unfortunate

stable galleon
#

This mod is STILL not out yet?

#

This shit is gonna be like Silksong

#

In dev for almost two years now 😭

modern vector
#

Notezy you are our only hope 😭🥀 /j

slate barn
#

I’ve been busy with work but if anyone needs help with the math I can, I think the more annoying thing when I did have time was dealing with the existing cel shader but it could of been something I messed up early on making it hard to debug that and hdrp being hdrp lol

tribal iris
modern vector
nimble fossil
#

if scoops ever comes back we could ask them

#

since they were already working on deconstructing vanilla shader

slate barn
#

I think if anything if remaking it from scratch and the same bug arises I would just recreate the cell shader in a way that would be compatible

#

I wouldn’t ever release the mod without atleast something to make it look closer to vanilla because without the cell shader I think the game looks bad, and if I only disable it in the doorways it ruins the seamless aspect

rugged cargo
tribal iris
#

It looks fine in the unity editor because the cell shader isn't there

teal knoll
#

could another option be generating the first tiles right outside the door and tping you after you enter?

#

even if it looks bad, at least is something

slate barn
#

Atleast from how I’d view it

patent sail
#

I don't know much about shader work, but what's the problem with the shader stuff, like why cant the vanilla shader be re-used (I'm speaking after only watching the brackey's video on portals lol), I do plan on trying to tackle portals for an interior idea so... I'm trying to be not pessimistic lmao

tribal iris
modern vector
#

the video didn't immediately ended after kill bind

teal knoll
#

XD

#

The player dying in 1 frame with no audio

#

Comedic mastermind

peak blade
slate barn
#

I think atleast I ran into that as well

urban thistle
gilded dust
#

I thought the issue was specifically with oblique projection, just orienting the camera relative to the portal exit isn't enough

tribal iris
gilded dust
#

right

#

but interior portals just simply won't work if that's the solution

#

any portal exit area would have to be specifically designed around this in order to avoid clipping

tribal iris
#

I'm aware of that

gilded dust
#

gotcha

#

I wasn't clear on if that was a consideration

slate barn
#

Yeah too many maps have stuff right behind interior portals to not use obliqueproj and without it stuff gets weird looking perspective wise if there’s a hallways behind one

gilded dust
#

not to mention that some interiors likely have double sided walls that would just totally break it

rich schooner
rich schooner
#

I see. Let me see how to possibly fix this

#

I remember seeing similar to that

#

Is there other post process on cameras projection before the oblique projection ?

patent sail
#

@slate barn not sure if you're still interested but next update zeekerss is changing the ingame shader to be a full screen shader, which im told was the major blocker for this project, just thought to let you know :p

slate barn
patent sail
slate barn
#

I love non euclidean stuff

patent sail
gilded dust
#

worth noting that the Sponge dev finished reverse engineering the shader, so theoretically their version should be identical to vanilla, though I haven't tested that personally

#

I'm very interested to see it, it's very cool that this is a thing now finally

edgy vector
#

@tall valley @'ing because if there is interest in this kinda thing maybe worth considering if any of the shader should be modified in order to support the idea of it needing to be sampled by other mods in any certain way? dunno what that would specifically entail but maybe worth talking about before it hits the public

#

like eg. if certain things can be more easily exposed idk

tall valley
#

I'd certainly be interested in helping with shader stuff. I've done view portal tricks before in unity and they're fun to work on.
How was the portal system working for this project before? Was it using an extra camera?

patent sail
#

you can do portals without extra cameras?

tall valley
#

Most likely not in Unity. The rendering pipeline (and occlusion) is probably too complex for a shader to change what angle/position objects are viewed from inside the shader and not have it look awful.
Anyway, if it's a camera, was the issue before that the camera was rendering the portal using the original shader (or with no shader), and then the player camera was applying it again but without depth info?

edgy vector
#

@slate barn just in case they dont look at this thread super frequently

hard trail
gilded dust
#

or that's my understanding of it from screwing around with it for a few days

#

as far as what might be necessary to make the seamless dungeon portals work well with the new fullscreen pass, I suspect the main problem would be making it so that the portal rendered to a mesh in the main camera doesn't apply the shader a second time

#

I would suspect the solution to that would be to just render it in the transparent pass, since I would assume that the fullscreen pass renders after opaques and before transparents, like the original custom pass did

#

any passes that run after transparents should also be disabled in the portal camera, which I expect would mainly be the color correction

#

might need some blending between color correction settings if entering the interior changes those, but not sure if that's the case

tall valley
#

Yeah, transparent pass would work, or just apply a mask to the shader.
It already masks everything with depth=0.0 (to avoid shading skybox), so if you wrote depth=0 to the portal that could also work.

gilded dust
#

I don't remember if I was able to find a way to write an absolute depth value in an HDRP shader actually

#

it's been so long since I screwed with this, but I was experimenting with grabbing depth from the RenderTexture and writing that in the shader that paints the portal, I forget if I was having trouble with getting the values to convert correctly or if I couldn't write depth at all thonk

karmic whale
#

i remember i tried making a kind of

#

space hole kind of thing

#

something that let you create a tunnel between two places

karmic whale
#

there was objects that let you create visual holes in geometry

#

but it only worked if the object was capable of transparency

#

things defined as aboslutely solid didnt do it

#

probably related to how rendering works

#

since all the stuff behind it basically wouldnt exist anymore

#

id have to interrupt that stuff earlier in the process and i dont know if Unity lets you do that

gilded dust
#

not sure what features you're talking about, but if it relies on alpha, you probably needed the material to use alpha clipping

#

but that's not related to what we're talking about

tribal iris
#

My attempt never really went anywhere because I am not mathematically smart enough to calculate the non-euclidean portals

peak blade
#

does this stop at portals that shrinks/grows you?

#

most obvious example

#

but you get what i mean

slate barn
#

Unity hdrp doesn’t function the same in my experience

patent sail
#

i think last tutorial i checked out was from brackeys

#

it wasnt specifically non euclidean but it basically was since it was seamless portals

slate barn
#

Non Euclidean comes with that the tech debt of having to scale the player/camera atleast depending on what your trying to achieve to make it seem less

patent sail
#

i can sorta see that, i'd probably more so wanna explore the room manipulation side of it, if that makes sense

rich schooner
#

Is the development planned to be continued with v80 ?

peak blade
#

doesn't seem like it

rich schooner
#

I just got no answer, it doesn't mean no.. for now

teal knoll
#

they did say they stopped progress because they couldnt find how to continue

rich schooner
#

Yeah, I know, but with the shader update it should be doable

teal knoll
#

idk if the shader change, or whatever comes in v80, will be enough to continue progress

#

:c

#

oh

#

didnt even see you already replied XD

#

was busy while typing

#

you could take a look :3

tired mountain
#

(10 days later)

Hey how's things going y'all?

peak blade
#

gone.

#

no more seamless dungeons

#

go home

rich schooner
#

Lol

rich schooner
#

Dafuk

tired mountain
#

I wish this was generated......the fact it's real actors makes it so much worse

peak blade
#

completely different approaches, but this mod has some pretty similar features to this

burnt hill
#

I wonder what happened to the dev of this mod

teal knoll
#

They just couldnt find a way to make it work

#

But they are prob still around

rich schooner