Tutorial Daz Studio - Tutorials & Tips

Alley_Cat

Devoted Member
Jul 20, 2019
8,992
17,559
Like Xavster said earlier, if you adjust the F/Stop you can widen the focus area without the camera moving. The camera however is too close to get her feet in shot and still look somewhat decent.
So there is no way to keep the camera where it is and move the Focal Distance Plane (just found out that's what the middle plane is called)?
 

DiosDecay

Member
Mar 2, 2018
282
1,663
So there is no way to keep the camera where it is and move the Focal Distance Plane (just found out that's what the middle plane is called)?
You can keep the camera where it is and move the FDP with the Focal Distance slider and adjust the range with F/Stop.

Screenshot 2020-04-22 21.55.29.png
 
Dec 27, 2019
409
779
So there is no way to keep the camera where it is and move the Focal Distance Plane (just found out that's what the middle plane is called)?
Kinda jumping in the middle here, so I am not sure if this has been discussed already, but have you tried changing the focal length of the lens? On a real-life lens, a wide-angle lens would be something like 14-28mm and would allow a lot of the scene to be included. There is distortion on the edge of the frame, but you can include more.

Mo.
 

Alley_Cat

Devoted Member
Jul 20, 2019
8,992
17,559
You can keep the camera where it is and move the FDP with the Focal Distance slider and adjust the range with F/Stop.

View attachment 628502
Really? Because when I try it, F/stop (and Focal Length MoroboshiAtaru) changes the distance between the Near and Far DOF Planes, keeping the FDP plane where it is, and Focal Distance changes the distance between the DOF Planes and the Camera. But the FDP stays stubbornly where it is in both cases. Unless I'm completely misunderstanding what the planes are.
 

DiosDecay

Member
Mar 2, 2018
282
1,663
Really? Because when I try it, F/stop (and Focal Length MoroboshiAtaru) changes the distance between the Near and Far DOF Planes, keeping the FDP plane where it is, and Focal Distance changes the distance between the DOF Planes and the Camera. But the FDP stays stubbornly where it is in both cases. Unless I'm completely misunderstanding what the planes are.
When I adjust Focal Distance the sphere in the red circle will move (the wire frames on either side of it will change size), then I use the F/Stop to narrow the focus area down to whats in the screenshot.

Screenshot 2020-04-22 21.55.29.png

perhaps if you could post a screen shot of it and we may be able to see if something has been missed.
 

Alley_Cat

Devoted Member
Jul 20, 2019
8,992
17,559
When I adjust Focal Distance the sphere in the red circle will move (the wire frames on either side of it will change size), then I use the F/Stop to narrow the focus area down to whats in the screenshot.

View attachment 628512

perhaps if you could post a screen shot of it and we may be able to see if something has been missed.
At the moment I'm playing around with to see if that has the settings I want to change. I get that the focal point (in your red circle) will move, but what about the plane behind it? Since the objects within the two planes either side of the focal point are the things in focus, I'd like to be able to move that rear plane, so that I can make the character drop in and out of focus while keeping the character where it is. At best I can do at the moment is to change the focal length to move the front plane, but that's not what I want.
 

DiosDecay

Member
Mar 2, 2018
282
1,663
At the moment I'm playing around with to see if that has the settings I want to change. I get that the focal point (in your red circle) will move, but what about the plane behind it? Since the objects within the two planes either side of the focal point are the things in focus, I'd like to be able to move that rear plane, so that I can make the character drop in and out of focus while keeping the character where it is. At best I can do at the moment is to change the focal length to move the front plane, but that's not what I want.
Are you aiming for something like this? Only let these go to 1-5% so they are a little grainy

Focus.png
Focus b.png
 

DiosDecay

Member
Mar 2, 2018
282
1,663
And possibly one where they're both in focus, yeah.
How I did that was adjust the Focal Distance so the part in the red circle for the previous image was roughly inline with one of the characters eyes, then adjusted the F/Stop (to around 20-23) to bring the 2 planes either side closer together, repeat for the other character.

To get both in focus you would probably need to raise the F/Stop so the 2 planes are either side of the characters, or turn off Depth of Field, depending on the look you are going for. Hope this helps at all.
 
  • Like
Reactions: Alley_Cat

Alley_Cat

Devoted Member
Jul 20, 2019
8,992
17,559
How I did that was adjust the Focal Distance so the part in the red circle for the previous image was roughly inline with one of the characters eyes, then adjusted the F/Stop (to around 20-23) to bring the 2 planes either side closer together, repeat for the other character.

To get both in focus you would probably need to raise the F/Stop so the 2 planes are either side of the characters, or turn off Depth of Field, depending on the look you are going for. Hope this helps at all.
Hmmm ... not sure yet. I just started a render that looks like it might take a while, but after that I'll set up a test scene to see if I can replicate what you've said. So I don't know if I completely understand it yet, but you've given me plenty to experiment with :cool:
 

DiosDecay

Member
Mar 2, 2018
282
1,663
Hmmm ... not sure yet. I just started a render that looks like it might take a while, but after that I'll set up a test scene to see if I can replicate what you've said. So I don't know if I completely understand it yet, but you've given me plenty to experiment with :cool:
No worries, there are also a few tutorials on youtube as well with better explanations. But definitely experiment and see what settings you like etc.
 
  • Like
Reactions: Alley_Cat

Alley_Cat

Devoted Member
Jul 20, 2019
8,992
17,559
No worries, there are also a few tutorials on youtube as well with better explanations. But definitely experiment and see what settings you like etc.
All good. My render finished, so I did the tests, changing just the Focal Distance and the F/Stop as you suggest, and it worked perfectly.

Turns out after the tutorials that I had read on the Daz forums, they recommended changing the Focal Width and the Focal Length, and not touching F/Stop. And most definitely not putting the F/Stop higher than 22. Which I believe was where I was going wrong.

I put the F/Stop as high as 32 for shots with 3 characters, and it still did exactly what I wanted it to. Didn't even need to touch Focal Width or Focal Length.

So much thanks, I'm using your method from now on :)
 

Xavster

Well-Known Member
Game Developer
Mar 27, 2018
1,249
7,622
Efficient Lighting Technique

Been a while since I have posted any tips in this thread, however thought I would share some of the things I have learnt about lighting over the past couple of years. When undertaking game development, there is a balance between scene lighting realism and render convergence.

The most realistic way to light a scene is via emissives, simulating each of the light sources in the scene. Many of the environment assets you can purchase utilise this option. The problem however is that this setup is pretty much the worst alternative for render convergence. This may see you needing to utilise tens of thousands of iterations, down-sampling and denoising.

Another viewpoint you hear from many game developers is to utilise spotlights and methods such as 3-point lighting. Whilst this converges well and the lighting of the object in the center of the scene is fairly good, the lighting of the background is unrealistic. This method also requires you to tweak the lighting every time the camera angle changes.

The other main method uses is the application of a HDRI. While this is generally the accepted method for lighting outdoor scenes, it is rarely used by developers for indoor scenes. Much of this is because of the general unfamiliarity with the . This tool has the effect of pulling exterior lighting from external HDRI through scene walls.

After experimentation with a number of lighting setups, the method I utilise for the majority of renders in my game is as follows. I utilise a combination of a HDRI with emissive light sources. The HDRI provides the majority of light within a scene, whilst the emissives provide local highlights. An example of this is as below.
xmas.jpg

You can see the emissives used on Lia (central character) and the light in the back left. The majority of the light however comes from utilising a HDRI and an iRay Interior Camera. When selecting the HDRI you need to have once that approximates the colours that would occur after a white light is reflected off the surfaces in the scene. As the room is predominately blue / grey with a wood floor I use the HDRI as below.
HDRI.jpg

To pull light through the walls you need to use an iRay Interior Camera. This camera has all of the same functionality of a normal Daz camera, however also incorporates what I believe are emissive planes to drag light through the walls.
xmas_ic.jpg

You can see above that I have played around with the frame width and am also using Depth of Field. Also I have shown the light planes used with the camera. From what I can tell these planes are far larger than what is represented by the graphic.
- I would note that you need to ensure that none of the planes intersect with characters or other hollow objects. This gives the effect of creating an internal light inside the character. To fix, just move these planes outwards so they no longer intersect the object.
- Also you need to play around with the HDRI rotation such that it is in the correct orientation in respect to the camera. Generally you want to have the brighter portion of the HDRI coming from behind the camera. You can check this by applying a spherical lens to the iRay Interior Camera and then rendering the HDRI with all the objects in the scene hidden. The brighter portions should appear on the sides (behind).
- The one hiccup of this method in a scene is when you have visible mirror in the scene. The reflection will show the iRay Camera emissive plane rather than the room.

Whilst I still utilise other methods on occasion, I use the method above for the bulk of the renders. It provides the best compromise I have found between realism and speed. As an example, below is the scene rendered at 1080p for only 100 iterations (about 1min render). This is a raw render output with no post processing.
xmas100.jpg

In practice I render at higher resolution and more iterations than above. The general settings I use are as follows.
- Render at 3920 x 2160
- 500 Iterations
- Down sample to 1080p
On a RTX2060 this renders the scene above (as seen in 1st image) in about 20-30 minutes.

If you are on more modest hardware I would recommend the following settings.
- Render at 3920 x 2160
- 100 Iterations
- Apply either the nVidia or Intel Denoiser
- Down sample to 1080p

As a final note, when developing a game, you should be familiar with several lighting techniques. I am not suggesting the above is the only method to employ, however it will allow the developer to render a large number of good quality images very quickly. It is also a boon should you wish to create a number of animations. For example, in the v0.50 of Callisto the animations added were formed from about 14,000 renders.
 

Xavster

Well-Known Member
Game Developer
Mar 27, 2018
1,249
7,622
Hi Xavster , i have a question.

How can i render only specific objects in a scene ( with the same lighting like it was rendered in the full scene ).
The reason why i want to do that, i want to use interactive( clickable, hoverable, hidden / shown ) objects in my game.

IE:

View attachment 997052
View attachment 997053
The method I use is a follows. It's pretty quick and will give perfect lighting.
- You render the scene as you have already done.
- With the same scene, hide everything you don't want clickable and re-render with no lighting whatsoever. Make sure you export the result as a png.
- Following this second render, you will have black outlines on a transparent background.
- With this image, invert the colours and save as an image type without transparency (eg jpg). This should give you the objects as white on a black background.
- With this you can create the clickable overlay, by using the original image + the black / white image as a mask to hide everything else. This is done via an image editor such as Gimp.
- The image then becomes the idle image.
- To create the hover image, you can change the brightness of the idle image or other adjustment.

By playing around with the content in the idle / hover images, you can do things like have the name pop up over the door, whenever the user hovers over it. All of this is based upon the imagemap facility within Ren'Py. Note that if you have the idle image as a transparent webp, the mouse has to be over the non-transparent portion of the idle image to be active. This allows you to have hotspot areas larger than say the door, which also allows the sign above the door to appear when you hover over it.

If you have play Callisto you will see the above used hundreds of times in the ship navigation screens. If you need further assistance just ask.
 

Derezz

Member
Game Developer
Feb 24, 2019
101
611
The method I use is a follows. It's pretty quick and will give perfect lighting.
- You render the scene as you have already done.
- With the same scene, hide everything you don't want clickable and re-render with no lighting whatsoever. Make sure you export the result as a png.
- Following this second render, you will have black outlines on a transparent background.
- With this image, invert the colours and save as an image type without transparency (eg jpg). This should give you the objects as white on a black background.
- With this you can create the clickable overlay, by using the original image + the black / white image as a mask to hide everything else. This is done via an image editor such as Gimp.
- The image then becomes the idle image.
- To create the hover image, you can change the brightness of the idle image or other adjustment.

By playing around with the content in the idle / hover images, you can do things like have the name pop up over the door, whenever the user hovers over it. All of this is based upon the imagemap facility within Ren'Py. Note that if you have the idle image as a transparent webp, the mouse has to be over the non-transparent portion of the idle image to be active. This allows you to have hotspot areas larger than say the door, which also allows the sign above the door to appear when you hover over it.

If you have play Callisto you will see the above used hundreds of times in the ship navigation screens. If you need further assistance just ask.
Thank u so much! That works very well.
The only thing i don't understand, when i invert the colours, the object turns white and background keeps transparent and when i save this image as jpg, the background also turns white from transparent too.. i need to make background black manually before save the image :D

PS: Im using Photoshop for editing the images.
 
Last edited:

Xavster

Well-Known Member
Game Developer
Mar 27, 2018
1,249
7,622
Thank u so much! That works very well.
The only thing i don't understand, when i invert the colours, the object turns white and background keeps transparent and when i save this image as jpg, the background also turns white from transparent too.. i need to make background black manually before save the image :D

PS: Im using Photoshop for editing the images.
Note that I do not have experience with Photoshop as I use Gimp for image editing. Hence following is based upon editing on Gimp and the assumption that photoshop operates in a similar way.

You don't have to convert to a jpg to use in photoshop. Just start with a completely black image mask and then copy the white transparent png over the black mask.

As another option you can do away with using an image mask, by creating a selection area based upon the transparent portion of the png. Once this selection area is established, delete that area away from the original image.
 
  • Like
Reactions: Derezz

Derezz

Member
Game Developer
Feb 24, 2019
101
611
Note that I do not have experience with Photoshop as I use Gimp for image editing. Hence following is based upon editing on Gimp and the assumption that photoshop operates in a similar way.

You don't have to convert to a jpg to use in photoshop. Just start with a completely black image mask and then copy the white transparent png over the black mask.

As another option you can do away with using an image mask, by creating a selection area based upon the transparent portion of the png. Once this selection area is established, delete that area away from the original image.
Yeah, i think GIMP makes transparent section black(when saving images as jpeg) by default and Photoshop makes it white. Whatsoever the way you recommend is works very well. Thank u again! :)
 
Last edited:
  • Like
Reactions: Xavster

TheDevian

Svengali Productions
Game Developer
Mar 8, 2018
14,242
33,411
Photoshop and GIMP can do more or less the same stuff, the only dif is the way you do them. If you are used to one, it can be hard to make the switch. lol

My feelings on the matter are that you don't need to have the same exact lighting, since your overlay generally needs to be highlighted for mouseover anyway, so removing the room, and having the 'doors' or whatever appear brighter just saves a step.

In Photoshop (not sure about GIMP, but I assume they have something similar) you can use 'Curves' to adjust it as well. Not only can you use it to adjust the brightness, but also the colors, contrast, and so on, and if you add it as a layer, you can do it non-destructively.
 
  • Like
Reactions: rKnight

Techn0magier

Well-Known Member
Jul 2, 2017
1,217
4,480
Photoshop and GIMP can do more or less the same stuff, the only dif is the way you do them. If you are used to one, it can be hard to make the switch. lol

My feelings on the matter are that you don't need to have the same exact lighting, since your overlay generally needs to be highlighted for mouseover anyway, so removing the room, and having the 'doors' or whatever appear brighter just saves a step.

In Photoshop (not sure about GIMP, but I assume they have something similar) you can use 'Curves' to adjust it as well. Not only can you use it to adjust the brightness, but also the colors, contrast, and so on, and if you add it as a layer, you can do it non-destructively.
GIMP has no adjustment layers yet. (They are working on that, and it is the main reason why I work mostly with Krita)
But yes, you can adjust curves, levels and EV like in Ps. You even have a Lightroom alternative for fast global adjustments. That can work in conjunction with GIMP (Rawtherapee). But it will need you to work with TIFF files for full advantages.
 

rb88

Member
Sep 21, 2018
416
150
How to readd the eyes? Had issue with blocked on her eyes? But I figure out how to delete it. But how do you rotate the figure up word front? As you see in Blender She still has part that block from her eyes? in last photo. I'm still learning for fun. Since I have Ryzen 7 5700G system now.