Few questions (okay, in fact: lots of questions)

Started by
23 comments, last by Marco H 19 years, 3 months ago
Hi, I have got several question, but I do not like to open mutiple threads, so I will put everything together ;) 1. About the jpeglib. Has someone used it right now? I included all the needed headers and added the libjpeg.lib to my project, but the linker kepps telling me about the undefined references to the functions. Did I miss something? 2. The background again. My project mate keeps nagging about the big textures he has to use when taking skyspheres. He will not take skyboxes, as he realistic background with nebulas and so on. His idol is a game called "X-Tension", where the programmers used little textures (less than 256x256) to fill almost the whole sphere in good quality. He thinks there must be a trick, but I do not think that something like this is possible if the whole texture is mapped on the sphere. Perhaps you have got an idea? 3. Is there any way to control the "repetition rate" (I hope you know what I mean) of the monitor via OpenGL? In other programs there is sometimes the option to set the repetition rate to 60Hz or higher... but I did not hear of that in connection with OpenGL. Perhaps you can give me a hint? 4. That was already all =) Thanks in advance, Marco *the guy who doesn't stop asking ;)*
Advertisement
1. don't use jpegs as textures, they are bad, use libpng or openIL.

2. a skybox has less distortion than a skysphere and thus needs smaller textures to acheve the same result.
If it's only a starfield it's possible to use the same texture for all faces.
A good skybox is something that enhances the game by a lot, it is totaly justified to use 512x512 textures.

3. the refresh rate is set either by the driver if you use windowed mode, if you use fullscreen mode i think the refresh rate can be set manualy.
If not, it defaults to the previous refresh rate.
but it isn't done with openGL, it is done in windows.
Quote:Original post by lc_overlord
1. don't use jpegs as textures, they are bad,

Jpegs *can* be used as diffuse textures if you use low compression/high quality. But it's true that they are really bad for normalmaps.

Quote:Original post by lc_overlord
2. a skybox has less distortion than a skysphere and thus needs smaller textures to acheve the same result.

It totaly depends on mapping/coordinats. You can map dome in a way noone will be abe to tell if its a dome or a box.

Quote:Original post by Marco H
Is there any way to control the "repetition rate" (I hope you know what I mean) of the monitor via OpenGL? In other programs there is sometimes the option to set the repetition rate to 60Hz or higher... but I did not hear of that in connection with OpenGL.
Perhaps you can give me a hint?

Its refresh rate. Take a look at ChangeDisplaySettings.
You should never let your fears become the boundaries of your dreams.
Quote:Original post by _DarkWIng_
It totaly depends on mapping/coordinats. You can map dome in a way noone will be abe to tell if its a dome or a box.


True, but a skybox still has a more even distibution of texels and less texture distortion than any sphere or dome projection method.
Not to mention it's a lot more easier than doing some custom spherical projection.

the only thing that would be better would be to use some type of spherical texture format(it's on my list of things to do), but sadly it's not supported by any harware, i wish it was.
Quote:Original post by lc_overlord
1. don't use jpegs as textures, they are bad, use libpng or openIL.

I will give it a look (in fact, my project mate wanted jpeg, because of the new jpeg2000 standard, which is not a bad choice in my opinion).
But as I almost got it - why not use it? Do you have some hints to solve my linker-problem?

2. Skyboxes are fine, but what if I want to place a huge nebula in my game? Are the the edges visible?
As I said, my mate keeps nagging about the little textures he had to use in connection with domes in another game (he modded it very intensively) to achieve good quality results. Is something like that possible if the texture is mapped onto the whole dome?
Edges will not be visible if you do it correctly.
alternatively you could render the nebula in there separatly on top of the skybox.

IT's all up to how mutch detail you want in the game.
Details should be that far as others wish it. I designed my game to be very friendly to modders, as they can create new sectors and objects (stations, ships, nebulas etc.) without any problems.

So, my program reads text-files, which include the neccessary data. The skybox or skydome is only a 3d-model, so one can decide what to use. Normal placed objects and static objects (you can never reach them, like the moon in the real world as you are driving in your car ;) ) are selectable, billboards will be added soon.

But in fact that is not my problem ;-) The question was, if there could be a little texture mapped on a big sphere without losing its quality. I suspect this option does not exist, as the texture will always be stretched, right?
nope. you can repeat your textures over the dome
Hello,

I do not want to start a new thread, so I use this one, as the title still fits :)

I finished implementing the jpeg-loader and it seems to work, but somehow the images are morrored horizontally. How could I avoid or change this? Swap the image data somehow perhaps?
You could flip it when loading or change mapping coordinats.

Its flipped compated to what? TGAs? If that is so then I thing the TGAs loader is wrong since TGAs are somethimes saved in flipped way. Theck format specification. There is a bit in header that tells if you need to flip it or not.
You should never let your fears become the boundaries of your dreams.

This topic is closed to new replies.

Advertisement