[Release] A Mod that Fixes Culling in Boneworks and other Unity Games for Pimax & StarVR One!

I have very exciting news to share with you guys! I’ve created a mod that fixes the culling/objects popping in and out issue on wide FOV headsets like Pimax or StarVR One for Unity games. This mod fixes culling in Boneworks. To use it with other Unity games, you may have to make slight modification to the source code. Credit to KoochyRat for the original code I used in making this mod: (GitHub - koochyrat/SteamVRFrustumAdjust: For canted headsets like Pimax, calculate proper culling matrix to avoid objects being culled too early at far edges in Unity. Prevents objects popping in and out of view)

How to install the mod:

Download CullFix.dll from here:

  1. Go to https://melonwiki.xyz/ and install MelonLoader onto the Unity game you want to mod.
  2. Run the game once and then close it.
  3. Go into your game directory and place CullFix.dll inside the Mods folder
  4. Run Boneworks and enjoy a culling free experience!

I’ve tested it out in Boneworks and it works perfectly :slight_smile: There is no more objects popping in and out of my peripheral anymore. There’s no need for parallel projection to play Boneworks now. And there is absolutely no change in the performance of the game.

Please see the README in the github project for instructions on how to modify the code for compatibility in games that don’t use the “ValveCamera” class.

@mixedrealityTV @vrftw @JMagnat @crispybuttphd @VR-TECH

36 Likes

Awesome Dmel! Your efforts and contributions to finding solutions for PP is outstanding!
:beers::pi_smiley::+1::sparkles:

8 Likes

May I call you “Golden God” from now on forwards? :slight_smile:

9 Likes

Nice job! See if you can also do it with the Unreal Engine games, although I don’t think that’s possible, without recompiling the original game code.
Unfortunately, each simulator usually has its own graphic engine.

4 Likes

im guessing theres no way to roll this into the new Pimax Experience.

It’s possible if Pimax Experience software automatically installs MelonLoader on the Unity games with culling and place the dll in there. Right now the dll only works on Boneworks it seems. MelonLoader is open source.

I’m looking into patching VRChat and haven’t found the right class yet.

3 Likes

Its funny , reading the technical explanation as to why the culling happens in the first place , and how simple it is to fix. Makes me real mad at the twerps at UploadVR for trying to lay the blame for objects popping in at Pimaxes feet.

These fools dont even realize , none of this is Pimaxes fault, its game engines refusing to catch up with Pimax.

The fact that Pitool even allows you to run with PP off at all is a minor miracle. I mean sorry Upload Schills, Pimax is an advanced headset that takes the training wheels off of VR and these sorts of things are the result.

But those clowns can’t stop hating on Pimax long enough to read @risa2000’s website and educate themselves to give Pimax a chance.

7 Likes

Unreal Engine doesn’t require this fix as I believe it uses two cameras for culling. I’ve never seen a single UE4 game affected.

In the far future, this will also be fixed for Unity as I have seen the OpenXR plugin source code which also uses two culling cameras for multi pass rendering. For single pass it would still happen though.

6 Likes

I’m not sure how MelonLoader works, but maybe you could just try using Camera.main. That’s what I use to easily find the camera.

Awesome job on the patch! I hope you can make a ‘universal’ mod for all Unity games.

3 Likes

I’ve been looking through VRChat, Pistol Whip, and Blade & Sorcery and cannot find a solution. I try the class names I found and MelonLoader gives me an error saying the Hook method I’m calling returned null. It seems it only allows access to local classes and not those in other namespaces. I’ll have to look into an alternative. Also I wanted to patch Onward culling but they have EasyAntiCheat which would need to be bypassed first.

2 Likes

If you find a solution that makes PP redundant for XPlane-11, some users will surely build a temple for you.

3 Likes

I can only try to fix games that do object culling in the periphery. For games that superimpose the same image in each eye such as Elite Dangerous and Project Cars 2, PP would still be needed.

6 Likes

I think that, apart from culling, there would still be double image problems to be solved in order to eliminate parallel projections.

That’s right.

5 Likes

Every simulator has its own “in house” engine.
The only solution would be for Pimax to develop code that studios could quickly incorporate into their programs and to convince these studios to add it to their code, including Valve.
They can’t wait for the current studios to bother changing their code for just a few users.
I left Pimax an Excel with the engines and studios of quite a few games, as a reference of who to call. Of course, if you don’t call them and don’t convince them somehow, it’s useless.

6 Likes

yes, and x-plane has the worstest ever.

laminar research has already said that they are not interested in offering individual solutions. In her opinion, Valve should take care of it in SteamVR

2 Likes

That would be great!

@SweViver Hey Marcin, could you please take a look at this probably great automatic feature if one/you can implement it in one of future Pimax Experience editions? Thx in advance for considering!

4 Likes

This type of feature like other automated features should be a settings option as some games might not need this fix.

Otherwise a great idea.

1 Like

and valve did it in certain way, PP always on for the index, we can do the same with pimax but its not the solution we want

1 Like

I’m working on fixing culling in Blade & Sorcery. I asked around on the Blade & sorcery discord and someone told me the main Camera is called in the PlayerHead class.

So full class name is: ThunderRoad.PlayerHead and it has functions OnEnable and OnDisable and it references this.cam which is the UnityEngine.Camera class. Camera class has FireOnPreCull. I might have to use the official B&S SDK to make the mod instead of MelonLoader.

4 Likes

What other Unity games do you guys most want to see culling fixed?

3 Likes