cancel
Showing results for 
Search instead for 
Did you mean: 

How to apply the Rift specific skybox?

adam
Honored Guest
Hi,

I've made the unity car-tutorial rift-ready (see here).

I want to switch to using the special Rift skybox but don't know how to go about it.

Could someone provide the steps to take the skybox from the rift-unity integration packages and apply them to another scene/project?

Thanks, Adam
76 REPLIES 76

Marbas
Honored Guest
Thanks Nora for fixing these minor issues. Works perfect! 🙂

jmorey
Honored Guest
I cannot get Nora's script to run. I am doing the following:

1. Creating a sphere object and scaling it up.
2. Attaching Nora's script to the sphere object.
3. Setting the Skybox parameter to a Mobile/Skybox that I have setup with my textures.

The sphere object just appears without any texture, inside or out. This is the same in both scene and game mode. Any hints as to what I might be doing wrong?

Thanks,
Joel

Cheshyr
Honored Guest
I'm going to add my rookie voice to this question. Can someone give a brief description on how to use the script?

I've imported the SkyBox prefab from earlier in the thread, and it appears to work great. With a little work, I can build out the tiles.

At this point, I create an Empty Object, and assign the script. I assign a follow object, and then I have 2 materials left to attach... which is my first point of confusion. If I attach a Material to the skybox variable, it will render the color, but not the texture, regardless of the shader I associate with the material. The second Material variable, just labeled material, leaves me confused.

Does this script preempt the prefab? What is proper usage?

brendenfrank
Honored Guest
I have the script working, instructions are as follows:

1) Make an empty game object
2) Attach the script
3) Drag your (previously unity skybox) material onto the "Skybox" slot
4) Run the game
5) In the scene hierarchy tab, expand the empty game object to find that several planes were created and mapped to your skybox texture. These planes form a physical box around the player if your Radius is set correctly,

Note: if using a box, turn the segments down to 1 or else you are just wasting polygons.

---

JMorey, the object you place the script on will not get a skybox mapped to it. The script creates the mapped object automatically and assigns it as a child of the object your script was run from.

Cheshyr
Honored Guest
Thank you for the step by step. I followed your instructions, and everything worked... except the textures were empty. The problem must be with the Skybox textures I'm attempting to use. Now I just need to find a way to convert them from cylinderical reflection map into a standard skybox map. 😕

Thanks again!

brendenfrank
Honored Guest
Glad to hear it worked out.

The material you want to use is RenderFX/Skybox
It should have a Front/Back/Left/Right/Up and Down (optional and usually never seen).

Cheshyr
Honored Guest
Right. I've got a texture pack I want to use that runs a RenderFX/Skybox Cubed shader to translate his cylinder reflection map to the standard skybox. It's getting all twitchy when I try to use it with this script... texture never shows up; just white planes. I've contacted him about it, but in the mean time, I'll likely have to find a way to convert his texture to the legacy 6-sided cube manually.

Either way, if I use normal skybox maps, works great.

Cheshyr
Honored Guest
I wanted to post the answer I found to my own question... how do you take custom images, and break them out into skybox components? I've found 2 methods so far. Note; i'm a rookie, so these may have been obvious to the real developers.

If your skymap is a single texture, already rendered Equirectangular, Cube, Cube Cross, Mercator, or Gall-Peters... your problem is solved. Use Planettool (command line), and crop the results with Photoshop or some other image editor (Note Photoshop PNG export causes seams; import directly from PSD to avoid these).
planettool

My other solution was to generate the scene in 3DSM, then capture it using the Reflect/Refract Map tool.
Ogre Forums Thread
Autodesk Documentations

This method has its own set of gotchas: the new Slate Material Editor blocks in-line rendering calls from their reflect/refract tool. You need to run the 'Pick Object and Render Maps' while in Compact Mode. Also, check your ambient lighting levels.

I found the first method created cleaner images, but the second was usable with more diverse environments. Combined with Nora's SkyboxMesh script from this thread, you should be happily immersed in your virtual sky from now on. I've been importing AllSky, and it's beautiful.

BrianNew
Honored Guest
Fantastic, Nora, Thank you.

Becoming
Honored Guest
Thanks for this script, very handy!! Does it do anything special or is it just a mapped cube/sphere following the player? I'm artist and no programmer so its not obvious for me from looking at the code... however, i have a little problem with it... it does work well but when i look up to about 45° to 50° angle the skybox gets much brighter... its only on this very little angle though.

Its not because of the farclip plane, i have checked this. but other than that i'm clueless :?: