10-13-2019 07:13 PM
01-30-2022 02:18 PM - edited 01-30-2022 02:19 PM
As long as you know the original camera height and the sky sphere is larger, you can place the floor where ever. But for a drone, probably not as useful. 🙂
Although... if you had a log of the drone's altitude, you could make the floor plane match, so as the drone goes low (or lands) the ground will flatten the sphere at the correct position. 🙂
One day I'll come back to that depth generating technique I mentioned above that required user editing of the panorama. It was interesting, but editing the panoramas was time consuming.
10-02-2022 01:05 PM
Hello this looks very promising. I have just now stumbled upon this, i was also interested how i can make more realisting environments with 360 panorama and projecting on to a plane the bottom i think helps a lot.
Using the shader you posted works but does not do the trick for me. It is not quite clear how you were able to make it work so well on the device. Do you think you can share more details like how big the sphere is, how big the plane is, does this work only for 1 camera, maybe even a github project?
10-04-2022 03:47 AM
I'll see if I can knock together a quick demo (with source) tomorrow.
I had the sphere as around 20m (iirc) and placed the floor at -1.7m. It works with stereo rendering.
The shader requires the camera to be placed at 0,0,0, so that's why the floor is at a negative. That would be easy to offset though.
10-04-2022 08:29 AM
Can't wait to see! This is gonna be wild.
10-05-2022 01:11 AM
I got distracted porting System Shock 2 to Bonelab. 🙂
But I've got a demo working. It supports Rift and Quest and uses UltimateXR (for the avatar).
I just need to trim down the bloat (Oculus SDK and UltimateXR combine to over 1.4GB, a lot can be cut) and track down the licensing of the sample panoramas I used. Then I'll post a repo.
Correction to the above: my testing today shows a sphere size of 150m makes the sphere to ground transition much less obvious. But that does require large outdoor areas to avoid distortion.
10-06-2022 05:28 AM - edited 10-06-2022 05:30 AM
Ok, got it up.
Here's a full repo of a Unity 2012.3.5f1 project showing the technique.
Binaries of Quest and Rift demo builds are there too. (Tested on Quest 2 and Quest 2 Airlink)
Yeah, the build got a bit big, I think Unity expanded all the panoramas to raw and they are 8K.
The really useful bits are just the shader file (already posted) and a simple .cs file to cycle and turn the floor on/off.
I had to add a timed credits panel. 3 of the 6 panoramas I used as samples are from the European Southern Observatory. Their website has a huge collection of insane resolution 360 panoramas of radio telescopes. But their licensing requires that a credit line must appear directly connected to the display of the panorama (not in a separate text file, etc). So I just make a 4 second panel appear in VR with the credit.
Press A on the right touch controller to cycle through the 6 provided panoramas. Press B to toggle the floor effect on/off (the whole point of this).
Or maybe it was B to cycle/A to toggle. I've already forgotten. 🙂
I stripped out the UltimateXR stuff, it was causing problems. So no hands. I also removed around 400MB from the Oculus SDK (sample stuff) to get the size down.
https://github.com/kojackdev/PanoramaTest
(This is much more simplified than the demos from the first post that didn't come with source. There's no floor tilting, 3dof and 4dof modes, custom floor heights saved per panorama, etc)
10-07-2022 11:11 PM
Cool, can i test it with my own images? Maybe copy to some folder?
10-08-2022 12:57 AM
At the moment it only shows ones set up in Unity on the PanoramaController object (there's a texture list there). So you'll need to rebuild it to see anything different.
I could probably add in general searching in a folder, I just don't want to deal with user interface stuff. 🙂
10-08-2022 01:01 AM
yeah, just list the app picture folder is fine 🙂
10-10-2022 07:31 AM
A present for you. 🙂
There's a binary on the github called PanoramaTest_Quest_BYO.apk. It looks in the Quest's Pictures folder for jpgs and pngs and uses them. No built in ones are provided (which did help shrink the apk from 460MB to 25MB).
It reloads a panorama every time you show it, that has a delay (they can be big), but it won't take up more memory than a single pano at a time.
Hopefully it works, I hate dealing with android manifests and permissions and crap. It took a while just to get file loading from Pictures to not fail.