KeyShot Forum

Technical discussions => General discussion => Topic started by: Don Cheke on October 02, 2019, 08:54:04 AM

Title: White Jaggies In Renders
Post by: Don Cheke on October 02, 2019, 08:54:04 AM
I can't seem to figure out how to eliminate highlight jaggies, as seen in the attached screen captures. I am using 4K to 8K hdr images and outputting the render from KeyShot at 2100 x 3750 (300dpi) in jpg format. I have sampling set at 100. I've tried a number of approaches but the jaggies persist. I am using the CAD HD version of KeyShot for Alibre and I have my Alibre display settings to the finest they can be. For display I am using a Nvidia Quadro K1200 card if that makes any difference. Can anyone offer some insight into what might be causing this or offer some advise for a solution?

I am not new to rendering as I have used TurboCAD/LightWorks for many years without seeing this kind of issue.
Title: Re: White Jaggies In Renders
Post by: sloanelliot on October 28, 2019, 05:25:24 AM
Looks like this was a while ago, but could it be as simple as lower-than-ideal geometry tessellation (resulting in stairstepping at certain light angles)? If you haven't solved this yet, I'd be happy to look at the file if you can upload (or a sample scene if NDA).. Assuming there is NURBS data present, you can right-click and select "re-tesselate" to see if that helps the cause.

It wouldn't be anything video card related if its baked into the render itself..
Title: Re: White Jaggies In Renders
Post by: sloanelliot on October 28, 2019, 03:34:51 PM
Bummer. Yeah, I'm not sure on that one (without seeing it)-- I do know sometimes this can also happen when your light source is simply too hot (especially when it's also very small). What happens in that scenario can be a bit odd, where the intended "gradual" blending/progression of pixels (anti-aliasing) get completely blown out, where the brightest pixel in a run might be 100% white, then next is at 99.99%, the next at 99.98%, etc. (totally imperceptible difference) where under a less harsh light source it might be something more reasonable, like 100%, 90%, 75%, 50% etc..

It might be worth looking into that, coupled with a light source that's not 100% white (maybe 95%) and also try adding a very subtle roughness value to the gloss material you're using (like 0.05% or less) as that will help scatter the light a bit better and disarm some of the harsher highlights without affecting perception.

Lastly, I've seen weird things like this happen when scale is way off and materials/scenes start behaving strangely. It could be that the imported model is 1/100th of its intended scale (or mm vs. ft, as an example). And sometimes things import at odd scales, like "0.0021" so if that's the case reset scale to "1" and do a quick test render..
Title: Re: White Jaggies In Renders
Post by: RRIS on November 01, 2019, 12:59:58 AM
Yeah those lights are too hot. Are they emissives or area lights? In any case, I would dial down their strength and possibly add some IES lights or simple light objects.
I've been rendering 32-bit files recently and found you can recover those burned highlights quite easily, so you might want to try that as well.
Title: Re: White Jaggies In Renders
Post by: sloanelliot on November 01, 2019, 07:52:06 AM
Thanks for sharing your scene, that's really helpful.

There are a number of ways you could approach lighting this scene to help with realism, etc., but to directly address the issues you're having: by "hot" I/we just meant too bright for the application. But seeing your scene, I can understand why 1200 lumen was used (it's a large, open space). Problem is, Keyshot doesn't do well with RENDERING the actual light source itself that hot (kind of like staring into the sun, ha). One "easy" way to handle this is to duplicate your light sources, unlink those from the originals, and then change their light type to Emissive via the drop-down in the material graph/editor (this will act as the "cosmetic" version of your light source). Then simply go back to your originals and uncheck "visible to camera" and "visible in reflections" ... so you get the light punch you want out of a powerful light source, without blowing out those pixels at the same time. Don't worry about losing your light source in reflections, because the emissive light will still cast those (as long as those boxes are checked; i.e., visible to camera, visible in reflections). You can also crank the emissive up quite a bit more without that problem, if you're not getting strong enough reflection data.

Of course, you could also use IES lights and match the properties of the exact lamp you're mimicing, but honestly I think this will get you there just fine.

Hope it helps. (Note: the attachment was just a 30sec realtime screenshot, so ignore the noise, etc.; that will res-up and clean up just fine).

Title: Re: White Jaggies In Renders
Post by: sloanelliot on November 01, 2019, 08:13:33 AM
I'll also add, if you're noticing longer-than-ideal render times on these, instead of duplicating the original light source geometry, place simple 2D planes and discs for the area lights at the same locations (again, invisible to camera). If this is linked up to a CAD file, it'd be a lot easier to do that in CAD vs. in KS. The reason I say this is because light rays are projected from the surface normals of the base geometry of your light source, so if your base light source geometry is 3D/complex, it can result in a lot of unnecessary calculation (v.s a 2-dimensional object with much cleaner bounces).
Title: Re: White Jaggies In Renders
Post by: RRIS on November 01, 2019, 08:23:12 AM
Hi Don, sloanelliot explained it better than I could! Indeed the trick is to use two objects at the same time. One object to illuminate (the hidden area light) and one object to well, look light-like (the emissive material).
As for 32-bit, that's opening a can of worms that I'm not quite ready to deal with myself (but will give you loads of freedom in compositing). I made a topic about it myself yesterday here: https://www.keyshot.com/forum/index.php?topic=25198.0 (https://www.keyshot.com/forum/index.php?topic=25198.0)

Good luck and let us know if it worked for you!
Title: Re: White Jaggies In Renders
Post by: sloanelliot on November 01, 2019, 03:45:07 PM
Nice! That's awesome to hear. I also saw you had bounces set to 6 when really, 2-3 is enough for what you're doing (i.e., enough to make basic glass transparent).

As far as the environment highlights, your contrast was at 1 so you could bump that to 0 (in KS "0" is actually more like "1" in many programs, you can also go to "-1" etc.). Also check the brightness/contrast of your background image WITHIN the HDRI (if your version has the HDRI editor)-- that setting isn't linked to the global brightness/contrast, so sometimes you'll have brightness or contrast spiked to like 2 or 3 there and not even know it. HDRI's are also hit or miss because it wholly depends on the method they were created. Some are totally blown out and you have to take their brightness down to something absurdly low like .01 and others are just the opposite. Sometimes the best approach is to put a background either as a backplate or mapped to a physical plane or dome set to Emissive and then add physical lights to match the light sources of the background image (i.e., the sun).

I would just kill all other scene lights and play around with a brightness/contrast that works for the environment alone first and foremost, THEN back in your scene lights and adjust them accordingly. Just play around with the variables a bit. A physical plane somewhere central in the scene set as an area light and used just as a global "fill" light can also give your entire scene a boost (turn off camera, reflections and shadows and make it very large and central)..