Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 10-May-2012 18:57:37

dhika11march
Member
From: Indonesia
Registered: 30-Mar-2012
Posts: 227

How to add skybox?

Hi,

I want to add skybox, but I don't know how to do this.

I have been make a sky box with SpaceScape and I have two file, first .xml and second .jpg (6 file)

When I opened OS3D, I set the skybox menu in the scene but I don't know to add my file so that it can appeared in the scene.

Please give me some step to do this..
Thanks!

Offline

#2 10-May-2012 22:04:26

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: How to add skybox?

you should try to create your sky material manually this time and add the material as a resource in the scene
and then apply it to the skybox
Try a search on the forum this kind of question has been already answered.

Offline

#3 13-May-2012 18:02:05

dhika11march
Member
From: Indonesia
Registered: 30-Mar-2012
Posts: 227

Re: How to add skybox?

i have been set material manually,

-------------------

material planet-skybox
{
    technique tech-skybox
    {
        pass pass-skybox
        {
            ambient 0.588235 0.588235 0.588235 1
            diffuse 0.588235 0.588235 0.588235 1
            specular 0 0 0 1 10

            texture_unit
            {
                texture xx/skybox/semesta_back6.jpg
            }
        }

    }

}

---------

but why the skybox plugIT can't detected this material?

Offline

#4 13-May-2012 23:07:51

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,161
Website

Re: How to add skybox?

did you add this material file as a resource on the scene ?
(right click on scene > add resource)

Offline

#5 14-May-2012 03:02:22

dhika11march
Member
From: Indonesia
Registered: 30-Mar-2012
Posts: 227

Re: How to add skybox?

of course!
and i have been check at resources directories wheter my material was successfully imported or not, and it the material successfully imported,
but every I add skybox and then edit settings, there isn't material was detected.

thanks!

Offline

#6 14-May-2012 16:59:04

Nodrev
Scol Language & OS3D developer
From: Nantes, France
Registered: 29-Dec-2009
Posts: 197

Re: How to add skybox?

Did you added the textures resources to openspace3d too... ?
Otherwise, your material is incorrect, that's not a skybox material... It do not contain a "cubic" texture, so it can't be used as a skybox. It should be something like:

material planet-skybox
{
	receive_shadows off
	technique tech-skybox
	{
		pass pass-skybox
		{
			lighting off

			texture_unit sky_map
			{
				cubic_texture xx/skybox/semesta.jpg separateUV
			}
		}

	}
}

With your 6 image files named (http://www.ogre3d.org/docs/manual/manual_17.html#SEC83):

semesta_bk.jpg
semesta_dn.jpg
semesta_fr.jpg
semesta_lf.jpg
semesta_rt.jpg
semesta_up.jpg

When it comes to materials scripts, or Ogre's related script, Ogre's manual is very usefull: http://www.ogre3d.org/docs/manual/index.html#SEC_Top

Last edited by Nodrev (14-May-2012 17:05:17)

Offline

#7 14-May-2012 17:37:01

dhika11march
Member
From: Indonesia
Registered: 30-Mar-2012
Posts: 227

Re: How to add skybox?

ok, thankyou
i will try soon

Offline

Board footer

Powered by FluxBB