[Bf-cycles] Correct way to set-up UV channel for a texture?

griffin2000 garethmorgan1977 at gmail.com
Fri Nov 24 18:32:25 CET 2017


Oh I guess it needs to be TypeVector not TypePoint. Works fine if I do this:

		ccl::Attribute *attr_vUV = mesh->attributes.add(ccl::ustring("UVMap"),
ccl::TypeDesc::TypeVector, ccl::ATTR_ELEMENT_VERTEX);
		attr_vUV->std = ccl::ATTR_STD_UV;
		ccl::float3 *fUV = attr_vUV->data_float3();

		for (int i = 0; i < verts_size; i++)
		{
			fUV[i].x = UVs[i * 2 + 0];
			fUV[i].y = UVs[i * 2 + 1];
			fUV[i].z = 0.0f;
		}

Thanks for the advice



--
Sent from: http://blender.45788.x6.nabble.com/Bf-cycles-f7.html


More information about the Bf-cycles mailing list