Tricky issue I discovered with the Iray camera

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,547
4,631
I ran into a baffling issue today while working on some renders , and this is the story of how I tracked down the cause. Hopefully someone finds it useful knowledge.

Many of you will already know about the awesome "Iray Interior Camera" setup that HeroineAdventures made available on his/her DeviantArt account ( ).

1588484038306.png

This tool in a preset camera with 5 primitive planes and 5 iray secton planes as children. The section planes are arranged so that everything outside the camera's field of view are cut off when the render is executed, allowing all the HDRI light to come into the scene. This makes it much easier to light an indoor scene and as a bonus will render much faster than trying to get the equivalent using a bunch of point lights and/or emissive planes. The primitive planes are just included to give you a visual feedback on the position of the iray section planes when in i.e. texture shaded viewport mode.

So, this is the problem that stumped me for a while: I'm working on a project, and after a long evening doing a bunch of renders with minor changes between (facial expressions etc), came back to look at them the next day, and I found that somewhere in the middle of the series the lighting suddenly changed (got darker) at the focus of the image. Furthermore, there was an subtle visible shadow line across the character's face (just between the eyebrows.)

1588484420536.png

I searched and searched to find the difference - was there a change in the lighting? did the auto-headlamp get activated somehow? how about the camera's headlamp?

In the end i discovered what had happened:

Between one render and then next, I had accidentally moved the Iray Interior camera out of the original position. I wanted to get the camera back in place without discarding the other changes I had made since last time i had saved a checkpoint scene .DUF.

So I saved the current state of the scene, reloaded the previous scene, and did a "Save Subset" with just the Iray Camera group selected.

Then I reloaded the problem scene, deleted the bad camera which was in the wrong place, and merged the saved scene subset. Everything looked fine, the camera was in the exact right place, and I continued with the adjustments and renders. I didn't notice the lighting change or the shadow line (it was getting late LOL)

The next day I saw the visible difference.

It turns out that at some point when saving/merging the Iray camera and child objects back into the scene, there was one setting that got messed up: the visibility of the primitive planes!

After I changed the "guide planes" back to "visibility in render = OFF" then the renders went back to the way they where originally: no weird shadow cast by the camera itself.

1588485447806.png

I hope this will help someone else someday!
 

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,557
I ran into a baffling issue today while working on some renders , and this is the story of how I tracked down the cause. Hopefully someone finds it useful knowledge.

Many of you will already know about the awesome "Iray Interior Camera" setup that HeroineAdventures made available on his/her DeviantArt account ( ).

View attachment 642786

This tool in a preset camera with 5 primitive planes and 5 iray secton planes as children. The section planes are arranged so that everything outside the camera's field of view are cut off when the render is executed, allowing all the HDRI light to come into the scene. This makes it much easier to light an indoor scene and as a bonus will render much faster than trying to get the equivalent using a bunch of point lights and/or emissive planes. The primitive planes are just included to give you a visual feedback on the position of the iray section planes when in i.e. texture shaded viewport mode.

So, this is the problem that stumped me for a while: I'm working on a project, and after a long evening doing a bunch of renders with minor changes between (facial expressions etc), came back to look at them the next day, and I found that somewhere in the middle of the series the lighting suddenly changed (got darker) at the focus of the image. Furthermore, there was an subtle visible shadow line across the character's face (just between the eyebrows.)

View attachment 642790

I searched and searched to find the difference - was there a change in the lighting? did the auto-headlamp get activated somehow? how about the camera's headlamp?

In the end i discovered what had happened:

Between one render and then next, I had accidentally moved the Iray Interior camera out of the original position. I wanted to get the camera back in place without discarding the other changes I had made since last time i had saved a checkpoint scene .DUF.

So I saved the current state of the scene, reloaded the previous scene, and did a "Save Subset" with just the Iray Camera group selected.

Then I reloaded the problem scene, deleted the bad camera which was in the wrong place, and merged the saved scene subset. Everything looked fine, the camera was in the exact right place, and I continued with the adjustments and renders. I didn't notice the lighting change or the shadow line (it was getting late LOL)

