Opinions on godrays in VR

So recently I began to work as a Tech Artist Intern with a company who is making an indie game for VR. I have learned a lot while working for my wonderful company, and recently began learning how to program materials for post processing volumes. The game is underwater, so my next task is to try to figure out how to replicate god rays for underwater. The challenge is that we are using forward rendering, so we only get one transparency use per game. But even then we want to try to avoid this. My solution so far has been to use simple solid opacity masks, which are much cheaper.

What do you guys think about the subject? From what I can tell accurate godrays can be distracting to the player, so I’m wondering if it would really just be better to fake the effect. I have a theory for faking the effect using a cone, the position of the sun and then the player’s camera, but I also wonder if trying to make actual godrays/studying other people’s code would be better.

I am fairly new to tech art, but I understand art and basic programming. Unfortunately the company is small, so I’m just learning everything on my own right now.

btw right now I’m learning more about god rays. :joy:

I’ve been tackling most of my problems by 1) Researching 2) Writing down theories 3) Research the theories 4) Execute, research and Frankenstein tutorial information until you figure out whether to keep or dump the theory.

Then also writing everything down so I don’t have to do the mental labor of keeping it all in my head. It has worked pretty well so far!

An update if anyone is following this.

I have chosen violence, also known as trigonometry. I’ve decided to use the player’s camera position and the position of the sun to try to fake the godrays, as everything I have found so far is way too expensive/useless for the quest. I am not sure if I can share my math with everyone, but if you think about it you can probably figure out what I did. I will share how it turns out if I can get it all working!

Let me know if anyone else is interested, or has some coding Post Process Materials in UE4 in VR advice. Thank you!

usually I would say god rays are a just a nice artist choice but they can be annoying as a player though you mention your project is under water so you might be able to get away with it. your thoughts of using a cone with a strong light sounds like a decent idea

I have chosen violence, also known as trigonometry.
first of all this is funny.

second of all yeah this seems like a better idea

Haha, thank you. I did get the geometry working, and the equations seem to work. Next I will just need to work on the material itself. It may be the only transparent material we use, or it will be a very well faked half masked effect. If we do not end up using it then we will have some neat functions that we can use in the future! :smiley: