Daz DoF, lighting & rendering

alexander3rd

AlexanderGames
Game Developer
Jan 28, 2018
96
237
Hi!
A few questions to the more experienced Daz folks here. Just did a test render:
violet test.png
A very simple scene with just the model in it, no objects, no clothing. Illuminated with 2 spotlights, left & right side. Used depth of field.
Took 10 mins to render out 1080p, roughly 500 samples, quality seems acceptable, at least to me personally.
A few questions - Can anyone suggest some lighting tips, or using spotlights are usually enough?
Any suggestions for quality+speed rendering? I changed the mesh resolution level from High to Base for the model & hair, that seems to speed things up quite a lot with a minimal impact on the quality. But I'm very new to Daz and 3D in general, so there's probably plenty of 'hidden' things I'm missing, maybe some properties that could be dialed down/turned off, if not needed?
What are the pros and cons of Iray vs 3Delight?
Thank you!
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,566
7,383
A few questions - Can anyone suggest some lighting tips, or using spotlights are usually enough?
That is really dependent on what type of scene you're using. If you're doing an outdoor scene, you generally will get very nice results using an HDRI (which can also fill in the background). The nice thing about HDRI's is that they give you light from "all around" - just with more brightness in the direction that the sun (or whatever) is coming from.

Indoor scenes are much trickier. Sometimes you want to remove a wall or ceiling to let exterior light in. Other times, you may want to use "ghost lights" to get additional light into the scene without the light source actually being visible. But using only ghost lights gives you an unnatural look, since the don't cast much in the way of shadows if they're large. (Small ghost lights can, however.)

Also, your spotlights will give you better-looking results if you change them from being "point" to being a "rectangle" or other shape. A point light casts perfectly sharp shadows, which don't exist in real life. Having the spotlight have some "area" softens the edges of the shadows in a more realistic way. Even a single light bulb in a room isn't really a point - it's got some area.


Any suggestions for quality+speed rendering? I changed the mesh resolution level from High to Base for the model & hair, that seems to speed things up quite a lot with a minimal impact on the quality. But I'm very new to Daz and 3D in general, so there's probably plenty of 'hidden' things I'm missing, maybe some properties that could be dialed down/turned off, if not needed?
Your Iray renders will converge a lot quicker if the majority of the scene has a source of direct lighting. When things are indirectly lit (i.e. in the shadows), Iray has to do a lot more calculations to figure out how light is bouncing into the area, and your scene will converge less quickly.

What are the pros and cons of Iray vs 3Delight?
Much of the following is just my personal opinion - others may disagree.

