HOME | DD

SickleYield — Mesh Light Instancing Test Scene For Iray in DS

#dazstudio #iray #lighting
Published: 2016-10-12 02:37:22 +0000 UTC; Views: 2198; Favourites: 21; Downloads: 105
Redirect to original
Description I created this test scene using only free content from the Daz Studio Starter Essentials (the Alchemy Chasm, the default HDR, and sphere primitives).  The purpose is to test instancing with regard to mesh lights. 

My results on this 500x500 scene on my two GtX 980's and two GTX 740's were:

Single mesh light: 25 sec

Single mesh light +10 instances: 40 sec

Single mesh light +50 instances: 1 min 21 sec

This appears to indicate that instanced geometry is still calculated as geometry for the purpose of lighting and multiplied accordingly, so it's not a valid way to create "fast mesh lights." 

Not only that, but it adds so much time that it cancels out the effect of any additional illumination.  Adding additional illumination in Iray normally makes render time shorter (the engine is very different from 3Delight in this regard).

Related content
Comments: 27

vwrangler [2016-10-14 03:45:21 +0000 UTC]

This is probably a ridiculously obvious question, but ... if you make a plane that's 1m x 1m, is that one poly, or do you need a modeler to get a true 1-poly item? Or am I confusing terminologies somehow?

👍: 0 ⏩: 1

SickleYield In reply to vwrangler [2016-10-14 08:09:55 +0000 UTC]

No, you're right, the Daz prim is 1 poly. I use my own instead because I like a slightly different UV from theirs.

👍: 0 ⏩: 1

vwrangler In reply to SickleYield [2016-10-14 08:45:32 +0000 UTC]

Oh, good. So is it the thickness that matters most? If the scale is expanded beyond 1x1, is it still one poly, or does it grow more polys to cover the expanded area?

👍: 0 ⏩: 1

SickleYield In reply to vwrangler [2016-10-14 14:40:07 +0000 UTC]

Nope, it's still 1x1. Scale doesn't matter and if it's 1x1 it literally has no thickness.

👍: 0 ⏩: 0

LmAnt [2016-10-12 05:13:13 +0000 UTC]

Interesting news and great informative comments here! 
I think I've learned more about iRay and lights in the past 10 minutes of reading here than I did during the last 4 weeks of trying myself
Thanks a lot for your experimenting and for sharing your insights! 

👍: 0 ⏩: 1

SickleYield In reply to LmAnt [2016-10-12 05:16:02 +0000 UTC]

You are very welcome.

👍: 0 ⏩: 1

LmAnt In reply to SickleYield [2016-10-12 05:41:59 +0000 UTC]

👍: 0 ⏩: 0

battlewhore [2016-10-12 03:52:49 +0000 UTC]

Huh, so if I understand this correctly, my efforts at improving render speed by adding more mesh lights was counterproductive? It would explain why some very dark scenes lit by photometrics renderered so much faster than I was expecting compared to some lighter scenes lit by meshlights.

👍: 0 ⏩: 1

SickleYield In reply to battlewhore [2016-10-12 04:00:29 +0000 UTC]

That's only going to work if your mesh lights are one-poly planes (so it only has to worry about one polygon).  If they are any kind of multi-poly geometry, mesh lights slow it down more than adding lighting speeds it up.  This test scene demonstrates that very well I think.

👍: 0 ⏩: 1

battlewhore In reply to SickleYield [2016-10-12 04:08:08 +0000 UTC]

Oh, neat, I'll have to start playing around with mesh light planes instead of spheres then.

👍: 0 ⏩: 0

Dangerguy01 [2016-10-12 03:11:56 +0000 UTC]

Thanks for sharing. Interesting results.

Please forgive my ignorance: Are the sphere primitives acting as mesh lights, i.e. emissives?

👍: 0 ⏩: 1

SickleYield In reply to Dangerguy01 [2016-10-12 03:24:07 +0000 UTC]

That's right, yes.  There's always ongoing discussion about mesh vs. photometric lights, and one of the big disadvantages of mesh lights is that they are slower than photometrics (adding more photometrics actually makes a scene go FASTER).  The reason they're slower is that Iray calculates the illumination for all the faces of the geometry.  So I was testing whether it would not "count" the geometry of instances for this purpose (which would allow "fast" mesh lights).

👍: 0 ⏩: 1

Dangerguy01 In reply to SickleYield [2016-10-12 03:30:07 +0000 UTC]

That certainly explains why so many of my dark, moody images take so bloody long to render.

I also tend to find that Iray emissives/mesh lights make a scene much grainier. Even a single emissive in a photometric-lit scene seems to add fireflies.

👍: 0 ⏩: 1

SickleYield In reply to Dangerguy01 [2016-10-12 03:33:02 +0000 UTC]

Yep.  Darker scene = more render time.

But also - from what I've heard, if you fill the scene with very dim photometrics it should still go faster even if the overall appearance of illumination is the same.  Iray likes lots of light rays even if they're not bright.  I may do a demo scene for this effect at some point too because it's very counterintuitive.

👍: 0 ⏩: 1

