Sky- I can only get 8bit using Yann's method

Started by
13 comments, last by okonomiyaki 20 years, 11 months ago
okonomiyaki: nice clouds, but as you said, you need the shading. How bad are the artifacts straight up? Also, the sky looks tilted somehow, is your sky dome very bulged?

I tried Yann's idea with that 3D-texture trick in texture shaders to maximize precision to "24" bits. It looked really, _REALLY_ sweet, compared to the old 8-bits method (some strange filtering-artifacts are still messing up the cloud-edges, though :/ ).

I just have one problem: How can one _simply_ add the shading along with the clouds and the sky?
First pass, I render the clouds in the RGB channels and I copy it to a texture. No way to fit shading in there. Then, when I apply the cloud-transform (cover and exp stuff into the alpha channel via a 3D texture), I must set the RGB part to the shading at the same time, and the clouds would be nicely blended onto the sky. How can I add the shading without another texture copy with the shading?
The 3D texture lookup was slow enough (esp. in Windows, but I got 2x the FPS in Linux ) so I'm trying to figure out a quick way...

[edited by - coelurus on April 25, 2003 7:50:19 AM]
Advertisement
Thanks Trying a couple different shading algorithms right now. Haven''t found any that please me.

About adding the shading, I had the same problem. Yann said that you only need to shade the first 4 octaves.. So I trusted him about that and I compute the shading on the first texture unit (just 1-4 octaves) (so it has the alpha value but also the shading in the rgb) and then set this texture along with the final one on the final pass of rendering (rendering the scene), load it in the pixel shader (copy the same texcoords from the final cloud texture) and grab the grayscale value. It''s kind of a hack and I''m sure there''s a simpler way to do this.
nice clouds!

myself i implemented the clouds, using 6 octaves and i get nice results (without shading)

when i do the shading is looks quite bad (only the contour of the clouds gets lit, the rest is almost black)

how do you calculate the shade values for a specific voxel of the cloud surface? (i just add 0.0001 to the alpha value of a voxel for every voxel the ray to the light intersects)




okonomiyaki: I know how to shade the clouds, the problem is to a) use the fetched texture for an RGB 3D lookup and put it into Alpha, b) add the shading into the RGB part at the same time, c) blend the former two onto the sky. It is possible with two texture fetches, but that''s slow :/

Ilici: My shading function, which is pretty simple, starts off at the current "voxel" with an initial value and gets exponentially reduced by every voxel on the way. I added a vertical displacement to give the clouds some "fake volume" as well, it looks good enough for me Check the real-time shading paper, atleast check the pseudo src-code...
Yeah, it''s a problem. You need to render into all the RGB channels for the lookup, and you want to lookup and store the value into the alpha while loading the shading into the RGB of the final output. But where are you loading the shading from? You can''t render to alpha, so the cloud texture is done, I don''t see any other way than loading from another texture.

This topic is closed to new replies.

Advertisement