Iray pros:
  1. Most of the new content coming out of Daz is designed for Iray - 3Delight support is waning.
  2. If you set up the scene using principles of "how light really works," you get good results, since IRay tries to operate that way.
  3. It can generate some really awesome results with comparatively little effort if you can get over the lighting issues. (And for some people, that's a big "if".) I had enough experience with photography that I didn't find it terribly difficult.
Iray cons:
  1. Lighting a scene requires you to understand how light really works. (Fortunately, there's lots of material on this - you can learn a lot from articles on how to light scenes for regular photography.)
  2. If you don't have a supported NVidia GPU, it can take a LONG time to render.
3Delight pros:
  1. There's a lot of Daz stuff out there that still supports it - basically anything G2 and earlier, and tons of the older props and scenery. And at least some PA's are still including 3Delight materials in their new products.
  2. It's much gentler on systems that don't have a supported NVidia GPU
3Delight cons:
  1. Much of the "new stuff" coming out doesn't have 3Delight materials. There are converters, however.
  2. The renderer uses a series of settings and "tricks" to simplify the overall rendering model. So you have to learn how to do things. For example, shadows don't happen by default - you have to turn them on.
  3. At least for me, I struggle to get renders that look as realistic as with iRay. Some of that may be limitations of the renderer, some of it may just be that I have less experience with 3Delight, or that the assets I used have sub-standard materials.
 

alexander3rd

AlexanderGames
Game Developer
Jan 28, 2018
96
237
Rich, thank you very much for a detailed answer.
I do have many years of experience with photography, that's actually what's helping me understand lighting and cameras in 3D so quickly - at least for the render attached, the camera, dof and lighting seemed very easy to set up for me. The hardest part seems figuring out how to replicate a real life shot technique in the 3D simulation, but that's just fiddling with numbers more or less.

So what impacts the rendering speed in iray the most, is the number of lights? Could you explain or show an example, how one would go about lighting a scene, so it would take the least amount of time to render?
 

thecardinal

Latina midget, sub to my Onlyfans - cash for gash
Game Developer
Jul 28, 2017
1,491
4,431
For any indoor lighting scenes, I use softbox lights. And an easy way to jump the render quality is to change 'pixel filter' settings.

 
Jun 29, 2018
145
132
I also have a photography background and I loved that working with Iray in Daz was pretty true to real life. In another thread I mentioned I like to use HDRI for the same reasons Rich mentioned and I'll frequently set those light levels to be the shadow side of my figure. Then use a light set as a disc or rectangle to be the main brighter light.

I just wish my renders would complete as fast as images show up on the back of my DSLR. :)
 

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,889
29,934
I also have a photography background and I loved that working with Iray in Daz was pretty true to real life. In another thread I mentioned I like to use HDRI for the same reasons Rich mentioned and I'll frequently set those light levels to be the shadow side of my figure. Then use a light set as a disc or rectangle to be the main brighter light.

I just wish my renders would complete as fast as images show up on the back of my DSLR. :)
There are times I wonder if it wouldn't be faster to print my scene using a 3d printer, and then whipping out ye (not very) olde trusty Nikon D3200 with an appropriate lens...

