Page MenuHome

Cycles Standalone missing generated coordinates
Closed, ResolvedPublic

Description

Something is broken with the nodes.

This is the example "scene_monkey.xml"
*The monkey should be Glass
*The ground should be checkerboard
http://imagizer.imageshack.com/img923/2464/reKxvE.png

*no changes from master on Win10 VS2013
*compiled and tested cycles standalone in both "rB Blender" and "rC Cycles"

I tested my compiled blender.exe, and the glass and checkerboard nodes work in blender, but something is not working in the standalone.

What it should look like:
http://www.blendernation.com/wp-content/uploads/2014/01/standalone.png

Event Timeline

Seems cycles is not adding generated UV coordinates to the checker texture.

This comment was removed by David (bocs).

I hope this helps make a proper patch...
I noticed during debugging that it's missing the ATTR_STD_GENERATED attribute.

which led me to this...

This code was removed from intern/cycles/render/mesh.cpp

			/* todo: get rid of this exception, it's only here for giving some
			* working texture coordinate for subdivision as we can't preserve
			* any attributes yet */
			if (!triangle_mattr && req.std == ATTR_STD_GENERATED) {
				triangle_mattr = mesh->attributes.add(ATTR_STD_GENERATED);
				if (mesh->verts.size())
					memcpy(triangle_mattr->data_float3(), &mesh->verts[0], sizeof(float3)*mesh->verts.size());
			}

without code:
http://imagizer.imageshack.com/img924/6018/lz7Tjh.png

With code:
http://imagizer.imageshack.com/img924/4740/L1C8uH.png

Off Topic:
I'm trying to intergrate Cycles into Unity, this is from a few months ago
https://youtu.be/wNtFdrKwkfM?t=1m15s

As far as I know Cycles standalone never provided generated coordinates, so its a bit odd to say that that commit caused this. Check that you're using updated repos/files.

Not sure what the correct solution is here, as generated coordinates come from Blender, I guess we can mimic the behavior?

Mai Lavelle (maiself) renamed this task from Cycles Standalone Broken to Cycles Standalone missing generated coordinates.Nov 11 2016, 2:28 PM

well the xml does render correctly in older versions of cycles standalone. I.E. with generated coordinated. and there are no coordinates in that file.

Brecht Van Lommel (brecht) claimed this task.

We don't yet support arbitrary mesh attributes in the XML file reading, and ideally generated coordinates should be passed that way. But none are available we can still use the vertex coordinates as a fallback, I'll restore that code.