Digital Art Zone

 
     
Regarding the 3DLight Engine and Render Settings
Posted: 28 June 2012 08:44 AM   [ Ignore ]
Addict
Avatar
RankRankRankRank
Total Posts:  2945
Joined  2011-12-10

Okay, mostly I’m concerned with the Shading Rate.  A Lower shading rate severely jacks up the render time, but what does it actually DO?

Also, I know someone out there knows exactly what all the advanced settings do.  I know, for instance, that Ray Trace Depth has a lot to do with transparency and reflections.  If someone could run down what each of these settings do, and whatever effect they have on render time, that would be very helpful, I think.

 Signature 

My DeviantArt Galleries
My ShareCG Gallery
OPENSUBDIV Testing and Discussion
3Delight Surface and Lighting Thread

Profile
 
 
Posted: 28 June 2012 08:58 AM   [ Ignore ]   [ # 1 ]
Power Member
Avatar
RankRankRank
Total Posts:  1336
Joined  2006-03-14

From my tutorials and freebies index: 

Advanced Render Settings and what they do discussion.

 Signature 

My Tutorials and Freebies Index

Profile
 
 
Posted: 28 June 2012 08:59 AM   [ Ignore ]   [ # 2 ]
Active Member
RankRank
Total Posts:  465
Joined  2007-12-20

This is taken from 3Delight for Maya documentation, but should also be applicable to DS.
http://www.3delight.com/en/uploads/docs/3dfm/3dfm_12.html#SEC72


` Shading Rate’
  Controls how finely the geometry is tessellated prior to shading. 3DELIGHT adaptively tessellates each primitive into very tiny elements called micro-polygons, those elements are then shaded and sampled. Usually, the size of one such micro-polygon is one screen pixel and this corresponds to a shading rate of 1.0. A shading rate of 4.0 will produce micro-polygons that cover approximately an area of 2x2 pixels and a shading rate of 0.5 will give two micro-polygons per pixel.


The value for Ray Trace Depth simply sets how often ray/light bounce of an object/polygon.


On a side note, looking at those docs really give a glimpse of what kind of features/options DS users are missing out.

Profile
 
 
Posted: 28 June 2012 10:39 AM   [ Ignore ]   [ # 3 ]
Power Member
Avatar
RankRankRank
Total Posts:  1336
Joined  2006-03-14

From the other thread I linked too:

adamr001 - 28 June 2012 08:58 AM

One of the things I didn’t point out in the earlier portion of the thread, could stand some light shined on it.


Let’s talk about what shading rate and pixel samples actually mean.


Unfortunately, I cannot really speak about one without speaking about the other as they’re so intertwined that they’re inseparable as far as I am concerned.


But here’s a stab a separating them anyway:
Shading Rate - How many times to sample a given area for determining the color of a given pixel.
Pixel Samples - Number of Pixels to traverse away from the current pixel when sampling color for shading rate.


So now to talk about them together… Examples are easier so here we go!


Consider a Shading Rate value of 1.00. The DS3 Default value. At this value you’re comparing 1 pixel at a time to each pixel in the pixel sample width X and Y values to determine it’s color. So if you have a pixel sample width of X=6 and Y=6, you’re going to sample +6 pixels on the X axis, -6 pixels on the X axis, +6 pixels on Y and of course, -6 pixels on Y. So at a shading rate of 1.00 each pixel is sampled 24 times (given a pixel sample width of 6x6) to determine it’s color.


So now, let’s talk about Shading Rate values of LESS than 1. Effectively, what you do is some math.  It really translates to sampling the same area of pixels nearby over and over again to determine the color of the active pixel. So let’s take my recommended “best” setting for shading rate of 0.20.


The math goes like this: (Shading Rate * Pixel Sample X Value * 2) + (Shading Rate * Pixel Sample Y Value * 2)


When you’re under a value of one though, you have to divide 1 by that value… so


At 0.20 the math works like this:
1 / 0.20 = 5
(5 * Pixel Filter Width X Value * 2) + (5 * Pixel Filter Width Y Value * 2)


So given a Pixel Sample Width of 6x6 again, that would be
(5 * 6 * 2) + (5 * 6 * 2) = 120. So that single pixel is compared against it’s neighbors 120 times. That’s quite a jump over the 24 comparisons it does by default.


So if you use the absolute best shading rate DAZ Studio can do (0.010), the math works out like this:


1 / 0.010 = 100
(100 * 6 * 2) + (100 * 6 * 2) = 2400


Yes, two THOUSAND four hundred samples per pixel. If you’re doing a 1000x1000 pixel render, well, the math adds up. (2 billion, 400 million samples must be taken at 0.010 vs. 120 million at 0.20).


The odds of the color changing over 0.20 are pretty slim, but it might make some tiny difference.  It’s also pretty clear why lowering the shading rate is a direct line to how long it takes something to render.


NOW, that said, there ARE reasons to use lower shading rates. Extreme displacement detail is the #1 reason to do so. This is because with extremely fine displacement, especially if it’s a strong value, the pixel sample may not reach an area of the render where displacement is occurring and thus the detail is lost. This is easily seen using Pen’s Fur Shader. For most products though, it’s really quite overkill (imo) to set the shading rate value that small.


It also, using the text above, should be clear why an increase Pixel Samples is required to handle depth of field. Depth of Field introduces blur and blur clearly affects color and position. A larger field of pixels is needed to create a smooth blur, thus my recommendation of upping the pixel samples for DoF renders.


Such is my, more technical, understanding of Shading Rate and Pixel Samples.


Pixel Filter Width would work in a similar fashion to Pixel Samples, but applies only to the type of Pixel Filter that is being applied.


Oh, and for shading rates GREATER than one, what you’re doing is comparing an area against the pixel filter. So to handle the math involved in that, divide 1 by that value. So a shading rate of 4.00 (again keep pixel samples at 6x6) the math works like this:
1/4 = .25
(.25 * 6 * 2) + (.25 * 6 * 2) = 6

 Signature 

My Tutorials and Freebies Index

Profile
 
 
Posted: 28 June 2012 03:54 PM   [ Ignore ]   [ # 4 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2945
Joined  2011-12-10

WAIT a minute!

The way Shading Rate is described sounds a whole HELL of a lot like the way the Poser render engine has it’s claimed Subdivision Surfaces!

So, basically what you’re telling me is this: when I have a really detailed displacement map, the shading rate will absolutely affect it…

Fascinating!

 Signature 

My DeviantArt Galleries
My ShareCG Gallery
OPENSUBDIV Testing and Discussion
3Delight Surface and Lighting Thread

Profile
 
 
Posted: 28 June 2012 03:55 PM   [ Ignore ]   [ # 5 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2945
Joined  2011-12-10
wowie - 28 June 2012 08:59 AM

The value for Ray Trace Depth simply sets how often ray/light bounce of an object/polygon.

I was under the impression ray trace depth also affected how deep rays would go through transparency layers.  Such as layered hair, or somesuch.

 Signature 

My DeviantArt Galleries
My ShareCG Gallery
OPENSUBDIV Testing and Discussion
3Delight Surface and Lighting Thread

Profile
 
 
Posted: 29 June 2012 02:09 PM   [ Ignore ]   [ # 6 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2818
Joined  2004-04-14

Raytrace bounce affects reflections as well as raytraced shadows.

 Signature 

My DAZ3D Store
My Free Stuff
My Art @ DeviantART
Ships of the Line - MEGA THREAD
How to use the Poser Format Exporter - **Updated 2013-02-09**

Profile
 
 
Posted: 29 June 2012 03:28 PM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  13928
Joined  2003-10-09
wancow - 28 June 2012 03:55 PM
wowie - 28 June 2012 08:59 AM

The value for Ray Trace Depth simply sets how often ray/light bounce of an object/polygon.

I was under the impression ray trace depth also affected how deep rays would go through transparency layers.  Such as layered hair, or somesuch.

Only if there’s refraction or reflection applied to the surface - if not, a transmapped surface doesn’t use a bounce (fortunately or we’d need to set the value high to render most hair).

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 30 June 2012 01:20 PM   [ Ignore ]   [ # 8 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2945
Joined  2011-12-10

Okay… for the first time I did a full sized render, 1600 pixels tall, that rendered in FIVE MINUTES!

Good grief, that has NEVER HAPPENED to me before.  So I’m talking with a programmer friend and he’s telling me about floating point operations (as opposed to Integer Operations) and that I need to figure out which that one setting, or two, were those that made this render go so fast…

Here’s the image:

http://www.renderosity.com/mod/gallery/index.php?image_id=2344434

My render settings were as follows:

Bucket Size: 8
Ray Trace Depth: 4
Pixel Samples X: 4
Pixel Samples Y: 4
Shadow Samples: 16
Gain: 1
Gamma: 1
Shading Rate: 0.5
Pixel Filter: sinc
Pixel Filter Width X: 6
Pixel Filter Width Y: 6

Why, oh why did this render not take the normal TWO HOURS?  I dunno… not the first CLUE!

 Signature 

My DeviantArt Galleries
My ShareCG Gallery
OPENSUBDIV Testing and Discussion
3Delight Surface and Lighting Thread

Profile
 
 
Posted: 30 June 2012 08:51 PM   [ Ignore ]   [ # 9 ]
Member
Rank
Total Posts:  197
Joined  2011-03-31

The only thing in that render that would take longer than 5 minutes is the hair. Did you do something different with the hair?


The render settings do make a difference, but lighting settings and hair slow my renders down much more than even major changes to the render settings.

Profile
 
 
Posted: 30 June 2012 09:19 PM   [ Ignore ]   [ # 10 ]
Addict
Avatar
RankRankRankRank
Total Posts:  2945
Joined  2011-12-10

Other than use the LIE to make that hair colour, not a durn thing!
Christian

 Signature 

My DeviantArt Galleries
My ShareCG Gallery
OPENSUBDIV Testing and Discussion
3Delight Surface and Lighting Thread

Profile