Probably not (you'd probably have to paint the 3d figures too), but you'd get near instantaneous results for multiple camera angles... and it'd look different from an Iray render...
 
Jun 29, 2018
145
132
I am curious to see what people's results will be when the new Nvidia RTX cards start coming out and we see how it affects render times in Daz. Not that I'm looking forward to spending a ton on a new graphics card but I'm sure I could be very tempted.
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,566
7,383
So what impacts the rendering speed in iray the most, is the number of lights? Could you explain or show an example, how one would go about lighting a scene, so it would take the least amount of time to render?
It's not the number of lights. To the contrary, done wrong, adding lights can actually increase the render time in some cases.

Think about what iRay does to figure out what color a pixel is. (This is a dramatic over-simplification, but you'll get the basic idea...) It shoots a ray out from the "camera" through that pixel until it hits an object in the scene. So now it has to figure out how much light is coming from that object, at that spot, back to the camera. One thing it does is run a ray from that point to each of the lights in the scene to see if there's a direct path from the light to that point. If so, it can calculate the contribution of that light to that spot. (Light -> surface -> camera)

But then there's the question about reflected light. So from that point, it shoots random rays out until THEY hit a surface, then it figures out how much light is bouncing from that surface, to the original point, and then to the camera. (Light -> surface -> surface -> camera). Then it does another bounce. And another bounce. All that with random vectors, and all that to calculate one pixel. Obviously, you begin to see how this gets complex in a hurry. GPU's thrive on doing this kind of stuff massively parallel, however.

So this is why "total number of lights" isn't necessarily the be-all - every time iRay is evaluating some spot on a surface somewhere, it's going to include trying to see if there's a path from a light to there. So every light you add adds a little more work for iRay. The tradeoff is that if those lights make pixels converge quicker, then that reduces iRay's work. But, for example, if you added a spotlight that was inside a box, and thus couldn't actually illuminate anything in the scene, iRay still keeps trying to get to it bounce after bounce after bounce. Thus, removing things from the scene that you know won't affect the parts of the scene you can see will sometimes help noticeably - iRay understands when rays go off into infinity, and will stop bouncing at that point. So that wall that's behind the camera may be causing iRay a lot of extra work for no effect. (But iRay doesn't know that there might not be a mirror there that will reflect back into the scene, so it has to keep chugging way.)

Now, how does iRay know when to stop fiddling with that pixel it's working on? There are a couple of ways.

  1. There is a render setting that controls the maximum number of bounces that iRay will consider. (Optimization > Max Path Length.) But it's normally set to -1, which means "infinite".
  2. At the same time, each time there's a bounce, only a fraction of the total light on the bounce surface is reflected back in the direction iRay cares about. Thus, with each bounce the total contribution is smaller and smaller. As iRay progresses, it will finally decide that there's no point in going any further, because any additional bounces will add such a small delta to that pixel that it won't change visually. At this point, iRay considers the pixel to have "converged" and stops working on it.
Now, consider two surfaces in the scene - one which has a spotlight directly illuminating it, and one that isn't directly illuminated, and so is in some type of shadow. In the first case, it is highly likely that the direct light (spotlight, HDRI, whatever) is going to dominate the final result - the effect of subsequent bounces is going to be significantly smaller than the direct light. So such pixels are going to converge faster, because the direct light dominates. Conversely, a point that is only indirectly lit is (usually) going to be dimmer, and so the bounces are going to be a bigger percentage of the final value, and so iRay is going to need more bounces before it decides to fold up shop and move on. So, those pixels are going to be slower to converge.

So it isn't the total number of lights, but what percent of pixels are directly lit that's going to have the biggest impact.

Also, there are a number of settings on the Render Settings "Progressive Rendering" section that affect this.
  • Rending Quality: This defaults to 1.00. (And I usually leave it there.) This is some kind of magic number for iRay that affects how the algorithm decides whether or not a pixel has converged. If you increase its value, iRay will do more work on each pixel before declaring victory.
  • Rendering Converged Ratio: This defaults to 95%, although I frequently dial it up to 98%. This represents the total percentage of all the pixels in the image that have to have converged before iRay will decide that it's finished on the picture. Lowering this value will result in some additional "grain" in the image, but will cause iRay to complete faster.
  • Max Time (secs). This is the total time iRay will work on the render.
  • Max Samples. This is the total number of passes through the entire image iRay will perform. Basically, it doesn't work on one pixel till it's done and then move to the next pixel. Instead, it takes passes through the entire image, doing part of the calculation on any pixel that hasn't converged. Then it does it again. You can think of this as "each time through, it calculates using different random bounces." Again, when iRay reaches this number of samples, it stops, even if it hasn't reached the convergence ratio.
So, the render will complete with the first of "Rendering Converged Ratio," "Max Time," and "Max Samples" is reached.

Thus, these are the kinds of things that give iRay problems:
  • Deep shadows. There's very little light there, so each time iRay manages to find a deeply bounced way to find light, that represents a non-trivial fraction of what it's found, so these pixels converge slowly. One way to get around this is to add some light in there (possibly brightening the entire scene) and then using the Tone Mapping settings to darken the image. You've done photography - you'll recognize the settings - ISO Speed, f-Stop and shutter speed. (Except that changing f-stop doesn't change depth of field the same way it does in a real camera - that's a completely different setting.)
  • Enclosed rooms. Real rooms have relatively few light sources, and there's a lot of light bouncing going on. Our eyes are REALLY good at adjusting to this, so we don't notice how much dimmer it is than outside. But iRay does. So, again, these scenes tend to converge slowly unless you cheat and get light in there somehow. (Like by removing the ceiling or a wall.)
  • Reflective surfaces. These violate the rule that "only a small fraction gets reflected." Put a mirror in the scene, or a chrome bumper, and you've given iRay a lot more work.
But both of the first two really come back to the same thing - direct vs indirect lighting.

Now, in some cases, ghost lights are your friend. There are specific products for this, but in essence, what a ghost light is is a primitive (usually a plane, although it can be differently shaped) that is set to emit light (via the "Emission" properties on its surface) but then has had its cutout opacity dialed back to, like, 0.000001, making it essentially transparent. Thus, the primitive doesn't appear in the render (because it's too transparent), but the light from it does. This is not the same as turning off "render emitter" on a spotlight. The latter means that the spotlight itself won't show up in the render, but if you have a mirror in the scene, you WILL see the spotlight. So turning "render emitter" off essentially hides a spotlight if you're behind the light, but it doesn't really hide the front of the light, if you know what I mean. The flip side is that spotlights can be directional - they have a "cone." Surfaces that emit do so on a 180 degree arc. So, the downside of using large ghost lights, is that all your shadows go away, and, as a photographer, I'm sure you know that shadows (even mild ones) are what give objects in the scene shape and make the scene look realistic, since shadows abound in the real world, even if we don't tend to notice them.

