Shadows on one object virtually black

Started by yesmine, December 20, 2014, 07:36:43 PM

Previous topic - Next topic

yesmine

I've been working with a scene that was previously okay, but suddenly this time I find that one simple object..a small shed..seems to have shadows that catch almost no reflected light. The sides in shadow are virtually black except for very near the ground (see picture attached). I'm 99% certain it wasn't doing this previously, and I have no idea what might have changed. The ground is basically light sandy color all around, so there is plenty of bounce light available.

Strangely, there is another object in the same scene that is also basically white, and it renders fine with the sides in shadow showing as expected, meaning they catch surrounding light, you can see detail, etc. To make it even more peculiar, if I import the first object above into a new empty TG scene, it renders fine. But using it in the current (original) scene, it now renders with black shadows.

Both objects came from Maya, exported as .obj's with .mtl files to match, and there is nothing fancy with them, so I would expect they would both render similarly, and I think they did previously, but not now. It's got me perplexed, so I would appreciate any help understanding what is causing the first object to render with very blackish shadows, and how to fix it.
Thanks,
Yesmine

Oshyan

I think it's pretty difficult to say without either A: looking at the TGD (and ideally the object files too), or at least B: seeing a more complete image, particularly showing the other object that renders properly and more of this one that's having a problem. I would suggest, though, that you try keeping the scene you have, deleting the object, and re-importing it to see if that fixes the problem. It seems like some setting got changed that is causing the problem and maybe you can reset it that way.

- Oshyan

yesmine

Thank you, Oshyan, you got me thinking and I've discovered something that seems to have direct bearing on the problem. For some reason I began to wonder about the Global Illumination Cache I had generated earlier. I switched off 'Read GI cache file(s)' and did a quick render, and it rendered more or less as it should! So there is something about the GI Cache file I had done previously for this scene that was now affecting this one object--but not the other object.

   For what it's worth, I had re-imported the other object several days ago when it was suddenly rendering completely black and I suspected the .mtl file needed to be reloaded because I'd worked on it in Maya. I got that fixed, but as I mentioned earlier it was still rendering fine using the original GI Cache file. In the case of the other object, even after reimporting the it (in case the .mtl file needed to be reloaded), it was still having the black-shadows problem until I turned of the GI cache file. So I don't know what the difference was between the objects,  but apparently the GI Cache file is having some effect since clicking "No Gi cache file" lets it render as it should.

I'm going to try writing a new GI cache file again and see if that resolves everything, but I have one question about it (maybe I've just forgotten). The documentation refers to a 'time-sparse' setting to render a set of frames 10 apart or 20 apart, but I can't find where to select how many frames apart. There's no entry on the GI Cache File settings window for 'time-sparse' or the like. Could you point me to the answer?

Thanks,
Yesmine

Oshyan

That does sound like a likely culprit. I'm glad you were able to resolve it fairly easily. We do recommend regenerating GI caches whenever major scene adjustments are made, even if you're "just" reloading an object, since usually the implication is you're reloading it for a reason, i.e. to solve some other issue, which therefore implies the GI cache might have also been generated under non-ideal circumstances.

Sparse caching is handled during cache generation, not rendering, since generating a sparse cache takes less time and is more efficient so it makes sense to do it in the initial generation phase. Since there is of course no special functionality for generating cache sequences - it just uses the standard sequence output functionality - the answer is fairly simple: just use the built-in "Sequence step" (frame increment) setting. So if you wanted to generate a cache with every 5th frame, just set Sequence Step to 5 when you render your cache sequence out. Then when you render the final pass, reading your GI files, you have the option of also blending any number of these files together. We recommend 3-5 for typical animations. What you get in the end is smoother lighting changes because you are ultimately blending the lighting solutions for the equivalent of 15-25 frames averaged (3-5 caches blended, caches every 5 frames). The only drawbacks are somewhat increased render time for higher numbers of blended files, and potentially lower absolute accuracy since you are blending multiple cache solutions. In cases where rapid lighting changes need to be reflected accurately and not smoothed out, you can use lower sequence steps or none at all (i.e. a cache for every frame), but you generally still want to use frame blending or you pretty much lose the benefits of GI caching.

- Oshyan

yesmine

Thanks again...I was just about to write that I'd realized after the fact that it was just a matter of setting the sequence steps when rendering. Nothing like realizing an obvious answer a minute after you ask it to make you feel foolish :/ I'm generating a new set of GI Cache files now.

I'm still curious though...if you have any guesses...why the same old GI-cache file would render the other object (a white car) just fine, but not the simple white cube-shaped building that was causing me problems. I even moved the render camera from one to the other, rendering each of them to be sure, and with the same old cache the car looked fine but the building was dark-shadowed. Both objects had been re-imported, and the original GI Cache was being used, so it's a mystery to me why one worked but the other didn't.
   For wild speculation, do the cache files somehow register the objects in a frame, such that if I had an existing cache file but then imported a new object into a frame, the new object would be ignored when the frame was rendered because the initial cache file hadn't included it? Something like that is the only reason I can imagine...perhaps I generated the GI cache when the car was already in the scene, but I had not yet imported the building into my scene, so the cache missed it. Maybe that would cause everything to render as expected--except the building. Just a guess...

Oh well...I've learned something new, so on the bright side, maybe I'm worth more money :)

Yesmine

Dune

Are you sure the side of the shed doesn't have a flipped normal?

Oshyan

I honestly don't know why it happened that way. It's pretty well impossible to say without knowing the exact history of your scene development. I don't think the GI cache works quite as you suggest, though if you'd generated one without an object in the scene and later render with that object, using the outdated GI cache, it certainly would cause odd results.

- Oshyan

Matt

#7
If you add an object (or even move an object) after generating your GI cache, the GI cache might not have any information about the added/moved object. To render the new object properly, the GI needs to contain data points close to the surface of the new object.

If the object hasn't moved, it should work. But if there was a problem with the material of the original object that was causing it to render incorrectly when the GI cache was generated, the GI cache might not contain the right information.

Matt
Just because milk is white doesn't mean that clouds are made of milk.