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
fmx

Post by fmx »

dlangdev
by "sweetspot" are you referring to:
- the prespective
- skybox size
- min/mag filters
- some combination of these
- or all of these?

i too am working with OpenGL skybox's at the moment, so maybe I too could try to find a possible "solution"... just tell me what the "criteria" is

(most likely "end up with a good-looking skybox" :P )


JP
IMO, i agree, the aliasing is most likely due to poor/non-existent filters/sampling - maybe you could try some bilinear filtering, or (very) small amounts of blurring?
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Oooooooh, I like that.

This is getting better...warmer.

So, I'm going to take off my.....jacket.

There ya go!

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

Post by JP »

Well, after some thought on the matter aspect ratio isn't something you can change as it's reliant on the dimensions of the screen.

So changing the fov i get a very nice looking skybox at 90 degrees, which i guess is what you'd expect as that's how it was rendered in terragen..

The only problem is it completely distorts the rest of my scene :?

I'm obviously doing all of this in widescreen, i don't know whether that would affect what the fov should be for certain things...

I'm gonna keep fiddling and do some research on camera fov.
Image Image Image
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Ok, so i decided to check out irrlicht's default fov (that would be sensible now wouldn't it? :lol: ) and it's 72 degrees (PI/2.5 radians) and if i set my game to that then i do get a better quality render, though not as good as 90. And i think it's less distorted.

I guess seeing as i'm changing the fov from what i used to use, 30 degrees, to something much higher then it's gonna seem distorted but presumably i just need to make some alterations to make everything looks sensible again.

So dlangdev, what fov did you find was best? Did you alter anything other than the fov?
Image Image Image
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

try 45 or 60, can't remember which, the "natural" angle ;p
Kojack
Posts: 67
Joined: Sun Jan 20, 2008 2:39 am

Post by Kojack »

For a monitor to be like a window into the 3d scene, the fov would be 2*atan((monitorWidth/2)/distanceToEye).
So for my 19" monitor (36cm across) and sitting 61cm back from the screen, I would have a 32.9 degree horizontal field of view.

Of course that's also like running around wearing a 36cm x 27cm x 61cm box stuck to your face with only one end missing, very hard to tell what is happening up close to you. Most first person shooters use 90 degrees fov, which would really require your eyes to be 18cm from the screen to match what you'd really see in real life (well, kind of close to it).
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Oh, Did you see I took my left sock off?

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

Post by JP »

Dya fancy coming back down to earth and chipping in with something sensible? :P
Image Image Image
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Kojack, no matter the distance to the screen, what is displayed in it shouldn't be affected. Else, it's like saying, for example, that if you take a hollow box with two end missing (facing one another) and watch through it, moving it further away, the world would stretch. the camera represent YOUR eyes. It's a suspension of disbelief that works quite well and people are used to that.
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

dlangdev wrote:Oh, Did you see I took my left sock off?

Tada!!!
Yeah seriously, dlangdev, stop POWER posting! It is freaking annoying, and contributes absolutely nothing to the sensible conversation that is going on.
TheQuestion = 2B || !2B
Kojack
Posts: 67
Joined: Sun Jan 20, 2008 2:39 am

Post by Kojack »

It's a suspension of disbelief that works quite well and people are used to that
Yep, as I said most games just use something like 90 degrees.

However the distance of your head from the screen is usable to create a better illusion of 3d in projects such as http://www.youtube.com/watch?v=Jd3-eiid-Uw

Of course I'd prefer it if more games handled 200+ degree spherical fov like http://strlen.com/gfxengine/fisheyequake/compare.html
:)

Anyway, back to the real topic... skyboxes.
dlangdev, is there any particular reason why your skybox is at a static position rather than moving with the camera? Or was that just to show the pixelation and distortion effects?
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

What you could do is this (if your engine permit it)

You draw your box at near pixel size (if your texture is 512x512) then your should cover for those pixel. (So it is really small)
(Could be nice if you can generate it at the FRUSTUM level) or at least render it at the current camera position.

You will have to render the box BEFORE any othe objects, then render the rest of the scene. If not; then the ZBuffer will give you a small box that cover the entire view.

Do this non-IRRlicht engine have a way to pre-render some objects?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Well you've pretty much just described how skyboxes are rendered normally :lol:
Image Image Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Unfortunately, you guys didn't get my message.

To know the answer collectively, we ( especially I ) need to see the code to figure the sweetspot.

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

Post by JP »

What was your sweet spot?
Image Image Image
Post Reply