Cycles: Ignore zero size instances in BVH
In certain types of animation it's possible to have some objects scaling to zero. In this case we can save render times by avoid traversing such instances. Better to do ti ahead of a time, so traversal stays simple. Reviewers: lukasstockner97, dingto, brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D2048
This commit is contained in:
@@ -225,6 +225,16 @@ vector<float> Object::motion_times()
|
||||
return times;
|
||||
}
|
||||
|
||||
bool Object::is_traceable()
|
||||
{
|
||||
/* Mesh itself can be empty,can skip all such objects. */
|
||||
if (bounds.size() == make_float3(0.0f, 0.0f, 0.0f)) {
|
||||
return false;
|
||||
}
|
||||
/* TODO(sergey): Check for mesh vertices/curves. visibility flags. */
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Object Manager */
|
||||
|
||||
ObjectManager::ObjectManager()
|
||||
|
Reference in New Issue
Block a user