Trees! - And that's about it

posted in The Cuboid Zone
Published March 05, 2015
Advertisement
This isn't really a new big update, just me talking a bit and showing some pictures. smile.png

Well, as the title suggests I wanted to play with trees, to see how my shading model handles vegetation together with GI. Now aside from the performance as I've disabled any frustum culling, the performance is not too bad. However there's still LOTS of work in the shading model of surfaces where light is guaranteed to pass through, so the images might be a bit weird...

There's also a few problems with my volumetric lighting. Currently I find the vector between the world space position and the world space position of the pixel, but, if the ray is TOO long, then what? I know there's some really nice research published by Intel that describes large scale outdoor volumetric lighting, however I'm not going to dive into that right now as it's a lot of work.

So, as people want to see pictures, I give you pictures!

6Ay7rhn.jpg
.
Now, for the fun of it, why not render 6000 trees!

K4AhRWB.jpg
.
Now, as always, until next time!
11 likes 8 comments

Comments

Servant of the Lord

Very impressive!

March 06, 2015 04:15 AM
Ashaman73

6000 trees, looks very impressive.

March 06, 2015 05:50 AM
unbird

You and your damn pretty pictures (*envy* :P).

Not sure about your problem. You raymarch the shadowmap, no ? Can you elaborate about the troubles ?

March 06, 2015 10:59 AM
dsm1891

10/10 was not lying, plenty of trees in this episode.

March 06, 2015 12:39 PM
Washu
Good job, ????, I approve. You might even get promoted to ?? at this rate!
March 06, 2015 03:40 PM
Migi0027

You and your damn pretty pictures (*envy* tongue.png).

Not sure about your problem. You raymarch the shadowmap, no ? Can you elaborate about the troubles ?

Ty all! tongue.png

The volumetric pass is in a fullscreen quad. So I raymarch the vector between the world space position in the scene and the near clip position ( or "world space position" of the current pixel ).

But the world space position in the scene is really far away, the ray is very large. I have a fixed number of marches/steps, so this means that the raymarching may not capture some important areas. Example: (Beware! My paint skills!)

NR1ry3f.png

In this case the ray is too long, which means the renderer wont get enough data to make a nice volumetric scattering at the window. One thing that I could do in this case is to have more samples in the beginning. Another problem is when two rays do not have the same length:

QLJFm9s.png

So as it said, there is an inconsistency between the sampling pattern (so many fancy words!), this can create ugly artifacts. I could base the number of samples on the length, but have not tried it yet.

I'm really new to this area, so there's probably much simpler ways of doing this.

Good job, ????, I approve. You might even get promoted to ?? at this rate!

Promoted I am! biggrin.png

March 06, 2015 04:07 PM
dsm1891

what was bird talking about, 'pretty pictures'...hmmm

March 06, 2015 07:48 PM
unbird

:lol: Who cares about beauty in technical sketches.

@Migi, thanks for the explanation. Now I understand the problem ... but I can't help you there much, sorry. If IIRC the stuff I read about such effects, one way to improve performance is to do it in lower res (can't judge from the shader you recently showed if you already do). GPU Pro 5 has a chapter or two about scattering (code and demo can be downloaded for the epipolar thingy, which is quite stunning).

March 06, 2015 10:03 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement