Godrays

Post » Fri May 27, 2011 3:40 am

Sounds like they changed a fair bit of voice acting too... and how the dog could eat the meat, that was really cool

And then Oblivion gets delayed for around six months and major changes take place, I was all over the moon over when I saw that video, notice the little detail on how Sutch is still on the main map, and most likely functional, just wonder what Bethie has done with that material, meshes, textures...hummm....free resource Mr Howard?
User avatar
Czar Kahchi
 
Posts: 3306
Joined: Mon Jul 30, 2007 11:56 am

Post » Fri May 27, 2011 3:47 am

I think the game uses parallel projection as far as the sun rays are concerned. (I suppose the sun is so far away that any light rays are as near to parallel as makes no difference).

Correct, at least assuming that Nirn is as far from Magnus as Terra is from Sol. Which seems likely. The peculiarity of TES cosmology shouldn't affect that, either (for those who are unaware, according to the lore, stars are not spheres that emit light, but actually holes in Oblivion through which the light of the Aetherial shines). Cyrodiil is some 700 miles across, and at the distance of 93,000,000 miles (as the distance from Sol to Terra), the angle between rays hitting one edge of the country and rays hitting the opposite edge is 0.005?.

And then Oblivion gets delayed for around six months and major changes take place, I was all over the moon over when I saw that video, notice the little detail on how Sutch is still on the main map, and most likely functional, just wonder what Bethie has done with that material, meshes, textures...hummm....free resource Mr Howard?

This actually is what I think of the "Princess Stomper" explanation of Oblivion - something happened there. Something serious, something that forced them to redo a lot of the game, something that drastically cut into the amount of time they could devote towards actual game content. You'll notice that there were a lot of changes to the engine - AI changes, graphical changes, etc - just as they should have been finishing with that stuff and moving on to content. This explains why Oblivion is so unpolished. It's all pure speculation, but it's something... does give one hope for TES5.

Maybe.

But if this thread has taught me anything, it's that I should go back to Morrowind, heh. I loved that game so much, and jeez, would ya look at it now?
User avatar
Lewis Morel
 
Posts: 3431
Joined: Thu Aug 16, 2007 7:40 pm

Post » Fri May 27, 2011 4:59 am

Just thinking about how Bethesda maybe had all the content for Sutch (architecture, etc.) and it's gone now gives me chills. Though we don't know that for sure, unless Bethesda told us. Man...
User avatar
Roanne Bardsley
 
Posts: 3414
Joined: Wed Nov 08, 2006 9:57 am

Post » Fri May 27, 2011 5:16 am

