Good Advice.
There is also another technie - which I use, and thats make code to actually BUILD the SkyBox in memory. You make a triangle ... say 1,1,1,1,1,1,1,1,1 (Basically this teenie thing - one poly... it is the center. Then you make a plain, and texture it with a image (of the 6 like TempIceK mentioned), then flip it into position, and then make it into a limb. Not necessarily in that order... hmm... I might have a partial C++ snippet if you want to try to figure it out:
//-------------------------------------------------------------------------------------------------
// DbPro Sample had 800 as Starting Size
JGC_OBJECT *JGC_TEDSKY::Apply(JFC_DL *p_ErrorDL, JGC_OBJECTDL *p_ObjDL, JGC_IMAGEDL *p_ImgDL, JGC_CAMERA *p_Cam){
//-------------------------------------------------------------------------------------------------
bool bResult=false;
JGC_IMAGE *imgFr;
JGC_IMAGE *imgLe;
JGC_IMAGE *imgBa;
JGC_IMAGE *imgRi;
JGC_IMAGE *imgUp;
JGC_IMAGE *imgDn;
JGC_OBJECT *objSkyBox;
JGC_CAMERA *oCam;
JFC_STRING *sjCurDir=new JFC_STRING();
sjCurDir->Set(dbGetDir());
if(this->SkyDir->Length()>0){
sjCurDir->Set(dbGetDir());
dbSetDir(this->SkyDir->s);
TED_Sky_Up->Set("6.png");
TED_Sky_Dn->Set("5.png");
TED_Sky_Le->Set("4.png");
TED_Sky_Ri->Set("2.png");
TED_Sky_Fr->Set("1.png");
TED_Sky_Ba->Set("3.png");
};
// c1=height of triangle
// c2=base of triange
// h=long line - hypotoneuse
//float fCamRange=p_Cam->Range_GetFar()/2;
//float c1=fCamRange*(this->TED_Sky_Height*0.01);
//float h=fCamRange;
//float c2=dbSQRT( dbSQRT(h)-dbSQRT(c1) );
float fSize=(p_Cam->Range_GetFar() * 2.0f ) * 0.66f;
int iMesh=0;
bool bTextureFlag=false;
// Load Front Image
if(bResult=(bool)p_ImgDL->LoadImageGDK(this->TED_Sky_Fr->Get(),bTextureFlag)){
imgFr = (JGC_IMAGE*)p_ImgDL->Item;
((JFC_DLITEM*)p_ImgDL->Item)->Str->ConCat("SkyBox Front");
}else{
p_ErrorDL->AppendItem("Error Loading Front Image:");
((JFC_DLITEM*)p_ErrorDL->Item)->Str->ConCat(this->TED_Sky_Fr->Get());
((JFC_DLITEM*)p_ErrorDL->Item)->Str->ConCat(" Working Dir:");
((JFC_DLITEM*)p_ErrorDL->Item)->Str->ConCat(sjCurDir->s);
};
if(bResult){
if(bResult=p_ImgDL->LoadImageGDK(this->TED_Sky_Le->Get(),bTextureFlag)){
imgLe = (JGC_IMAGE*)p_ImgDL->Item;
((JFC_DLITEM*)p_ImgDL->Item)->Str->ConCat("SkyBox Left");
}else{
p_ErrorDL->AppendItem("Error Loading Left Image:");
((JFC_DLITEM*)p_ErrorDL->Item)->Str->ConCat(this->TED_Sky_Le->Get());
};
};
if(bResult){
if(bResult=p_ImgDL->LoadImageGDK(this->TED_Sky_Ba->Get(),bTextureFlag)){
imgBa = (JGC_IMAGE*)p_ImgDL->Item;
((JFC_DLITEM*)p_ImgDL->Item)->Str->ConCat("SkyBox Back");
}else{
p_ErrorDL->AppendItem("Error Loading Back Image:");
((JFC_DLITEM*)p_ErrorDL->Item)->Str->ConCat(this->TED_Sky_Ba->Get());
};
};
if(bResult){
if(bResult=p_ImgDL->LoadImageGDK(this->TED_Sky_Ri->Get(),bTextureFlag)){
imgRi = (JGC_IMAGE*)p_ImgDL->Item;
((JFC_DLITEM*)p_ImgDL->Item)->Str->ConCat("SkyBox Right");
}else{
p_ErrorDL->AppendItem("Error Loading Right Image:");
((JFC_DLITEM*)p_ErrorDL->Item)->Str->ConCat(this->TED_Sky_Ri->Get());
};
};
if(bResult){
if(bResult=p_ImgDL->LoadImageGDK(this->TED_Sky_Up->Get(),bTextureFlag)){
imgUp = (JGC_IMAGE*)p_ImgDL->Item;
((JFC_DLITEM*)p_ImgDL->Item)->Str->ConCat("SkyBox Up");
}else{
p_ErrorDL->AppendItem("Error Loading Up Image:");
((JFC_DLITEM*)p_ErrorDL->Item)->Str->ConCat(this->TED_Sky_Up->Get());
};
};
if(bResult){
if(bResult=p_ImgDL->LoadImageGDK(this->TED_Sky_Dn->Get(),bTextureFlag)){
imgDn = (JGC_IMAGE*)p_ImgDL->Item;
((JFC_DLITEM*)p_ImgDL->Item)->Str->ConCat("SkyBox Down");
}else{
p_ErrorDL->AppendItem("Error Loading Down Image:");
((JFC_DLITEM*)p_ErrorDL->Item)->Str->ConCat(this->TED_Sky_Dn->Get());
};
};
//make base object and first limb
if(bResult){
objSkyBox = p_ObjDL->MakePlain(fSize, fSize); // Dbpro Sample had :make object plain Ted_Skybox, size#, size#, 1
fSize=fSize/2;
iMesh=JGC::GetNewID(cnMesh,1);
dbMakeMeshFromObject(iMesh,objSkyBox->ID);
//p_ObjDL->DeleteItem();// Delete Plain
dbDeleteObject(objSkyBox->ID);
dbMakeObjectTriangle(objSkyBox->ID,0, 0, 0, 0, 0, 0, 0, 0, 0);//make object triangle Ted_Skybox, 0, 0, 0, 0, 0, 0, 0, 0, 0
//front limb
objSkyBox->LimbHide(0);
objSkyBox->LimbAdd(1,iMesh);
objSkyBox->LimbTexture(1,imgFr->ID);
objSkyBox->LimbOffset(1,0,0,fSize);
objSkyBox->LimbRotate(1,0,180,0);
//add limbs for sides
objSkyBox->LimbAdd(2,iMesh);
objSkyBox->LimbAdd(3,iMesh);
objSkyBox->LimbAdd(4,iMesh);
objSkyBox->LimbAdd(5,iMesh);
objSkyBox->LimbAdd(6,iMesh);
//remove unneeded mesh
dbDeleteMesh(iMesh);
//right limb
objSkyBox->LimbTexture(2,imgRi->ID);
objSkyBox->LimbOffset(2, 0-fSize, 0, 0);
objSkyBox->LimbRotate(2,0,90,0);
//back limb
objSkyBox->LimbTexture(3,imgBa->ID);
objSkyBox->LimbOffset(3, 0, 0, 0-fSize);
objSkyBox->LimbRotate(3,0,0,0);
//left limb
objSkyBox->LimbTexture(4,imgLe->ID);
objSkyBox->LimbOffset(4, fSize, 0, 0);
objSkyBox->LimbRotate(4,0,270,0);
//top limb
objSkyBox->LimbTexture(5,imgUp->ID);
objSkyBox->LimbOffset(5, 0, fSize, 0);
objSkyBox->LimbRotate(5,270,0,180);
//bottom limb
objSkyBox->LimbTexture(6,imgDn->ID);
objSkyBox->LimbOffset(6, 0, 0-fSize, 0);
objSkyBox->LimbRotate(6,90,0,180);
// these were commented out in DBPro Example
//`set skybox properties
//`tempscale# = sqrt((Ted_cam_Range#^2)/2)
//float tempscale=this->TED_Sky_Height*8;// = 800;
// set object Ted_Skybox,1,0,1,0,0,0,0
// This means: Set Object Objid,
// wire,trans,cull,filter, light, fog
//objSkyBox->Set(true,false,true,false,false,false);
objSkyBox->Set(false,true,false,true,true,true);
//objSkyBox->Scale(tempscale, this->TED_Sky_Height, tempscale);
//objSkyBox->Scale(tempscale*4,tempscale,tempscale*4);
if(this->TED_Sky_Height==0){this->TED_Sky_Height=50;};
objSkyBox->Scale(100, this->TED_Sky_Height, 100);
objSkyBox->TurnLeft(90.0f); // make sun match ted sun angle default and sun in corner
objSkyBox->FixObjectPivot();
//objSkyBox->ZRead_Off();
//objSkyBox->ZWrite_Off();
};
if(SkyDir->Length()>0){
dbSetDir(sjCurDir->s);
};
delete sjCurDir;
if(bResult){
return objSkyBox;
}else{
return 0;
};
};
//-------------------------------------------------------------------------------------------------