Decent Lighting the Easy Way
This is for RKane, who asked how to improve his lighting in order to sell a product, and for anyone else with the interest. I always feel a little uneasy doing public tutorials, because I'm usually instructing on something that other people are better at than I am. The fact is, though, that those people aren't always going to have the time or interest, and I can still help a beginner without being, well, mattymanx. ;D For some examples of very advanced and gorgeous lighting I point you to his deviantart page. For now, let's look at lighting in DS4. This should work in DS4.5 as well.
The picture attached to this first post represents the DS4 default lights and render settings. Notice how the picture looks gray and dull. I've heard people claim you should offer a render of the default lighting with a product in order to prove that it works. This is a terrible idea for several reasons. The most important is that nothing looks its best in default, and renders sell product. The second is that default lighting can mask normals direction problems in a mesh that make it totally unusable under UberEnvironment lights. Third, you don't want to even pitch to customers who regularly render under default only, because you don't want your name on the credit lists of renders that you know are going to look terrible. That's not a good advert for your product.
The character is SAV's Spartacos, the figure is a Genesis character dialed from D3 and M4 with one of RAMWolff's free faces, and the pose is by DZheng. All the goodies he's wearing are by me.
Comments
Here's a copy of the lights I'll be using for this tutorial. They are numbered and I will refer to them thus.
This will be the most useful for lighting a single character and/or a small scene at close or mid-range. Lighting an entire large scene, as artists like Stonemason must to sell large prop sets, is graduate material and will not be dealt with here.
Let's start with Set 1. This a simple three-point light setup with two diffuse lights from different directions and one specular light from the front (the direction the camera is pointing). These are all distant lights, so they affect the entire scene. One diffuse light is set to cast shadows.
Separating specular lights (which determine shiny highlights on your items) and diffuse lights in your scene gives you more control over the direction and type of your highlights. If you just leave the main lights at "on" instead of diffuse, they will cast highlights from two different directions, and sometimes that's not going to look right. The same is true with shadow casting. Don't turn on shadows with every light unless your scene actually calls for weird multi-directional shadows.
You can see that this is an improvement over our default lighting, but it looks harsh and a little odd. This effect is one you can exploit deliberately if you want to make, for example, Boris Vallejo-homage fantasy renders, but you don't want it for most scenes.
The biggest difference between the above and the solid-looking, strangely more realistic renders you both see and want to have is omnifreaker's UberEnvironment lights. These are found under Light Presets-OmniFreaker-UberEnvironment 2. In the first render below I have added a single !UberEnvironment2 Base light and set the quality to 4XHi in the settings on that same section.
Of course this is much too bright! In the second render I've turned the Uber light's intensity down to around 39% in the parameters tab. Look at the edges of the figure in particular compared to the previous post's renders and you can see how much more depth and dimension this gives us. Yes, it takes much longer to render, but believe me, this is VERY worth it - and it doesn't take longer than adding the number of spotlights you would need to fake global without it. This is Set 2 in the lighting package.
This gives us an okay look for bright sun renders or other ones where you mostly want to draw attention to the character and/or outfit, not their environment or the entire scene. It's not great for action or seductive or dramatic looks. Still, this can sell a product all on its own if it's in a good closeup shot.
Notice that I set up the non-Uber lights before I added the Uber light to the scene. This is because I'm using it as fill and the others for dimension and directional shadows. Uber lights won't give you those nice long shadows and they do not add any specularity on their own, so using them by themselves is not a good idea. I've heard great things about UberSpots, but I don't have those yet, so that will have to be for another day's tutorial.
Let's not neglect the render settings.
This render uses the same lighting as the last one, the UberEnvironment at 39% with the three distant lights, but I've turned up the pixel and shadow samples, added more raytrace depth, and greatly reduced the pixel shading. The difference may not seem obvious until you look at the eyes, the lacing, and the edge of the axe. See how much sharper and clearer they are?
At 400x600 this may not seem like a big deal, but at 800x1600 or 700x910 (Rendo and DAZ's main promo sizes at the moment, respectively) it's huge. This will greatly increase your render time, but it can also be the difference between acceptance and refusal (both by brokers and by customers).
Now that we've got the basics down, we can work on doing something more dramatic with the scene and the character. Here on the right I've turned down my diffuse distant lights, recolored them in shades of orange and yellow, and added a red spotlight. I turned on shadows on the spotlight and turned them off on the others, to ensure dramatic shadows cast from that direction. The result is this firelight effect. This is Set 3 if you'd like to examine it for yourself.
In the left picture, which represents Set 4, I've added two diffuse-only spotlights to the basic three-plus-Uber setup. They are from different directions, and one is slightly blue while the other is slightly orange. Intensity is turned down further on the other diffuse lights again. This helps the figure pop out even more from background while looking subtler than the base setup. These do not have shadows turned on, because that would cause shadowcasting strongly from two directions and give the character two shadows.
Have I mentioned how much you rock, lately?
:)
You is teh awesomesauce!
:P
Thanks, SY!
Thank you so much for starting this thread! Question: if you separate diffuse and specular lights, do you run the risk of ending up with very unrealistic lighting? I've often used UE at 25% and a single distance light at 75-80% to try to mimic outdoor sunlight, and I've been reasonably happy with the results, but I know I'm no lighting expert. I also know the lights we have in DS aren't really quite like light in the "real world," which is why people switch to an unbiased render engine like Reality if they are trying for a photorealistic image. But I'm just trying to understand how to get plausible lighting in an image that will look good. In particular, I have trouble showing characters with very dark skin. I can see how specular and rim lights could help with dark skinned characters, but where is that light supposed to be coming from?
The main purpose of separating them is that if you have multiple lights for fill, you can have specularity only from the direction of the main one - otherwise it tends to act in a way that real lights do not. If you've really only got one light in the scene there's probably no reason to do it.
I'm no expert either, but I think the purpose of rims and additional speculars is to simulate light that is being reflected from the environment onto a character (and off that character).
It's important to remember that a real light does something a simulated light in DAZ does not. It is reflected from every surface that you see - the very phenomenon of "color" is caused by an object reflecting some wavelengths of light and absorbing others. A lot of that reflection is not specular to our eyes, so it doesn't make sense to reflect shinies from every direction in most 3d scenes.
So the rims and specs are coming from everywhere, actually. It's just that DAZ can't simulate that with a single light. That's why the idea of "global" or "faked global" is so prevalent - having weak lights from each direction in addition to a strong light from the main one helps to simulate all of those photons that are bouncing around any given environment in reality. The closer you are to a character, the more small lights you need to simulate the subtler effects of light being absorbed and reflected by their skin.
Uber lights help this, but I think they do even better when combined with other manually placed spots and points. I'll do a demo here in a minute.
Okay, here we go! This is another Genesis character dialed from M4, M5, RAMWolff, and DieTrying conversion morphs. The skin is Benjamin from DAZ, which came with one of the M5 bundles and has nice HSS shaders. The jewelry is mine with shaders by Fisty/Marieah, and the shirt is mine textured by Marieah. The hair is Pure Hair Sleek from DAZ.
Both renders use the "enhanced" render settings from the previous post (shading rate .1, etc.).
On the left or first one, depending on your screen, we have Zigraphix's one distant (set to "on" and raytraced shadows) and 25% Uber. I left the settings on the lights alone otherwise. This looks nice. I would not hesitate to use it on a promo when I was in a hurry and did not have time to let the render go for hours, and in fact I've got a similar preset saved for test-rendering as I work.
On the right or second is the same thing with the Uberlight turned up to 39%. The distant light shadowcaster has been turned down and set to "diffuse," and another one from the same direction added and turned to specular. I have added the blue/orange spots from right and left again with shadows off. There is a point light to the right of the character's face set to specular with no shadows. I think this is a little more realistic with the less opaque shadow and subtler highlights, but there's actually less difference than I thought there would be, and actually I think it is a little bleached with the Uber that high.
There's less difference between them than you'd think resource-wise as well. The first one took 3 minutes 50 seconds on a system with 16gb RAM and an Intel i7 6-core and the second took around 4 minutes 30 seconds. You might do better with a similar system if you didn't also have another DAZ instance and Blender open in the background, the way I usually do. ;)
I think the reason is that both have an Uber light, and adding additional spec/diffuse lights with no shadows doesn't actually add much render time.
Here's one with the second lighting shown above but the Uber light turned down to 25% and the main shadowcaster up to 75%. I think it helps eliminate some of the bleaching while keeping the benefits of the extra speculars and dimensional lights. This also took about four and a half minutes at 600x600.
Thanks! That helps a lot, especially the explanation of the single specular light.
I know we also have the ability to set up ray-traced lights with color bleed (requiring custom cameras, as well) but I haven't used them much. There's a sample scene that comes with DS 3 and 4, though.
Really? I haven't played with color bleed! What does it do?
Here's the test scene, rendered out. Look in the default Studio library, wherever you have it installed, under Scenes/Shader Mixer.
Huh. Interesting. I haven't seen that rendered with much. It looks worth experimenting with!
Just my two cents:
Fill lights with no shadows is a tried-n-true technique, but it may backfire if you're using SSS. Literally: light rays firing out where they don't belong. In my experience, SSS works best with a UE-based setup: UE with AO turned on (IBL without AO does the same no-shadow thing) and a single shadow-casting light (or a diffuse+spec combo).
I also always turn shadows on for spec only lights. Stole the trick from those "admirers of the female form" over there at dA. Performance hit? I don't use raytraced shadows, so very little performance hit. Shader mixer lights allow me to up the shadow samples as much as I could reasonably want, past the measly UI limits.
The key is using a nice HDR map in your UE, then you don't need fill lights. I love the ones on this site, they're free (but if you like them you can donate): http://www.openfootage.net/?tag=hdri
Don't forget to convert them to TIFF beforehand using the script provided with the UE.
With the new 3Delight in DS4.5, I noticed I could also do without a diffuse shadow-casting light very often using these maps: UE casts nice softey directional shadows.
...and for SSS: there's a secret we discovered with the help of grandmasters like theSea, in that old forum thread that only the geeks were reading. Set the scale to 0.1 and shading rate to 1 and lower. This is how 3Delight is supposed to handle the geometry Studio feeds into it, to get the effect physically correct. Shader mixer SSS or UberSurface SSS, these are the correct parameters. Performance hit is minimal - unless you're using GI (but I should try this in the new 3Delight, they may have fixed the speed issue).
...though, I guess, I should not be mentioning performance when you advocate using insane pixel samples of 32!! =D Is there really a noticeable quality difference between using a more sane value like 8 and those 32?? I'm asking because I can't try 32, my computer can't handle it.
FYI, the 3Delight docs suggest max pixel samples of 6. But they also recommend the shading rate of 1 which is not really sufficient for most of what we do in Studio (I use 0.4 min, and the only time I really needed to go down to a crazy value like 0.1 and below was when I was trying out Pendraia's fur shaders which are displacement-based). I guess it's probably because we are rendering at smaller resolutions than the "big guys" usually do, - and the tinier your image is and the more clarity you want in it, the more you have to up those quality settings.
PS: max raytrace depth = the number of raytraced interreflections you want to see (a sphere reflecting a floor reflecting a sphere reflecting something else reflective; or, light bouncing inside a refractive volume) or the number of transparency layers upon one another that cast a raytraced shadow. I stick with 1 because I don't really need it higher.
Hope my rambling makes any sense. But feel free to ignore, of course.
Good info! Thanks for that.
I do notice a difference, but it's possible it's a result of the gestalt of settings I gave and not the pixel samples specifically. Sounds like I need to do another demo and test it out. ;)
In either case, though, I will politely disagree with the 3delight documentation. You see, I CAN document a difference between 1 and .1 when it comes to detailed surfaces that use displacement and UberSurface shaders to achieve their best effects. If you're working with things that are a superdeformed level of toon or you just don't care how sharp the details look, 1 is fine. For commercial promos it is not a good idea. I feel strongly about this because when I started following good advice about render settings was when I started actually selling things to DAZ.
My view is that there is no such thing as an "insane" or "too high" setting when it comes to 3d rendering. There is only what your system can or cannot handle in a reasonable amount of time. I almost never do a promo render that takes more than three hours, and if I do it's because I am absolutely sure it will reward that level of time investment - otherwise it interferes too much with my need to work on a production schedule.
Pixel and shadow samples:
The first or left render is the same scene as previous (two diffuse distants + 1 spec, blue/orange spots, 1 spec point) with the pixel samples and shadow samples at 8. This took just under 3 minutes. The second render is with the samples turned up to 32. On the aforementioned 6-core it took around 4 and a half minutes. In both of these the raytrace depth was 8 and the shading rate was 0.1.
I admit, the difference is much subtler than I expected - all I can really see at this resolution is that the shadow is a little sharper on its edges. Given this I would probably try 12 or 16 in future rather than 32 unless the render is really huge and detailed.
I think that pixel samples at 32 is a bit too high. I usuallu get good results with 6 at shading rate 1
The only case I felt I needed pixel samples at more than 8 is with a scene with a reflective material. I may post examples later
Three hour render on a six core machine... (man, I don't know if I've ever seen a six core machine, it's such advanced tech to me LOL we run numerical simulations on quadcores in our uni department) I have a gut feeling there are ways to bring this render time down without losing quality (probably lowering pixel samples should be enough, and maybe max raytrace depth). I would only imagine a detailed landscape with grass, canopy shadows and reflecting&refracting; water absolutely requiring this sort of time. Or maybe a SSS+GI combo.
Hi Takeo! *waves* Reflective surfaces needing more pixel samples? This is interesting, please post examples when you have time!
Three hour render on a six core machine... (man, I don't know if I've ever seen a six core machine, it's such advanced tech to me LOL we run numerical simulations on quadcores in our uni department) I have a gut feeling there are ways to bring this render time down without losing quality (probably lowering pixel samples should be enough, and maybe max raytrace depth). I would only imagine a detailed landscape with grass, canopy shadows and reflecting&refracting; water absolutely requiring this sort of time. Or maybe a SSS+GI combo.
Two to three characters with multilayered hair with quality transmaps, disp-shadered clothing, and skin with HSS shaders (which do use subsurface scattering usually, yes) in a good lighting setup with Uberenvironment will take that long and more even without leaves or water. I use a fast-rendering hair like the Spartacos short or 3Dream/Mairy's free Boy Hair, or an African male who can be bald, as much as I can when I know I'll have to do a scene with three people. I never render a scene with three long-haired women in the foreground as a promo. :D And I use just one character per shot as much as I can.
Hi Muskat :) Thanks for the watch in DA
I showed you the thing back then. I had problems with surfaces inter reflecting and had a big grey spot
Upping pixel samples and max raytrace helped
For lightning a three light setup is good. UE is not the only way to get better renders. Working on the materials and maps can help
Here is one of my first renders with DS. Had a 5 light setup, no UE and reworked all the textures and settings of TerryCMG's WW costume
Used deep shadow map. I also think that Muskat is right about render size. You will get more details at shading rate 1 if you render bigger
Last example. 5 light setup with UE and ditch river HDR and custom SSS shader and default Genesis texture Lana. Shading rate was at 1 and in fact all settings were at DS default, but for render size which was at 1920x1080
Ah true, transmapped hair. You're right, this is a yet another render hog. Even in my case of obsessive optimisation, transmapped surfaces take up the bulk of the render time, even though I do not use raytraced shadows and exclude hair surfaces from occlusion religiously.
For example, this one little test render took maybe ten minutes on my duocore each time while I was fiddling with the displacement on clothing and UE settings (I made them absurdly HQ because I was obsessed with the detail of the displacement and the skin). But when I added the hair, render times jumped up to an hour - I shudder to think what could result from leaving the AO on hair and using raytraced shadows. http://mustakettu85.deviantart.com/art/Rogue-a-la-Mode-257293590
\\ There are interesting ideas now using Geometry shell for fantom AO on hair; I have yet to look into this extensively to determine if it's worth it in the end, for, to my eye, AO on flat planes that hair models consist of these days is somewhat redundant given that all the inter-fiber AO is already accounted for by the texture artist \\
I hope anyway that if you try using lower pixel samples and raytrace bounce, you will see smaller render times without any noticeable quality decrease and hence more creative freedom! =)
Hi Muskat :) Thanks for the watch in DA
I showed you the thing back then. I had problems with surfaces inter reflecting and had a big grey spot
Upping pixel samples and max raytrace helped
You're welcome Takeo!
Oh, this one, right! Pity the pictures are dead on the old forum now, otherwise I would have remembered better...
And I often think of that custom SSS of yours since it's so cool, I think these are new Lana renders in your latest post here, aren' they? I don't remember them from the old thread.
Ah true, transmapped hair. You're right, this is a yet another render hog. Even in my case of obsessive optimisation, transmapped surfaces take up the bulk of the render time, even though I do not use raytraced shadows and exclude hair surfaces from occlusion religiously.
For example, this one little test render took maybe ten minutes on my duocore each time while I was fiddling with the displacement on clothing and UE settings (I made them absurdly HQ because I was obsessed with the detail of the displacement and the skin). But when I added the hair, render times jumped up to an hour - I shudder to think what could result from leaving the AO on hair and using raytraced shadows. http://mustakettu85.deviantart.com/art/Rogue-a-la-Mode-257293590
\\ There are interesting ideas now using Geometry shell for fantom AO on hair; I have yet to look into this extensively to determine if it's worth it in the end, for, to my eye, AO on flat planes that hair models consist of these days is somewhat redundant given that all the inter-fiber AO is already accounted for by the texture artist \\
I hope anyway that if you try using lower pixel samples and raytrace bounce, you will see smaller render times without any noticeable quality decrease and hence more creative freedom! =)
I don't think hair AO is worth bothering with for that exact reason, usually. That's a neat render. I like the attention to the pockmarks and details on his skin.
There's another thing I forgot that adds massive render time - Depth of Field! This promo render for an upcoming product took three hours AT the lower pixel sampling at a resolution of 800x1600: http://sickleyield.deviantart.com/#/d5fcn02
You can fake or add DOF in postwork, but I don't like to do that. Artistic renders are one thing - I adore Mavrosh and K-raven on Deviantart, and they both do tons of post - but the purpose of promotional rendering for a product is to show what the customer can do with just DAZ Studio. I only do postwork for gradient backdrops or small correction of an area that isn't the outfit I'm selling (I might clone out a clip of a plant with another plant off to one side instead of rerender the whole thing, for instance, but clipping of clothes vs. body means a redo).
More often if I just can't afford the render time I'll render to .png and postwork in a gradient or simple pattern backdrop, since that negates the need for DOF. This way it's obvious that's what has been done to both me and the customer and is not a "trick" to make a product look better than it is.
This is impressive, when you say 'custom SSS shader is this a shader you built your self or settings for one availble.
Thank you
Agree with that but it's worth using as renders are better.
Thank you
Thanks. It's a custom built shader by myself. I only posted the good ones. You haven't seen the buggy ones ;)
Thanks for the reply. Iespecially like what the shaders does to the area around the ears.
Agreed! :cheese: This looks very useful. Thanks for all the freebies and tutorials you've done, SickleYield!
Heads up, everyone: SickleYield's stuff is currently on sale at Renderosity, 30% off! I'm going to grab the SickleRobe and there are several others I'm considering. :)
Oh, that's cool, thanks! Pity, though, that all those solutions are for Firefox not Opera.
Nice one Muskat. I didn't see this one when I browsed your gallery. I tried the Fantom trick and it seems to speed up rendering in some case. I'm still unsure about AO on hairs. There are some case where I think that it mixes well with the render
Thank you! It's because I've categorized it out of the featured folder into one of the themed ones (it is under "Humans")
So, are you thinking of hairstyles like the Amarseda one, where the surfaces aren't flat but curved, emulating flowing wavy hair?