How do you make a skybox material in Ofusion?.

Evak

08-03-2008 21:26:37

I have never been able to get ofusion to let me create a skybox in the scene settings. I havent really got a clue how it works and previously just loaded the Example.material file and swapped my texture names.

Now I want to use fog so I need to be able to edit the skybox material in the material editor and the scene settings dialogue.

When I startup Max and enable the Ofusion viewport, go to scene settings and select skybox, the default snow skybox that uses 6 Jpg files appears.

Now I'm not sure what to do because there are no instructions. So I made an educated guess.

1) I assume the [put in mtl editor button], puts the current skybox material in which ever material editor slot number is in the spinner on the right.

When I click on [Put in Mtl Editor] nothing happens...

2) Since nothing happened, only thing left is to click on the [None] button next to material in the Scene setting panel. This brings up the material/map browser. No material exists so I click on Ofusion Material.

get a popup that Skybox needs a cubemap material with 6 textures/frames. Hmm!. Not sure what to do here and can only press ok, the skybox in the viewport disappears and Material #25 appears in the button previously labeled [None] in the Ofusion scene settings.

(I'm still stumped)

3) ok, if I now click in the [Put in Mtl Editor] button, Material #25 appears in slot 1.

I guess I am supposed to make a new material from scratch. s I add technique, pass, texture unit
------


I don't have a clue how to reproduce the cube map from 6 seperate jpg's like the Ofusion Skybox Example material has. (Some kind of tutorial would be good for this). I have 6 jpgs labeled correctly, but the default skybox material doesn't use _UP _DN etc.

I do have a DDS cubemap from an ogre example called CloudyHillsCubemap2.dds, don't know how to use it really but try anyway, so I add it to the texture unit Bitmap. and select cubic from the combobox. Nothing happens to my viewport.

Anyway, I really don't know what to do here. I was hoping that the [Put Min Mtl Editor] button would put the current skybox in the material slot for me to look at as an editable example.

Sorry for the long post, wasn't sure how to explain the steps I tried any other way. Currently, I'm wondering if perhaps its broken?

Any help would be appreciated, thanks...

Lioric

10-03-2008 00:53:26

To use a sky material, you create a material in the editor, then use the "material" button in the sky properties group to select and use it

If you selected a sky of type skybox you need first a material with 6 frames in the first texture unit (add them in the "Frames" section of the TextureUnit)

A tutorial for using and creating sky materials was added to the list and will be posted asap

Evak

10-03-2008 05:41:21

Hmm, thanks Lioric. I might be able to figure this out from your explanation, but a simple tutorial that shows basic steps in the UI would be really handy.

I noticed a few people on the forums having problems in the past but no solution.

Gormio

26-03-2008 11:29:52

I'm also trying to create materials for skyboxes in oFusion

If you selected a sky of type skybox you need first a material with 6 frames in the first texture unit (add them in the "Frames" section of the TextureUnit)

I tried this method but it didn't seem to do what I was hoping for. If I add frames to the texture unit it creates an anim_texture to the material. What I'm after is a cubic_texture.

I found out that I can create a cubic texture in the texture unit by selecting the cubic type next to the bitmap selection box. But this creates a cubic texture line to material script that looks like this

cubic_texture cube.png combinedUVW

But I want to define my six cube textures separately like

cubic_texture cube0.png cube1.png cube2.png cube3.png cube4.png cube5.png separateUV

I think there should also be an option to set the combinedUVW or separateUV in the material editor.

Evak

26-03-2008 16:50:10

I still havent had any luck with the skybox, even with existing cube textures like CloudyHillsCubemap2.dds.

I've loaded CloudyHillsCubemap2.dds into the texture unit, set it as cubic, added 6 frames.

Here's a pic that shows the settings and results of my attempt at adding a sky material created in the material editor.



I can see that it loaded the textures and is drawing some of the colors stretched over the skybox. But the mapping is wrong like its mapping is stretched from one corner, same image and mapping on all 6 sides..

I'm assuming that the skybox material feature does work and I'm missing something really simple since the texture is appearing on the skybox just incorrectly.

Evak

26-03-2008 18:46:37

OK. I mostly figured it out. I had a problem in that sometimes texture unit settings would not update in ofusion, even after clearing the scene first and then updating.

I had to do a hold and fetch to reload the scene. Then it would update the Env Map type in the texture unit dialogue. It seems that all I had wrong was Env Map combobox wasn't updating so off, planar, shperical, reflect all seemed to produce the same result, setting it to reflection made the skybox work after I reloaded the scene with hold fetch.

Lioric

27-03-2008 01:40:34

Several fixes and updates has been implemented for the sky support, they will be provided in the next update