Dangerguy01 In reply to SickleYield [2016-10-12 04:10:06 +0000 UTC]

So lots of dim lights = faster render time than a couple of slightly brighter ones? Interesting. And yes, very counter-intuitive. My instinct if a test render is too dark is to increase the lumens, not add another light.

I thought I read somewhere that Iray ignores >7 photometric lights or something like that?

👍: 0 ⏩: 1

SickleYield In reply to Dangerguy01 [2016-10-12 04:10:54 +0000 UTC]

Now that one I've never heard.  Well that should be easy to confirm or refute.  I'm definitely going to test this.

👍: 0 ⏩: 1

Dangerguy01 In reply to SickleYield [2016-10-12 04:55:20 +0000 UTC]

I think it was in one of the "Great Art Now" instructional videos from Daz, but I could be wrong. It's been a while.

👍: 0 ⏩: 1

SickleYield In reply to Dangerguy01 [2016-10-12 05:17:18 +0000 UTC]

Well, I can now conclusively refute it.  I did a scene with one photometric, 7 photometrics and 50 photometrics.  Confusingly, more lights went slower, but the 50 definitely was brighter than the 7:



So it certainly is not ignoring numbers greater than 7.

👍: 0 ⏩: 1

Dangerguy01 In reply to SickleYield [2016-10-12 05:33:08 +0000 UTC]

Good to know! Thanks for all your work, it's very helpful and informative.

👍: 0 ⏩: 0

KindredArts [2016-10-12 03:03:16 +0000 UTC]

Are spheres still considered bad news for iray? I heard that each face of an emissive surface is calculated individually, thus upping render time for more complex emissive surfaces. I usually just shove a single poly mesh light at 0.001 opacity somewhere in the scene to act as a fill. It's the only cheap, tacky trick i've picked up that has pulled its weight so far. 

👍: 0 ⏩: 1

SickleYield In reply to KindredArts [2016-10-12 03:27:42 +0000 UTC]

That's right.  I didn't know this early on so I ended up recommending people use mesh despite the time hit because it makes for softer, more skin-friendly lighting.  Then I discovered the same effect could be had much "cheaper" with photometrics with geometry.  Now I use a photometric with a disc or rectangle in that spot instead.  Some people still prefer a mesh in that spot because you can keep literal track of its position whereas photometric geometry doesn't show in preview (I've gotten used to the dimensions and what they mean and eyeballing it, and now Daz is usually happy with my lighting).

I wanted to know if this would work, though, because at some point I'm going to be creating emissive flames for a product and I wanted to know if they could be made to render faster by instancing (and the answer is no, not really).  Instead I'll probably have two options: true emissives (slow, possibly more realistic-looking) and non-emissives with parented photometrics (much faster but may not look quite right, I'll see what I can do).

👍: 0 ⏩: 1

KindredArts In reply to SickleYield [2016-10-12 12:53:01 +0000 UTC]

How are you thinking of doing the flames? If they are fully modeled, then you'll just have to take the hit. If you are going for trans-mapped planes though, that would be super efficient. I think stone used mapped planes for his candle lights in the venezia suite. I'm sure a little bit of shader trickery could hide the use of planes, and they would probably look more realistic ... worth a shot? 

👍: 0 ⏩: 1

SickleYield In reply to KindredArts [2016-10-12 15:48:36 +0000 UTC]

Transmapped planes again. It's easier and, as you said, a fully 3D flame honestly may not look better in a lot of scenes. And if I do that, a plane can reasonably be 2 polys (for normals to be facing both directions).

👍: 0 ⏩: 1

KindredArts In reply to SickleYield [2016-10-12 19:59:36 +0000 UTC]

Is there an upside to having two polys? Can't you have just the one face and leave 2 sided light on?

👍: 0 ⏩: 1

SickleYield In reply to KindredArts [2016-10-12 20:17:45 +0000 UTC]

...

I'm an idiot.  OF COURSE you can.

Still - on the smoke set, having two sides did have the bonus of letting me add a little more "depth" by doing two different trans maps (one for the forward plane and one for the back plane).  I'm not sure if I'll want to give that up or not.  I'll have to experiment.  Certainly on the tiny candle flames there's no reason to have two, and I really appreciate that you pointed that out!!

👍: 0 ⏩: 1

KindredArts In reply to SickleYield [2016-10-12 20:36:46 +0000 UTC]

No problem, i was a bit confused myself. I can totally see it for other things but i can't imagine you'd gain much by stacking poly's on a flame. I'm not sure how much further you can go when you have emissive switched on - like maybe translucency? I sometimes use planes for distant foliage and i find a touch of translucency can really mask the sharp edges. Again, it's all just theory - let me know how it goes anyway.

👍: 0 ⏩: 1

SickleYield In reply to KindredArts [2016-10-12 20:54:18 +0000 UTC]

Translucency is possible, but SSS is inactivated by cutout opacity (a fact I have found VERY ANNOYING on creature sets with conforming limbs or bits).

I think emission might inactivate translucency, based on results I've gotten with it, but it may just blot it out by being too bright in the things I've tried it with.  This too needs more experimentation.

👍: 0 ⏩: 0