Shadow & Lighting Issues

Started by Don Cheke, November 12, 2019, 11:15:33 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Don Cheke

I know I am new to keyshot so probably have lots to learn, but I am wondering if this CAD HD version of KeyShot is just not up to the job. I don't see these kind of issues in the KeyShot gallery when I have looked and yet I see them too often in my renderings.

In the first attached image, what is with the jagged shadows. These are there whether shadow quality is set to 1 or 5. I thought maybe it had to do with material refraction, but changing that just changes the overall look from pretty good to pretty bad.

In the second image I am seeing white jaggies again and based on past experience this does not seem to be lighting based but something wrong with the program, not being able to anti alias white. White are typically hot spots from bright environment reflections and they are desirable - but the jaggies are not.

I don't have $1500 extra to move up to the better version of KeyShot, even assuming that might be what is needed. I really like KeyShot, but I am getting frustrated with these little issues.

sloanelliot

Hi Don. I'm pretty certain there's no difference to the core rendering algorithm in your version vs. the full version, but I could be mistaken. I hate to say it, but every rendering platform varies and all come with their share of headaches and learning curves.. If you can share the project file again I'd be happy to take a look at it. As I'd mentioned in your other thread, you typically want to avoid "100%" anything-- 100% white (especially with lights and HDRI pins, etc.), 100% black, 100% gloss, etc. But I agree, the shadows look off and I'm curious if it's scale/units related. I'm confident there's a solution!

Ha, I and I swear-- Keyshot is worth the effort once you get the hang of it.

sleby

As far as I can see there is something odd with environment. Have you tried changing it?

sloanelliot

#3
Don, this looks to be geometry related and happens a lotwhen importing faceted OBJ/FBX/STL files from certain 3D applications, where the geometry isn't defined as "smooth" (i.e., smoothing groups / Phong algorithms that trick the rendering application into smoothing out round shapes like spheres and cylinders that would otherwise take millions of faces to actually show as "smooth"). But I'm also surprised at this, considering it's coming from a CAD application vs. sub-d app like Maya or Blender.

If you apply a wireframe material to the object (see attached), the "humps" in the shadow pass correlate with the geometry breaks, and a quick test using a few cylinders in the same scene w/same material show the shadows rendering fine with geometry that's of similar density (which rules out being related to actual mesh density).

I'm not familiar with your CAD application/setup, but if you have the option to export your file with NURBS data or in a NURBS format (STEP, IGES, etc.), you can render as a NURBS object (zero faceting or tesselation) within Keyshot (not sure if that's a Pro-only feature or not). Alternatively, if there's an option to apply smoothing within your CAD program upon exporting a mesh object, that's the typical solution ... I'm just surprised it wouldn't by default. How are you getting files from CAD to Keyshot, and are there any export/import options in the pipeline along the way? If you have tesselation quality options in your import dialog version, you can try to bump the value to see if it helps improve things as well.

sloanelliot

Meant to add: I did try the usual "calculate normals" approach within Keyshot's geometry editor, but to no avail (I'm also pretty certain you don't have that feature so it's a moot point).

sloanelliot

Hmm. That's definitely tricky. I guess what I'm not wrapping my head around is why the link between Keyshot and Alibre isn't sending NURBS data (it's definitely sub-d in the KSP you sent over). Inherently, STEP is a NURBS format, so it seems that the plugin/linking is just converting the NURBS data to sub-d while en route to Keyshot, and without smoothing data (to tell the renderer which surfaces should blend seamlessly and which should maintain hard edges). Adding more triangles/quads probably wouldn't help in this scenario.

Have you tried reaching out to Alibre? The only thing I'm not buying with even my own explanation here is that overall, the geometry APPEARS smooth, so I feel like it has to have something to do with the translation between Alibre and KS and very likely something in the export settings on that end? Wish I could be of more help. It doesn't appear to be on the KeyShot side of things, though. You could always export to another program like Blender (free) and add a "smooth" modifier, but that's assuming you can even export (Keyshot allows you to export as OBJ etc., but not sure if your version does or if Alibre does)..

I'm a SolidWorks guy as well so I feel you there, ha. I will say that Fusion 360 is a massively valuable parametric modeling suite that matches a lot of what SW does for about 1/10 the cost; maybe Luxion will give you a discount to upgrade from your current setup if you ask nicely and tell them your challenges haha..

sloanelliot

Looks nice!

Funny thing is, there isn't any faceting on this one...I really feel like Alibre can help with a solution as to why it's happening in some cases and not others. If you find a solution, post it here! I've lost count of how many "ancient" forum posts have saved my ass over the years. Always good to have the knowledge base..

Jesper Mosegaard

The problem with the jagged shadows is a combination of a low polygon geometry and high contrast lighting.

Smoothing groups and normals on the geometry casting shadow has nothing to do with the artefact itself. It's all down to the fact that the shape of the geometry is actually faceted, and this is revealed when seen in a silhouette or as a shadow. As an example see the two attached images showing the difference tesselation does to shadows in an extreme hdri env.

In general the solution is to crank up the quality of the mesh - and to use more smooth natural lighting.