Hi Folks!
A friend is working on a shot where he has to make gradually smaller copies of a scene with a camera zoom in, he wants all of them to look the same so that it can loop seamlessly. If we make the lights in each scene include only the objects in the max file, when we xref it multiple times we get consistent lighting. The next issue is now reflections where we don't want a model from one xref to reflect anything from another. Since there's a high object count I want to script trace sets so that it'll loop through all geo in the scene and add in every object in the scene except itself. This should be fine but I'm getting a dependency loop error. Any thoughts as to why the assignment doesn't behave?
Here's my code which is less elegant than dave wortley's, who is also getting the same error:
On a simple scene with a box, sphere and a teapot here's my error log:
Any thoughts?
A friend is working on a shot where he has to make gradually smaller copies of a scene with a camera zoom in, he wants all of them to look the same so that it can loop seamlessly. If we make the lights in each scene include only the objects in the max file, when we xref it multiple times we get consistent lighting. The next issue is now reflections where we don't want a model from one xref to reflect anything from another. Since there's a high object count I want to script trace sets so that it'll loop through all geo in the scene and add in every object in the scene except itself. This should be fine but I'm getting a dependency loop error. Any thoughts as to why the assignment doesn't behave?
Here's my code which is less elegant than dave wortley's, who is also getting the same error:
Code:
theObjs = geometry as array for i = 1 to theObjs.count do ( format "debug: working on object % \n" theObjs[i].name theTempArray = (for g in geometry where [URL="http://g.name/"]g.name[/URL] != theObjs[i].name collect g) print theTempArray theTraceSet = vrayGetTraceSets theObjs[i] theTraceSet.reflect_exclude = theTempArray --theTraceSet.reflect_exclude_type = 1 --theTraceSet.refract_exclude_type = 1 )
Code:
#($Box:Box001 @ [-1873.043213,223.505310,0.000000], $Sphere:Sphere001 @ [2674.760010,376.476868,0.000000], $Teapot:Teapot001 @ [6023.598633,310.325775,0.000000]) debug: working on object Box001 $Sphere:Sphere001 @ [2674.760010,376.476868,0.000000] $Teapot:Teapot001 @ [6023.598633,310.325775,0.000000] debug: working on object Sphere001 $Box:Box001 @ [-1873.043213,223.505310,0.000000] $Teapot:Teapot001 @ [6023.598633,310.325775,0.000000] -- Error occurred in i loop; filename: ; position: 717; line: 19 -- Frame: -- i: 2 -- theTempArray: #($Box001, $Teapot001) -- theTraceSet: VRayTraceSets:V-Ray trace sets -- Runtime error: Assignment failed, possible dependency loop, $Box:Box001 @ [-1873.043213,223.505310,0.000000]
Any thoughts?
Comment