Planetside Software Forums

General => Terragen Discussion => Topic started by: dandelO on October 02, 2008, 10:34:43 PM

Title: Reflective shader questions...
Post by: dandelO on October 02, 2008, 10:34:43 PM
I read Matt saying once that the reflective shader specular output(without ray-traced reflections), is equivalent to the default shader's specular settings. Fine.

Why then, when using a reflective shader, with ray-traced reflections, does the quality tab's 'number of samples' have absolutely NO effect until 'reflection softness' is enabled?

I'd been confused by this in the past but I never linked the sample quality to the softness levels mainly because I'd not used the softness slider before.

So, I made some really shiny things in TG and used very high(5) overall reflectivity on them.
The results are as follows:

Ray traced reflections on a PFS displaced black sphere - sample quality 4(default). = 22 seconds.
" "       " "       " "        " "    " "      " "        " "      " "   - sample quality 32(slider's max) = 22 seconds.
" "       " "       " "        " "    " "      " "        " "      " "   - sample quality 0 = 22 seconds.
" "       " "       " "        " "    " "      " "        " "      " "   - sample quality 1000,000! = you guessed it! Well done.

Tiny adjustments(I'm talking 0.001 - 0.1 ranges here) to the 'reflection softness' make massive changes in render time when more samples are used. The main question here then is:

Why does the sample level make no difference to the reflection quality/render-time without soft reflections. Shouldn't the quality tab slider be labeled as 'Number of soft reflection samples' if it only ups the quality when there is an extra softness factor, or a negative one, I tried negative levels of softness(a futile attempt to make 'frosted' type textures) with different sample levels and the render-times still increase considerably, maybe even more so than with positive softness values.

???
Title: Re: Reflective shader questions...
Post by: Oshyan on October 02, 2008, 11:48:35 PM
I may butcher this horribly, so I'll have Matt weigh on it when he can. But I believe in normal reflectivity situations it uses a set number of samples (not sure how many) that is tuned to obtain a good trade-off between reflection quality and render time *for non-soft reflections*. This is essentially a "static" situation where the number of samples does not need to change with for example the amount of reflectivity just to maintain quality.

In the case of soft reflections however, you need more samples since they will be averaged to form the softer result. In order to give more control over these situations, especially as it is dependent on how soft the reflections are, it was necessary to provide an adjustment for it. Perhaps it is indeed mislabeled, and if so it should be easily corrected. But I don't think it is a tremendous mystery. ;)

- Oshyan
Title: Re: Reflective shader questions...
Post by: Matt on October 17, 2008, 08:32:52 PM
It should perhaps be labelled "number of soft reflection samples". When softness is 0, the shader only uses 1 sample.

Matt
Title: Re: Reflective shader questions...
Post by: dandelO on October 17, 2008, 09:17:51 PM
Thanks, PS.
Title: Re: Reflective shader questions...
Post by: bobbystahr on October 20, 2008, 07:25:16 PM
Clliiick...a light goes on...thanks Matt and Oshyan.. and dandelO  for the query as well.. ...