Optix raise error when finding child node of Transform

I’m currently tring to add some animation to some actor, so I followed the instruction as the optixDynamicGeometry. As I update geometry’s position, I have to set dirty to all of the Graph node(the same structure as optixDynamicGeometry)

for (i = 0, j = 0; i < scene->animated_mesh_names.size(); ++i, ++j) {
			OptiXMesh mesh;
			Transform xform = context->createTransform();
			GeometryGroup geometry_group = context->createGeometryGroup();
			geometry_group->setAcceleration(context->createAcceleration("Trbvh"));
			h_group_handles.push_back(xform);
			mesh.context = context;

			// override defaults
			mesh.intersection = context->createProgramFromPTXFile(ptx_path, "mesh_intersect_refine");
			mesh.bounds = context->createProgramFromPTXFile(ptx_path, "mesh_bounds");
			if (scene->materials.size() > 0)
				mesh.material = createMaterial(scene->materials[i], i);

			loadMesh(scene->animated_mesh_names[i], mesh, scene->animated_mesh_transforms[i]);
			geometry_group->addChild(mesh.geom_instance);
			xform->setChild(geometry_group);

			aabb.include(mesh.bbox_min, mesh.bbox_max);

			std::cerr << scene->animated_mesh_names[i] << ": " << mesh.num_triangles << std::endl;
			num_triangles += mesh.num_triangles;

			group->addChild(xform);
			m_meshs[i].xform = xform;
		}

but when I travel to geometry group node, the optix raise ‘Invalid value’ error

Any reply are appreciated!

Hi, I don’t see an obvious issue in the code you’ve posted, would you be able to share a complete sample that reproduces the issue?

Also let me know which OS & driver you’re using.


David.

Thank you for your reply, here is the cpp file that related to this error, this is rebuild from the GitHub project optixPathTracer.
And I am currently using RTX2070 on Windows 10 1903 with driver version 419.67.
optixPathTracer.cpp (30.5 KB)
plyFactory.cpp (3.46 KB)
plyFactory.h (989 Bytes)
sceneLoader.cpp (13.6 KB)
sceneLoader.h (2.74 KB)