Skybox issues...

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Skybox issues...

Post by JP »

I've made a skybox in my non-irrlicht, opengl game but it's not as good quality as irrlicht's skybox...

If i load my skybox textures into irrlicht then they're rendered at the same quality as the textures being loaded but in my game they're quite pixelated...

Am i right in thinking that the irrlicht skybox is just a 10x10x10 cube? In my code i'm rendering a 10x10x10 cube also so i don't know why the quality is so different :?

Does anyone have any ideas?
Image Image Image
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

mip mapping, maybe? my guess could be inside the engine its making it lower quality...

Thats my guess :X
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Yeah i already don't mipmap the textures and i don't think mipmapping them makes it any better or different anyway :?
Image Image Image
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Maybe you have enabled some filters in Irrlicht, like bilinear, trilinear, anisotropic.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Is it this bad? (See image below)

That's taken from the Non-Irrlicht OGL engine I have, and the skybox don't look good as well.

The image is 512x512, maybe it needs to be larger to remove the jaggies.

The size of the cube is 1000x1000x1000.

By the way, the checkered flag was the code I copied from the OpenGL Redbook.

Image
Image
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

CuteAlien wrote:Maybe you have enabled some filters in Irrlicht, like bilinear, trilinear, anisotropic.
Read my post, it's a non-irrlicht project ;)

dlangdev: It's as bad as that, if not worse... (and strangely that looks very familiar... is it from terragen?).

I'm going to try making the textures 1024x1024 and maybe blurring them a bit to try and improve the quality but it should be fine at 512x512 because it displays nicely in irrlicht so there's obviously something wrong with my rendering...

I'll describe a bit how i render it...

I've got a standard 1x1 quad which i use all over my engine to draw textures and then i scale the quad with a matrix up to the desired size. To be honest i'm unsure what effect that has on rendering; scaling rather than having an un-scaled quad of the same size... That's basically the only thing i do differently to irrlicht i think. I did try to draw a 10x10 quad instead of a 1x1 scaled up to 10x10 but it strangely messed up my translations so i no longer had a cube but a load of quads all over the place, and i don't think it particularly helped the quality, might look into it again tomorrow if i've got time.

Oh and the rendering is all done with shaders, no fixed pipeline stuff. It's meant to be much quicker!
Image Image Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Yup, it's from terragen and a heightmap from a 256x256 bitmap.

glScalef()'ing a vertex, or probably using a matrix to scale a set of vertices will not affect texture quality, as they are on different step of the pipeline. And since you are going straight to the programmable route for vertex/pixel, I don't see any reason why the transform would have any influence on it.

Maybe this could work, I've not tried this yet on my engine:

1) Turn mipmap on and see how they behave in the shader pipeline.

2) Show a screenie, I've been waiting for that a long time.
Image
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

yeah i'll post some screenshots tomorrow. I tried generating mipmaps and it didn't seem to affect the quality at all...
Image Image Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Nice to know you've tried that, I'll keep a note of it and see what else I can do on my side. The Engine I'm slowly building will be needing that sometime in the future.

Keep me in the loop, as I also need to know the solution.
Image
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

JP wrote:
CuteAlien wrote:Maybe you have enabled some filters in Irrlicht, like bilinear, trilinear, anisotropic.
Read my post, it's a non-irrlicht project ;)
I did - and you wrote it looks bad compared to the quality of the irrlicht skybox. So I'm still guessing the same thing... that you maybe do use different filters in your project than you use in Irrlicht for comparing the skyboxes.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Ahhh... my bad... that's a good point i suppose. I didn't enable any filters in irrlicht (just used the helloworld project and i don't think that has any filters, i only changed it to 32bit depth, though is 24 the max? That's what i've got in my OGL project it seems..). But maybe irrlicht automatically uses some filters for the skybox, i'll see if i can spot anything in the source...

Here's a shot of the bad skybox:
Image

Here's a shot of the same skybox in irrlicht:
Image

Here's a shot of a new 1024x1024 and slightly blurred skybox i made this morning:
Image

Here's the source image:
Image

As you can see, irrlicht renders it pretty much perfectly but my game renders it rather nastily! One thing to notice i suppose is that you can see more of the box in irrlicht, so i suppose that means it's being rendered larger or something... I'll try and fiddle around with the size of my skybox but i don't think it makes much difference...
Image Image Image
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Off topic, but that water looks good enough to drink.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
twilight17
Posts: 362
Joined: Sun Dec 16, 2007 9:25 pm

Post by twilight17 »

rogerborg wrote:Off topic, but that water looks good enough to drink.
[also off topic] OH WOW! that water looks amazing
Post this userbar I made on other websites to show your support for Irrlicht!
Image
http://img147.imageshack.us/img147/1261 ... wernq4.png
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Am I seing this right? your skybox in the other engine seems HUGE.
Aka, a pixel every X meters. Try shrinking it. A lot.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

It looks too near.

Try scaling the cube to 500 or 1000.

Also, you may need to re-generate the skybox images to blend with the elements.

Also tweak the FOV settings from 45 up to 60.

Try playing around with aspect ratio as well.

You'll be able to match the settings of Irrlicht in no time.
Image
Post Reply