:ahhh: I just watched the OB preview vid. What really stood out to me was the variety of voices and more varied/spontaneous dialogue. The dialogue went out along with the Radiant AI I guess, but what of the voice acting? Tis a shame. :(
User avatar
REVLUTIN
 
Posts: 3498
Joined: Tue Dec 26, 2006 8:44 pm

Post » Fri May 27, 2011 2:06 am

I hate to be a killjoy but lets try to stay on topic of godrays and shaders to oblivion. More indepthly, we can use this to discuss the depth buffer and how we can utilize it for new shaders for oblivion.

sorry everyone :shrug:
User avatar
Leanne Molloy
 
Posts: 3342
Joined: Sat Sep 02, 2006 1:09 am

Post » Fri May 27, 2011 9:27 am

I hate to be a killjoy but lets try to stay on topic of godrays and shaders to oblivion. More indepthly, we can use this to discuss the depth buffer and how we can utilize it for new shaders for oblivion.

sorry everyone :shrug:

True. Finding that depth buffer is very important if we want better graphics.
User avatar
alicia hillier
 
Posts: 3387
Joined: Tue Feb 06, 2007 2:57 am

Post » Fri May 27, 2011 11:47 am

True. Finding that depth buffer is very important if we want better graphics.

I'm pretty confused about this... Why is it so difficult to find the depth buffer? And why do they hide it???
User avatar
Justin
 
Posts: 3409
Joined: Sun Sep 23, 2007 12:32 am

Post » Fri May 27, 2011 11:26 am

I think this man deserves a http://www.imperial-library.info/dogate/til_fishystick.jpg.

Thanks!

Wow, hope renewed. The depth buffer really can be found. I hope it's possible that it can be found in the near future.

EDIT: Not related to godrays, but http://s51.photobucket.com/albums/f386/vtastek/morrowind/Morrowind2009/shadows/ They've managed to get shadows on objects and such. I hope that will be possible with Oblivion too.

Shadows are buggy for now. They are stencil shadows done though CPU, slow and buggy. I hope we can use GPU hardware for shadows in some near future.

I'm actually working on rewriting OBGE at the moment. Having access to the depthbuffer is theoretically possible. It's not just a case of finding where the depth buffer is. The normal depth buffer in dx9 isn't accessible. Fortunately ati and nvidia have there own proprietary readable depth buffer formats. What you need to do is find out what card the user has. Create a readable depth buffer for that card type and switch it with the depth buffer that the game creates. It's fiddly but possible.

When I do the rewrite I can get the sun vector for you. I'm not sure about the sun position, I haven't looked for that yet. I think the game uses parallel projection as far as the sun rays are concerned. (I suppose the sun is so far away that any light rays are as near to parallel as makes no difference). I think I know where the eye vector is but if I remember correctly it suffered from jitter. (Even when your character was still the vector moved around slightly).

The memory dumper would only help if you knew what you were looking for and even then most of the depth buffer is stored in the graphics card's memory. I have a pretty good idea where it is but as I said above it's not that easy.

I think MGE used depthbuffer very early just to insert distant land behind Morrowind. You should know better, as far as I know, you helped early developments of MGE. Maybe the problems there can be examined and help our situation.

I want to help finding depthbuffer, unfortunately, I am not that advanced. I started writing shaders a couple of moths ago. I am a total noob.

I hate to be a killjoy but lets try to stay on topic of godrays and shaders to oblivion. More indepthly, we can use this to discuss the depth buffer and how we can utilize it for new shaders for oblivion.

sorry everyone :shrug:

True. First achieve what's possible within dx9, until it starts to be not enough for us...

http://i51.photobucket.com/albums/f386/vtastek/oblivion/Godrays/obgod136.jpg
http://i51.photobucket.com/albums/f386/vtastek/oblivion/Godrays/obgod137.jpg
http://i51.photobucket.com/albums/f386/vtastek/oblivion/Godrays/obgod138.jpg
http://i51.photobucket.com/albums/f386/vtastek/oblivion/Godrays/obgod139.jpg
http://i51.photobucket.com/albums/f386/vtastek/oblivion/Godrays/obgod140.jpg
http://i51.photobucket.com/albums/f386/vtastek/oblivion/Godrays/obgod141.jpg

Exaggerated much? :P
User avatar
SHAWNNA-KAY
 
Posts: 3444
Joined: Mon Dec 18, 2006 1:22 pm

Post » Fri May 27, 2011 12:15 am

OMG!!! It's TES 5!!!!
Wait.... Oh well... Close enough!
Colorfull...................
User avatar
Eileen Collinson
 
Posts: 3208
Joined: Thu Dec 28, 2006 2:42 am

Post » Fri May 27, 2011 12:05 pm

@ vtastek: Just a little bit. :P At least no-one can miss them.

I know it's too early to really mention it, but OpenCL will allow you to shift stuff onto the GPU, and is supposed to be supported at some point by both AMD and Nvidia, kinda like that DX11 equivalent. Though I'm sure you already knew. :) Anyway, back to the now...

Can anyone point me to a good explanation of HLSL and what you can do with it? I'm familiar with its ability to change a 2D texture which is passed to your monitor, or whatever they call it, like you can do with ScreenEffects, but I'm not sure about how the 3D scene works, and what the depth buffer is. ATM, I imagine it as a big old cube with the depth buffer holding information on how far into the 'depth' of that cube everything is, which would explain how you need it to get 3D vectors for stuff.

So any articles that deal with explaining the 3D side of shaders and HLSL?

Oh, and I've noticed that HLSL seems to be much less documented than GLSL? Is this true, or am I just looking in the wrong places?
User avatar
Charlotte Buckley
 
Posts: 3532
Joined: Fri Oct 27, 2006 11:29 am

Post » Fri May 27, 2011 3:59 am

Looks amazing vtastek :foodndrink:
User avatar
kirsty williams
 
Posts: 3509
Joined: Sun Oct 08, 2006 5:56 am

Post » Fri May 27, 2011 5:28 am

@ vtastek: Just a little bit. :P At least no-one can miss them.

I know it's too early to really mention it, but OpenCL will allow you to shift stuff onto the GPU, and is supposed to be supported at some point by both AMD and Nvidia, kinda like that DX11 equivalent. Though I'm sure you already knew. :) Anyway, back to the now...



I alway thought it was called open GL :P
User avatar
jess hughes
 
Posts: 3382
Joined: Tue Oct 24, 2006 8:10 pm

Post » Fri May 27, 2011 12:42 am

Holy smokes! This looks fantastic! I don't know about you guys, but I would decrease the intensity a bit. Or maybe, once the mod gets released, upload different versions or incorporate some possibility for the users to tune it to fit their taste. ini entries or something.

