Sign in to follow this  

Decompress quadtree image

This topic is 662 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[attachment=30618:quadtree image.jpg]

How can i turn a quadtree compressed image (left) to smooth output (right).
I think this should be simple but all ideas i have for now are incomplete and complex.

The quadtree contains this data:
Single color per texel (also internal nodes, so 'mip map' data is available)
left / right / top / down neighbour pointers for current level
4 pointers to the parent level (to the 4 larger texels surrounding any smaller texel)

Any ideas welcome smile.png

Share this post


Link to post
Share on other sites

From an image processing standpoint you should be able to use a gradient technique. https://en.wikipedia.org/wiki/Image_gradient I'd use a 3x3 kernel to start with and maybe combine a larger kernel to generate a gradient map. Post process the gradient to smooth it then apply the changes to the grayscale image. Using this you can even increase the resolution.

Share this post


Link to post
Share on other sites
Thanks, i was looking at those things but now i realize what my real problem is:
If i add a second light spot to the image, one may end up in a coarse higher level and the other in a detailed low level.
Looking at the resulting image alone, there is no way seperate those and detect the different needs for smoothing as a postcrocess sad.png
There is no solution at all.

Share this post


Link to post
Share on other sites

One nice thing about smoothing is that there is most often a solution. Even if it is not fully isotropic, most user will not notice. Do not let the tree confuse you. If you have time, play and train with the grid examples.  Try to reuse this code for the tree.

Anyway I do not know why to quad-tree compress anyways. Is this for a sky with stars?

Share this post


Link to post
Share on other sites
Oh, missed that one.

What i want is a compression for 16x16 or 8x8 enviroment maps per light map texel, so a lot of them.
But yes, quadtree compression seems a stupid idea now. Making it work is expensive and still requires too much space to beat alternatives.
(thought about texture space lighting so no need to decompress for every pixel.)
Will stick at 3 Band SH or 4x4 most probably.

Share this post


Link to post
Share on other sites
Ah yes, i know that paper.

AFAI understand one can freely choose how much lobes to use, store them independently and they are not connected like the SH 'sum up basis functions' way.
But because the basis vector directions and lobe properties are hardcoded (they use 9), wouldn't this end up being similar to using a 3x3 enviroment map?

Share this post


Link to post
Share on other sites

This topic is 662 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this