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
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Well correct me if I am wrong, but if you display 512x512 texture on screen which is say 800x600 pixels large than without something like antialiasing or filtering result must look pixelated. And problem is even worst here since you do not draw whole 512x512 pixels at the time but much smaller area. If you would use same fixed functionality of OpenGL as Irrlicht do to render textures then result must be the same ...I guess.
Dorth is right, what I see from screenshots is that you draw much larger part of skybox texture in Irrlicht than in you project. That might well make the difference. That or some filtering.
twilight17
Posts: 362
Joined: Sun Dec 16, 2007 9:25 pm

Post by twilight17 »

well heres my guess... Either OpenGL is scaling it up by a huge amount.. or shrinking it. I'm a newb.
Post this userbar I made on other websites to show your support for Irrlicht!
Image
http://img147.imageshack.us/img147/1261 ... wernq4.png
Kojack
Posts: 67
Joined: Sun Jan 20, 2008 2:39 am

Post by Kojack »

If you take the source 512x512 skybox and scale it up by around 320% it matches the size in the first bad skybox pic. It's also very similar quality, I just did it in photoshop and the results are nearly identical (blurred). If in your irrlicht test you moved the camera closer to the panel showing the texture until less than half of it was visible, it should look similar to your engine's shot.


Your screenshot:
Image
Scaling the source sky texture by 3.2 times in photoshop and cropping to 800x450:
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Hmm, it could probably be the UV coords not set properly, eh?
Image
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Ahh yes, fov/aspect ratio... i'll try and fiddle with those. you're right that irrlicht shows so much more of the skybox, i.e. you can see almost an entire face in the window, whereas you can't in my engine.. I tried scaling the size of skybox up but strangely this had no effect... :|

Thanks for the comments on the water, i put soooo much hard work and time into it to actually get it working and i'm pretty happy with the results, kinda drags down the framerate quite a lot though so it needs optimising me thinks. I should be able to post a video of my game soon so you'll be able to see the low-cost ripples i've done, you can't see them in screenshots even remotely :lol:

EDIT: whoops, just noticed the second page :lol:

Nice one on the photoshop experiments! Makes sense i suppose. I'll beat it around until it displays like the irrlicht one. It's not UV coordinates because the skybox is seamless and displays properly, it's just blown up apparently! :lol:
Image Image Image
agi_shi
Posts: 122
Joined: Mon Feb 26, 2007 12:46 am

Post by agi_shi »

Your cube is too small - you're closer to the sky box in your OGL engine than in Irrlicht. The further away something is, the harder it is to notice pixelation.
Kojack
Posts: 67
Joined: Sun Jan 20, 2008 2:39 am

Post by Kojack »

Your cube is too small - you're closer to the sky box in your OGL engine than in Irrlicht. The further away something is, the harder it is to notice pixelation.
The size of a proper skybox cube will have no effect on how it looks, because it's always centered on the camera. Make it 1m or 1km across, same result. A small face close to you and a big face far away will be the same, both are showing the same 512x512 texture stretched across them.
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

"proper" being the right keyword here. Obviously, one of the 2 implementation doesn't follow that rule.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Here's a skybox I made using 10x10x10...

Image
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Here's another 100x100x100, camera close to the edge...

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

Post by JP »

Shame the edges don't meet up properly but it's a nice shot!

Did you have the terragen's camera zoom set to something other than 1?
Image Image Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Cube dimension set too high, resulting to clipping anomaly.

cube dimension equal to far clipping plane.

Image
Last edited by dlangdev on Sun Mar 02, 2008 7:09 pm, edited 1 time in total.
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

JP wrote:Shame the edges don't meet up properly but it's a nice shot!
They do line up, it's just the camera is too close to the edge.

It's part of this thing called minification and magnification artifacts.

Set the size of the cube to a right size and you'll be able to achieve the seamless effect.
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Here's another view.

Perpective at 60.

Image
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Now, this is the sweet spot for me.

But... I will keep it a secret for now.

Figure it out, and let me know your solution later.

Let's compare notes. I don't want to be stuck with my own solution.

I wanna see your solution to this problem.

Image
Image
Post Reply