Way to go!
User avatar
naomi
 
Posts: 3400
Joined: Tue Jul 11, 2006 2:58 pm

Post » Thu May 26, 2011 11:43 pm

I alway thought it was called open GL :P

No, OpenGL is something entirely different. OpenCL is a framework, OpenGL an API. Obviously, they have different purposes.
User avatar
Alex Vincent
 
Posts: 3514
Joined: Thu Jun 28, 2007 9:31 pm

Post » Fri May 27, 2011 1:20 pm

@ domanz: Those pictures are what is called proof of concepts, so they're just for highlighting what can be done, and that they do well. :) And they're static, not dynamic. So it's really nowhere near release, it just got started on. At least that's what I get from vtastek's comments.
User avatar
Spooky Angel
 
Posts: 3500
Joined: Thu Aug 10, 2006 5:41 pm

Post » Fri May 27, 2011 4:32 am

@ vtastek: Just a little bit. :P At least no-one can miss them.

I thought first screens are hard to detect too. ;)

I know it's too early to really mention it, but OpenCL will allow you to shift stuff onto the GPU, and is supposed to be supported at some point by both AMD and Nvidia, kinda like that DX11 equivalent. Though I'm sure you already knew. :) Anyway, back to the now...

Can anyone point me to a good explanation of HLSL and what you can do with it? I'm familiar with its ability to change a 2D texture which is passed to your monitor, or whatever they call it, like you can do with ScreenEffects, but I'm not sure about how the 3D scene works, and what the depth buffer is. ATM, I imagine it as a big old cube with the depth buffer holding information on how far into the 'depth' of that cube everything is, which would explain how you need it to get 3D vectors for stuff.

So any articles that deal with explaining the 3D side of shaders and HLSL?

Oh, and I've noticed that HLSL seems to be much less documented than GLSL? Is this true, or am I just looking in the wrong places?

OpenCL is getting me excited too, but for integrating physics to Morrowind. :evil: For shader stuff, google is your friend. Nvidia hosts GPU gems for free which is really helpful. I haven't figure out the 3D part myself yet. But I am about there. And I managed to convert some GLSL shaders http://hl2glsl.codeplex.com/Wiki/View.aspx?title=Differences%20Between%20HLSL%20and%20GLSL, they are almost identical. I learned a lot since I started, so I can give a tutorial on basic stuff like godrays.