The next day I saw the visible difference.

It turns out that at some point when saving/merging the Iray camera and child objects back into the scene, there was one setting that got messed up: the visibility of the primitive planes!

After I changed the "guide planes" back to "visibility in render = OFF" then the renders went back to the way they where originally: no weird shadow cast by the camera itself.

View attachment 642801

I hope this will help someone else someday!
If you want something that will not only save you if you accidentally move it again, but makes it a whole lot easier to use, get this


I only use the iray camera in animations mainly, I set the scene up in perspective as normal, then apply a daz camera to the current view, then just hide it in the scene tab. Then you load the iray camera as normal, go into your hidden camera view, make sure in the scene tab you have the iray camera selected, and run the script, and the iray camera will move to the the camera postion you are in.
 
  • Like
Reactions: osanaiko

recreation

pure evil!
Respected User
Game Developer
Jun 10, 2018
6,327
22,776
If you want something that will not only save you if you accidentally move it again, but makes it a whole lot easier to use, get this


I only use the iray camera in animations mainly, I set the scene up in perspective as normal, then apply a daz camera to the current view, then just hide it in the scene tab. Then you load the iray camera as normal, go into your hidden camera view, make sure in the scene tab you have the iray camera selected, and run the script, and the iray camera will move to the the camera postion you are in.
You don't need a script for that, just right click on the camera in parameters tab, "copy item" and "paste item pose" on the iray cam.
 
  • Like
Reactions: osanaiko

Stubbornstain

Newbie
Apr 15, 2020
18
14
Maybe I'm missing something... but in the camera tab can't you lock the position of your camera so it cannot be moved? I do this for scene assets sometimes as well, such as when a pose would move an actor to a different part of the plane.
 
  • Like
Reactions: osanaiko

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,547
4,631
If you want something that will not only save you if you accidentally move it again, but makes it a whole lot easier to use, get this


I only use the iray camera in animations mainly, I set the scene up in perspective as normal, then apply a daz camera to the current view, then just hide it in the scene tab. Then you load the iray camera as normal, go into your hidden camera view, make sure in the scene tab you have the iray camera selected, and run the script, and the iray camera will move to the the camera postion you are in.
Hmm, that's a good idea.
My repeated mistake (which is far too easy to do in Daz) is to try and manipulate the scene while still having the camera selected, rather than "perspective view", and move the viewpoint around trying to get a good angle on whatever thing I'm trying to edit. having a saved point to restore the camera too in the same scene is a good idea.

You don't need a script for that, just right click on the camera in parameters tab, "copy item" and "paste item pose" on the iray cam.
Yep, but unfortunately that doesn't work across scenes. which is why I was using the "save camera as a scene subset and then merge back" method.

Maybe I'm missing something... but in the camera tab can't you lock the position of your camera so it cannot be moved? I do this for scene assets sometimes as well, such as when a pose would move an actor to a different part of the plane.
I went looking for a "camera lock" on the camera UI pane, and did not find it. However, I did find the "Lock Selected item" option in the parameters pane context menu and in the Edit dropdown menu, which I had not thought about using before. That's an even better idea than keeping a "backup" of the camera. Thanks!
 

Stubbornstain

Newbie
Apr 15, 2020
18
14
Osanaiko, I am locking the scene items mainly in the posing tab (just camera tab has camera coordinates too, without having to scroll through other scene assets. I am clicking on the padlock for the paramaters I want to lock. For example I could lock Z rotaiton, X rotation and Y rotation to prevent the camera from rotating at all.
 
  • Like
Reactions: osanaiko

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,547
4,631
Osanaiko, I am locking the scene items mainly in the posing tab (just camera tab has camera coordinates too, without having to scroll through other scene assets. I am clicking on the padlock for the paramaters I want to lock. For example I could lock Z rotaiton, X rotation and Y rotation to prevent the camera from rotating at all.
Ah, now i see what you mean. That is convenient, thanks for tell me about it.