But a small amount of ghost lighting can do wonders for how quickly a dark corner in a room would converge, for example, even if you then got rid of a lot of the light with the Tone Mapping.

Finally, the 4.11 beta that is coming out has an intelligent noise reduction built in. I haven't used it myself, but I'm told this GREATLY improves how long an image can take to render, since it can (effectively) post-process out the "fireflies" that are the result of poor pixel convergence by making use of neighboring pixels. I don't really know how it works, and haven't had a chance to play with it yet, but I've seen forum posts that say that people have been able to dial the total number of samples way back when they use it.

So that's a start on answering your question. But the beauty of iRay, for people that understand photography, is that it tries to work exactly like the real world, so setting up well-lit scenes in iRay is more or less exactly like setting up well-lit scenes for a photo. (I'm talking composition here.) The trick then is just to overcome iRay's quirks in the matter.

Experiment, experiment, experiment! LOL
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,566
7,383
I am curious to see what people's results will be when the new Nvidia RTX cards start coming out and we see how it affects render times in Daz. Not that I'm looking forward to spending a ton on a new graphics card but I'm sure I could be very tempted.
Yes, that will be interesting. But we may have to wait for a Studio update to see anything there - the version of iRay in the current Studio (to the best of my knowledge) won't know anything about RTX. (The benchmarks will probably improve just based on CUDA cores and clock speed, of course, but the early ones are unlikely to factor in RTX, IMHO.)

If RTX can make iRay perform better, you can bet that NVidia will update iRay accordingly - there will just be a delay until that version of iRay makes it into DS. It's like the 1060/1070/1080 series of cards - there was a non-trivial delay between when they were released and when Studio supported them because they needed an iRay version bump.
 

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,889
29,934
Having watched Jensen Huang waxing poetic about the RTX cards a couple of times now, while real-time ray tracing may or may not help us, the thing that has greater potential are the tensor cores/AI thing.

As I understand, RT Raytracing is a sorta kinda dumbed down version of what we use already in Iray, simplified for speed optimizations. Perhaps there is some 'bridge' to Iray, but so far I haven't seen much mentioned in the press releases about Iray improvements from RT raytracing.

As for the AI thing, it supposedly uses an algorithm to determine which rays are more important and which ones are less, and 'prunes' the stuff that isn't giving you any significant benefit onscreen as it evaluates the workflow, so that the rendering engine can focus on the stuff that is having a significant impact. If this can be applied to Iray, it could significantly reduce render times, depending on how much influence you want to allow it to have over the rendering process. I'm speculating a bit here, but Nvidia seems to be quite proud of how much of a quantum leap this will be in computer graphics.
 
Jun 29, 2018
145
132
Thanks for all that great info Rich. I'm going to take some notes about what you said. I'm interested to test the idea of lighting darker spaces and then darkening using tone mapping to darken them again. I've heard someone before say to just not render dark scenes but light them up and later edit them in Photoshop which really isn't what I wanted to do. I wasn't aware the tone mapping happened after the rendering calculations.

It's a shame there may not be a HUGE improvement using the RTX cards right away. I build a nice new system about 5 months ago, before I got into 3D, and settled on a GTX 1060 to save some money. I was thinking about moving up to the 1080 Ti but with RTX coming out soon I'll most likely wait and see how things settle out.
 

OhWee

Forum Fanatic
Modder
Game Developer
Jun 17, 2017
5,889
29,934
So this is interesting...

Somebody asked a question about whether the new RTX technologies (raytracing cores, etc.) would be integrated into Iray, and if there would be a performance improvement...