HLSL is created to write shaders on high level language. Before they were using assembly which is hard to understand and write(IMO). There are vertex shaders and pixel shaders(and recently geometry shaders), where vertex shaders modify geometry, pixel shaders modify pixels. (check my http://www.youtube.com/watch?v=x3KA_WWdVlE!)

HLSL code fragment from my godrays shader. (You can see how noob I am.)

float4 depthskymask( float2 Tex : TEXCOORD0 ) : COLOR0{   float4 ce = smoothstep(120040, 120041, tex2D(s1, Tex).r);   ce.a = 0.0f;   float4 sky = tex2D(s0,Tex);   sky = sky * ce.r;   return sky;}

I had to disable this part for the screens above, since s1 corresponds depth frame. (Surprisingly, crepuscular rays isn't that hard to make really. Which is why it's my fourth shader!)

Depth buffer is an image giving me the real physical distance to camera for every pixel on the http://www.madx.dk/machinima/wp-content/gallery/pixshowoff/fixed01kt0.jpg.

I use smoothstep to make depth not smooth, so it will give me black for every object and white for sky. Since sky is infinitely away, I put some big numbers there. (note to me -create a better method.)

Third line gets me the raw image, s0 corresponds the image enters the shader.

Now the math of colors,

sky = sky * ce.r;


Colors of the image represented as numbers digitally, so when I multiply sky(whole image), with ce(black land(0), white sky(1)),

(objects x 0) + (sky(whole image- don't be fooled by the name) x 1) = only sky with black land and objects

This is our mask. Rest is running this code sample http://http.developer.nvidia.com/GPUGems3/gpugems3_ch13.html, and combining the result back with original image. As you can see it is elementary level math. With more math you can create more. :D

So how did I create the above images, I ran a different shader which just turned down the lights until almost only the sky remains. It can give me some accuracy to a degree, where I can make those shots. Cons, I can't filter water, shiny objects, light sources from land. (I am using this method in my shader for morrowind too to get the bright parts of the sky and it is very hard to tweak. This is why I recommend phal's sunshafts shader to everyone, since he creates his own sun and project it to right place on sky(too much math for me). I am still learning those parts.) And it is still missing sun position, so I can move it to somewhere else than left top corner. :D

Come stop by http://mgeshaderlibrary.wikispaces.com/and its http://mgeshaderlib.50.forumer.com/. You can see our http://mgeshaderlib.50.forumer.com/viewtopic.php?p=385#p385 and read articles about shaders, request shaders, release shaders, get help on shaders, throw ideas, it's basically shader heaven. :P
User avatar
Kristina Campbell
 
Posts: 3512
Joined: Sun Oct 15, 2006 7:08 am

Post » Fri May 27, 2011 2:24 pm

Sounds cool to me. Thankfully, the maths isn't the hard part for me (OK, I don't exactly do it for fun, well, actually, it looks like I do... :(), it's the understanding how everything ties into the gameworld, the definitions of everything if you will.

I'll check out those links, should be helpful. :)
User avatar
kat no x
 
Posts: 3247
Joined: Mon Apr 16, 2007 5:39 pm

Post » Fri May 27, 2011 2:02 am

Guys, I think we should leave the thread for the masters to do their work. The best we can do is wait.
User avatar
Loane
 
Posts: 3411
Joined: Wed Apr 04, 2007 6:35 am

Post » Fri May 27, 2011 1:17 pm

Thanks!


Shadows are buggy for now. They are stencil shadows done though CPU, slow and buggy. I hope we can use GPU hardware for shadows in some near future.


I think MGE used depthbuffer very early just to insert distant land behind Morrowind. You should know better, as far as I know, you helped early developments of MGE. Maybe the problems there can be examined and help our situation.

I want to help finding depthbuffer, unfortunately, I am not that advanced. I started writing shaders a couple of moths ago. I am a total noob.


True. First achieve what's possible within dx9, until it starts to be not enough for us...
http://i51.photobucket.com/albums/f386/vtastek/oblivion/Godrays/obgod141.jpg

Exaggerated much? :P


WOW i love that pic 6 :D
User avatar
Sista Sila
 
Posts: 3381
Joined: Fri Mar 30, 2007 12:25 pm

Post » Fri May 27, 2011 12:51 am

Do I smell a test soon? I would certainly like to test that godray shader.
User avatar
Gracie Dugdale
 
Posts: 3397
Joined: Wed Jun 14, 2006 11:02 pm

Post » Fri May 27, 2011 10:37 am

I just got an idea, though it's probably not very feasible.

What if once the depth buffer is found (if it is), there could be light-rays through the holes in the ceiling of caves. I doubt it's easy to do, but it sure would be cool.
User avatar
Bigze Stacks
 
Posts: 3309
Joined: Sun May 20, 2007 5:07 pm

Post » Fri May 27, 2011 7:03 am

I just got an idea, though it's probably not very feasible.

What if once the depth buffer is found (if it is), there could be light-rays through the holes in the ceiling of caves. I doubt it's easy to do, but it sure would be cool.

Oblivion already has meshes for that :) But it would be a cool idea to see fake sunrays emitting from a lightsource above the cave hole.
User avatar
Lyndsey Bird
 
Posts: 3539
Joined: Sun Oct 22, 2006 2:57 am

Post » Fri May 27, 2011 2:16 am

Oblivion already has meshes for that :) But it would be a cool idea to see fake sunrays emitting from a lightsource above the cave hole.

It's certainly better than the ugly fake beams that don't emit light already. Perhaps add the fake sunrays which would look much better and add a light source as well. Caves would certainly be more immersive.
User avatar
Melly Angelic
 
Posts: 3461
Joined: Wed Aug 15, 2007 7:58 am

Post » Fri May 27, 2011 11:35 am

I just got an idea, though it's probably not very feasible.

What if once the depth buffer is found (if it is), there could be light-rays through the holes in the ceiling of caves. I doubt it's easy to do, but it sure would be cool.

Godrays come from the actual sun source in a game and due the fact that the caves are in interiors and therefore don't have a sun, it's not really feasible, hence the reason for the faked sun rays. There is, however, the project that added all the interiors into exteriors so that you could see the sun, hear the weather, etc, it could be done with that mod if someone were to do the same thing with the caves. :shrug:
User avatar
Chris Jones
 
Posts: 3435
Joined: Wed May 09, 2007 3:11 am

Post » Fri May 27, 2011 12:17 am

Godrays come from the actual sun source in a game and due the fact that the caves are in interiors and therefore don't have a sun, it's not really feasible, hence the reason for the faked sun rays. There is, however, the project that added all the interiors into exteriors so that you could see the sun, hear the weather, etc, it could be done with that mod if someone were to do the same thing with the caves. :shrug:


and what mod is that Real Lights ?
User avatar
Emilie M
 
Posts: 3419
Joined: Fri Mar 16, 2007 9:08 am

PreviousNext

Return to IV - Oblivion