FYI: Issue with Combin Children script and AO shaders

Here’s a head’s up about a problem with the CombineChildren script for combining meshes to optimize objects.

If you have a tree or other model with one mesh and two materials that uses the Ambient Occlusion shaders, CombineChildren will crash Intel integrated graphics cards on Windows Vista, regardless of the driver version.

According to Aras, the technical reason is that “the current incarnation of CombineChildren script does not properly combine vertex colors, so if input meshes did have them, then the combined mesh does not.” And since the AO shaders use vertex colors, they can’t find them in the mesh combined by CombineChildren.

The solution, until the CombineChildren script can be rewritten to properly combine vertex colors, is not to use it on objects with the AO (and perhaps other) shader that use vertex colors.

Hope this helps if anyone has been having mysterious crashes on Vista with Intel graphics.

Hey Steve,

Thanks for the tip. Would you like me to add vertex colors to CombineChildren real quick? Just in case someone already hasn’t done it. :slight_smile:

Cheers,
-Jon

Jon,
Why wouldn’t I like you to add vertex colors to CombineChildren?! :smile:
I’m emailing you all of Aras’ email about the issue, in case there are any further details that might help you.
Thank you much for your offer!
Steve

Did this ever get fixed? I would like a copy if so. I am having visual issues with CombineChildren and Bumped Diffuse shaders. I am wondering if this would fix it.

We ended up just using a model that didn’t need to use the AO shader, so stuck with the old CombineChildren.

Not sure where it’s at with Unity 2.6 imminent.