The thread appears to have been locked with no replies. That is a 'locked' Icon I am seeing next to the thread title, right?
(Iray forum link)
(post link)
 

alexander3rd

AlexanderGames
Game Developer
Jan 28, 2018
96
237
It's not the number of ...
Thank you, this goes to my notes. Will be fun to experiment with all of this.
You guys talking about RTX cards, I'd like to add - Blender Eevee is coming out soon. I've tested it multiple times, and it works wonders even on my considerably low-spec system - 8gb ram, 1050Ti gpu, so my options are quite limited, until a proper hardware (or software) upgrade. Hoping that Daz renders will improve in the future, since it's probably the best software for posing & rendering close to realistic content, esp. thanks to all the assets available already.
 

thecardinal

Latina midget, sub to my Onlyfans - cash for gash
Game Developer
Jul 28, 2017
1,491
4,431
I've used Octane with just a 3gb 1050 card for over a year. The learning curve is pretty steep and I still have quite a ways to go, but I feel like the results you get are better than just Iray. You have a lot more freedom to create and edit textures, and it's 2x as fast as Iray.

 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,566
7,383
So this is interesting...

Somebody asked a question about whether the new RTX technologies (raytracing cores, etc.) would be integrated into Iray, and if there would be a performance improvement...

The thread appears to have been locked with no replies. That is a 'locked' Icon I am seeing next to the thread title, right?
I don't THINK it's locked - if I'm looking at the icon you're talking about, that means that there are tags associated with the post. But I'm not a member of that forum, so...
 
  • Like
Reactions: OhWee

Chatterbox

Active Member
Game Developer
May 28, 2018
560
3,544
For any indoor lighting scenes, I use softbox lights. And an easy way to jump the render quality is to change 'pixel filter' settings.

What do mean by Softbox lights? Do you mean a spotlight set to rectangle? Sorry but I've never heard of a Softbox light.
 

Chatterbox

Active Member
Game Developer
May 28, 2018
560
3,544
So not to hijack this guys thread, but here's what I do. Please tell me if you think I could change something to gain speed or a better look/texture. I mostly do indoor stuff.

1. I usually delete things like emissive ceiling lights because they take forever to render. If I can't delete them, I remove their emissive property.

2. I then set up planes and use the Iray Uber shader on them. Most rooms only take 4 small planes, but a larger room can take more.

3. I set my exposure level to around 18 - 21 (depending on the scene), then increase the lums of each plane until I get the lighting level that I want. This usually ends up somewhere between 1 million to 10 million watts per plane.

4. I then add the characters and pose them.

5 I add three, sometimes four spotlights for the character. Main, Fill, Rim, and sometimes Hair.

6. I set up a look around camera with the headlamp on so I can check things out.

7. I setup my main camera, and use either 65mm 100mm, or 120mm. I prefer 120 or 100 because I don't get the distortion that I get with 65mm.

I've started to mess with mesh lights a little, but I'm not sure what the difference is between so called Mesh lights and planes. They seem to be the same thing to me.

That's it in a nutshell.
 
  • Like
Reactions: alexander3rd

alexander3rd

AlexanderGames
Game Developer
Jan 28, 2018
96
237
but I'm not sure what the difference is between so called Mesh lights and planes
Specifically in Daz, the only difference I found between any emissive surface & their 'ghost light' products, is that the latter can be properly hidden without affecting the illumination, while, for an example, an emissive plane - cannot. In Octane however, I can add emission to any diffuse material and hide it with 0 opacity, without affecting the illumination.
 
  • Like
Reactions: Chatterbox

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,566
7,383
I've started to mess with mesh lights a little, but I'm not sure what the difference is between so called Mesh lights and planes. They seem to be the same thing to me.
That's it in a nutshell.
Same thing. A plane is a mesh - just a very simple one. That being said, some people use more complex ones like "create an emitting sphere (mesh) to act as a lightbulb" or even "create a glowing 'God's arm' in my scene." (Was a recent thread in the Daz forum about that.)
 
  • Like
Reactions: Chatterbox