Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Skymatter skybox loading?

Author
Message
Tony Martin
15
Years of Service
User Offline
Joined: 5th Jun 2009
Location:
Posted: 11th Jan 2010 18:56
I downloaded the free skymatter skybox sample from TGC website.
But whenever I try and load any of them, all sides of the box are black.
I've looked at some examples that use skyboxs and they display fine. But I don't see how my setup is different than theirs.

Any advice would be appriciated and thanks!

Here's my code.

=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 11th Jan 2010 20:26
are the texture files in the right place? Their path is included in the model, so they need to be in the same place in relation to the model file.

Tony Martin
15
Years of Service
User Offline
Joined: 5th Jun 2009
Location:
Posted: 11th Jan 2010 21:22 Edited at: 11th Jan 2010 21:22
Yea, the x file and it's images are all in the same folder.

Here's it's listing:
sky01.x
shy01_b.dds
sky01_f.dds
sky01_l.dds
sky01_r.dds
sky01_u.dds

Is there anything specail you have to do to the skymatter files before you can use them?
Tony Martin
15
Years of Service
User Offline
Joined: 5th Jun 2009
Location:
Posted: 11th Jan 2010 23:47
OK, after a lot of investigating, I think I have found out why the skymatter skyboxes display as black.

The directory contains the skybox gemotery in .x format It also contains the .DDS textures for the skybox object.

I opened the .x file in Notepad and saw it doesn't reference the DDS files at all. It's looking for sky01_b.bmp, sky01_f.bmp, etc.

So I did a search & replace for ".BMP" with ".DDS" within the .x file and the skybox displays as expected now.

I checked a couple of other free skymatter samples and they reference .BMP instead of their enclosed .DDS files too.

Hmmm!! That seems an odd thing to have to do to the files, is there some other preperation step I should be doing from within my program instead?
=PRoF=
21
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 12th Jan 2010 00:53
I think maybe thats an error on behalf of TGC.

The other solution would be to convert the files to .bmp's, but .dds is a prefered image format (faster loading etc)

Tony Martin
15
Years of Service
User Offline
Joined: 5th Jun 2009
Location:
Posted: 12th Jan 2010 03:51
I just realized that means my coding was correct and the resource was in error.
Oh wow...I don't think that's ever happened in my 20 years of programming! It's an interesting, tingling sensation...

Thanks again for everybodys help.

Login to post a reply

Server time is: 2024-09-28 14:29:43
Your offset time is: 2024-09-28 14:29:43