Some basic tutorials about lighting

RafaelRafael Posts: 142
edited April 2023 in The Commons

I am preparing some small and basic tutorials, so hopefully, you will find them useful.

Here is the first one on How we can have more consistent illumination in our renders.

https://otake.com.mx/Tutorials/Light-Intensity/Light-Intensity-Inside-DazStudio.php

In photography, we use either a light meter or a gray card. I prepared a simple scene with a couple of spheres as gray cards.

In the tutorial, I explain how to use them, how to interpret the readings and some recommendations on the default values of the lights.

It is a work in progress. I will probably expand it with new tips.

Feel free to comment if it is not clear enough.

Post edited by Rafael on

Comments

  • RafaelRafael Posts: 142
    edited August 2024

    How soft a shadow produced by the Sun should be?

    The relationship between how far a subject is from its projected shadow (C), and the falloff of the borders of the shadow (D), is the same as the relationship between the light source diameter (A) and the distance to the subject (B).

    In the case of sunlight, we are tempted to think the shadows are just harsh, to think that the sun is a point of light, but it is not. The diameter of the sun is about 1.4 million kilometers, and the distance to us is more or less 150 million kilometers. This is a bit more than 100 times the diameter. This means that the softness of the shadow is more or less 1/100 of the distance to the subject.

    In our renders, this means that if we want to simulate the sun coming from a window, that is 2m away the fall of the shadow should be 2cm. This should be important, especially on close-ups, because 2cm is close to the size of the distant phalanx of our fingers. It will be an important element to give our renders scale.

    ---

    Here is a simple scene. A wall rotated to be perpendicular to the sun, a plane located 2m away from that wall (E), and sunlight provided by Sun-Sky options in Daz.

    And here are two renders. The first one the soft zone is out of scale. It is too soft, so the shadow looks like coming from an object further away than actually is (F). The shadow of the hand is too soft for that short distance.
    The second is closer to what we should expect. About 2 cm on that shadow of the wall 2m away (G). We can see how important this is to be consistent in the scale of the elements in our render.

    The default settings on the Sun Disk Scale slider on Sky-Sun parameters is on 4. Change it to 1. But also, the softer look of 4 is a nice touch in some situations.

    Post edited by Rafael on
  • RafaelRafael Posts: 142
    edited April 2023

    Use extra lights!

    In real life photography you add more lights as you need them, you can carry a portable flash, or a white or silver reflector. Don't be afraid to add an aditional light at your scene.

    A. The image on the left is a difficult scene in real life. Combining direct sunlight with some areas in the shade. I am using "Sun-Sky" as lightsource.
    B. It is a good idea to add a simple light to light up our character. I added an area light and now using "Dome and Scene", so both, the Sun-Sky and the area light contribute to the lighting.

    But you can also add lights using HDRI to balance and control the scene.

    C. Here is a simple scene using one HDRI. It is consistent, but the image can be improved.



    D. I reduced the intensity of the HDRI from 1 to .3 so we do not overexpose our image.


    E. And I added two lights. One area light (E), as a flash from a photographer would use. (The same case as the previous example)


    F. And a point light, on more or less the same position the natural sun would be. This "Fake-sun" give more light to our subject but maintains the original sun position and shadows but without increasing the background brightness.


    G. We can see the combined lights. The HDRI, the area light and the Fake sunlight. The overall image has the light more balanced and integrates better the model to the background.


     

    So, don't be afraid to use more lights!

    Post edited by Rafael on
  • robertswwwrobertswww Posts: 793

    @rafael_f12aa018 I am enjoying your clearly explained Lighting Tutorials, and I really like your photography comparisons and the accompanying example images showing each change the different lighting effects have on a character and scene. Keep up the good work!

  • RafaelRafael Posts: 142

    Thank you!

  • ArtiniArtini Posts: 9,623

    Great examples.

    How did you find the position of the additional lights to be consistent with the HDRI one?

    I have tried myself, but could not find the really convincing positions of the additional lights.

     

  • RafaelRafael Posts: 142
    edited May 2023

    Artini, Nice question.

    How do you add a point light consistent with a light on an HDRI?

    1. Turn "Draw dome" ON.



    2. Add a camera with a wide-angle lens, say 20mm. Position it more or less on the opposite side of where the HDRI source of light might be.
    I added a sphere just as a reference point on where our subject will be. Use Iray render mode to see the shadow.

    3. Select the camera and move it using the View Orbit and Move tool Find the source light of the Hdri. Position it behind your center or point of interest. In this case the sphere.

    4. Switch to wireframe mode and add a point light on more or less the opposite side of the camera. I'm using the top view.

    5. Switch to Camera View again and fine-tune the position of the light using the gizmo.

    You can play with the values of your new light. I Would keep the temporal camera to fine-tune the position of the new light.

    Additional Tips.

    a. If you use a Spot Light, use the same method, but at the end, you can choose it as a "camera" to point the light toward your subject.
    b. An extra advantage of using a spotlight is that you can dolly it using the blue arrow, whereas a point light is more difficult to control without the usage of the temporal camera.
    c. If your scene is a close-up scene the lights can be relatively close to the subject. The bigger the scene the further away the light should be. This is because an HDRI illuminant is in theory an "Infinite sphere". In Daz Studio there is a slider for Dome Radius. I have not tested much on how important this is. I think this affects the softness of the shadow relative to the distance from the object to the floor (Related to my other post about the Sun soft shadow).
     

     

    Post edited by Rafael on
  • ArtiniArtini Posts: 9,623

    Thank you very much for the detailed description - much appreciated.

     

  • ArtiniArtini Posts: 9,623

    Any idea about how to incorporate a background images (no HDRI) into Daz Studio

    to get consistent lighting in the scene with them?

     

  • RafaelRafael Posts: 142
    edited December 2024

    That is what most of my few renders on Daz has being about. I need to start my gallery!

    This post is a Work in progress...

    As this is a bit complex and a case-by-case scenario, consider this section as just some useful tips.

    Matching the illumination with background images

    Here are some examples of images I made combining a Photo as a background with a 3D character.

    A background image gives us different information:

    1. The camera information, position, lens, and angle.

    2. The light information, position, size, angle.

    3. Shadows projected on our object, and the shadows projected by it.

    4. Information on what will be reflected on reflective surfaces.

    5. Overall mood and color.

    Post edited by Rafael on
  • ArtiniArtini Posts: 9,623

    Thank you very much for taking it into your consideration.

     

  • RafaelRafael Posts: 142
    edited January 3

    Matching a render with a background image (Part 1)

    I. Adding the camera

    We have several ways to prepare our scene. The first one is adding the background as the environment. Unfortunately this background image will show in all viewports. Sorry if that is a bit confusing.

    On the Environment tab (1) Add the image (2), and on the Render Settings tab (3) define the proportion of the image (4)

    I normally add a camera (5) starting with the front view (6)

     

    Now we have to make some assumptions to define the position and lens type. In my case I am assuming the stool measures about 70-80cm, the camera is a little higher than that, so I will position it at 100 cm. A nice round number. As I want a portrait, and not a landscape, I will set the lens as a 50mm lens.


     

    II. Adding our first light

    We have to consider our scene. In this case, the light is a bit soft, to the left of our subject and a bit behind the stool (9). So add a soft light in that general position. I normally add the lights in the top view (10). As this is not a posing tutorial I will use a preset pose for the model.

     

    Now we can change to the camera view.

    III. Scale and position

    To minimize the things I move I have some rules.

    a) I never change the scale of my main model (unless we have a giant interacting with another model) If we have props, I change the scale of the props, not the main model.

    b) To match the scale I only dolly the camera, (move forward or backward) and change the focal length (11).

    c) Remember that we defined the height of the camera, so I try not to move that unless is strictly necessary, for example in a scene with several objects. So I define the vertical position of my object moving it (12) An important point is if our subject shadow is interacting with the floor. If this is the case we can define the z-position of our model touching the floor and move the camera.

     

    IV. Shadow Size and direction

    Add a plane on the floor (13). This help us to confirm the camera height. But most importantly, it will help us determine the size and position fo our light. Comparing the shadow on the background (14) we can see in this case two things. The light is too close. Determine this on how paralell or divergent the shadow is (15), and it is too far away.

     

    With the direction and distance of the light corrected, we adjust the intensity (16).
    And I added a big white plane so we have a fill light (17).


     

    V. Render and compositing

    I rendered 2 images. One with the plane that is receiving the shadow (19) and one without it (20). They are a bit different because the second one does not receive the reflected light from the floor, but, it is not that important for now.

    Now you need to use software like Ps or Gimp.

    The way to integrate the shadow to the background image is by using the Multiply blending mode (21).
    And the last layer is our model without the planes (22). This layer allows me to make the final touches to integrate the image. In this case, reducing the saturation so it looks more natural (23).

     

     

    Post edited by Rafael on
  • RafaelRafael Posts: 142
    edited January 12

    In the same way we define lights, we can add "cookies" or flags, which are simply planes that block light.

    To match the softness of the light we can change the position relative to our model and light source.

    If we are compositing our image later in Ps, we can remove this object from the scene.

    Post edited by Rafael on
Sign In or Register to comment.