Radagasd / Radagasd.github.io

My personal website: https://radagasd.github.io
1 stars 0 forks source link

Supermassive black hole tutorial | Kelvin van Hoorn #3

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Supermassive black hole tutorial | Kelvin van Hoorn

Kelvin van Hoorn’s website for technical art

https://kelvinvanhoorn.com/2021/04/20/supermassive-black-hole-tutorial/

Goncalo-Chambel commented 2 years ago

Hey!! Great tutorial! I was wondering if I could use this shader to make my own project and make a tutorial for it. Of course regarding the shader part I would say it was done by you and redirect people to this page. Thank you in advance

Radagasd commented 2 years ago

Hi, Glad you liked it. As long as you reference back to me and this page you're good to use it for anything 👍

Y3llwOnGits commented 1 year ago

Can I use it for the game I am building? I don't know for sure if I'm gonna use it, but if I charge anything for it, do you mind? Ofc. I will credit you but I want to know what your'e okay with as I understand if you don't like that.

Radagasd commented 1 year ago

Can I use it for the game I am building? I don't know for sure if I'm gonna use it, but if I charge anything for it, do you mind? Ofc. I will credit you but I want to know what your'e okay with as I understand if you don't like that.

Yes, you can use this tutorial in your projects, including commercial ones. The credit is greatly appreciated.

Y3llwOnGits commented 11 months ago

Hey Kelvin,

I edited the shader a bit to work in vr single pass, but when I come close in vr then I see a bit of blue getting warped. When I view the game trough the game window and set it to Occlusion mesh instead of Left Eye, I see both eyes, with a blue ring around it. Now, It seems that the blackhole shader stretches the blue from out of my view. Do you maybe know how to solve this issue?

Radagasd commented 11 months ago

Hey,

I don't know much about VR rendering, as I've never made a shader for that. However, if it really "stretches the blue from out of my view" you might need to clamp the distortedScreenUV. I pressume it doesn't happen if you replace the distortedScreenUV with just the screenUV?

I would not be suprised if VR screen UVs are a bit different than normal screen UVs, so you might need to look into that a bit.

Y3llwOnGits commented 11 months ago

Okay, thanks anyway. For now I just use half the amount of stretching you originally set to avoid it but I also noticed that for the right eye the warping seems off, I’ll look deeper into it.

Thank you tho!

JasonBlain commented 11 months ago

This is lovely. I moved it into another URP project and it's rendering a grey background with the black hole.. how do I get it to instead fade/alpha to the regular scene color?

Radagasd commented 11 months ago

@JasonBlain I'm sorry but it is hard to debug that. It might just be that you are missing the opaque texture. Check your Universal Render Pipeline Asset to see if the opaque texture is enabled.

JasonBlain commented 11 months ago

Yessir it was the Opaque texture, thank you