<div dir="ltr"><div>When I look at the code here :</div><a href="https://developer.blender.org/diffusion/C/browse/master/src/app/cycles_xml.cpp;65ff373f0c71c043dd7b5632580501f1fc4bea7e$959">https://developer.blender.org/diffusion/C/browse/master/src/app/cycles_xml.cpp;65ff373f0c71c043dd7b5632580501f1fc4bea7e$959</a><div><br></div><div>what I understand is that triangles are created from the provided Ngons , and the same is done with the uvs below. </div><div>So data should be as simple as :</div><div>- a list of vertices</div><div>- a list of corresponding uvs. </div><div><br></div><div>UV=&quot;</div><div>0.0 0.0</div><div>1.0 0.0 </div><div>1.0 1.0</div><div>1.0 0.0</div><div>&quot;</div><div>nverts=&quot;4&quot;</div><div>verts=&quot;0 1 2 3&quot;</div><div><br></div><div>and indeed, it works with a simple plane with 4 vertices.</div><div>Problems come when I add a second polygon. What ever I do , the second polygon invariably gets the same coords as the first one. Thas, I REALLY don&#39;t understand.</div><div><br></div><div>In cyles_xml.cpp where the uvs are created: </div><div><br></div><div>/* loop over the triangles */</div><div> index_offset = 0;</div><div>...</div><div>....</div><div>, is it normal that this variable index_offset is never incremented during the loop?  Isn&#39;t looping over the same polygon over and over ? (which would explain the uv &quot;repetition&quot; )</div><div>Can somebody confirm if I am right or wrong ?</div><div><br></div><div><br></div><div>Guillaume</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 15, 2015 at 4:00 PM, Nathan Letwory <span dir="ltr">&lt;<a href="mailto:nathan@mcneel.com" target="_blank">nathan@mcneel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA256<br>
<br>
</span>Hi Guillaume,<br>
<br>
Ah, I forgot that in my XML importer implementation (C#) I convert<br>
quads to triangles. I&#39;m looking at nverts, then if it is 4 I add two<br>
triangles instead of one quad. Excuses about that.<br>
<br>
I don&#39;t know precisely how the C++ XML import is written, you&#39;ll have<br>
to check the code for that.<br>
<br>
/Nathan<br>
<span class=""><br>
On 14/12/2015 18:02, Guillaume Rouault wrote:<br>
&gt; Hi again,<br>
&gt;<br>
&gt; @Nathan, you mentionned to me somewhere that uvs a listed by<br>
&gt; triangles, but in the example file you gave me:<br>
&gt; <a href="https://github.com/jesterKing/CCSycles/blob/master/tests/objects/uv_cu
be.xml" rel="noreferrer" target="_blank">https://github.com/jesterKing/CCSycles/blob/master/tests/objects/uv_cu<br>
be.xml</a><br>
&gt;<br>
&gt;  uvs are clearly listed by squares ( 6 of them of course)<br>
&gt;<br>
&gt; To be honest, I have really hard time exporting my uvs from<br>
&gt; houdini. I&#39;ve tried a lot of things already, and nothing seems to<br>
&gt; work, I am on the verge of giving up frankly, which would be a<br>
&gt; shame, because uvs are my last main issue, I have almost a basic<br>
&gt; working solution for simple animations rendering with houdini.<br>
&gt;<br>
&gt; Guillaume<br>
<br>
<br>
</span><span class="">- --<br>
Nathan Letwory<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v2<br>
<br>
</span>iQEcBAEBCAAGBQJWcCsrAAoJEKtfN7KsE0TtqCIIAL5j7pws4/n9vzLNt35k/L1t<br>
rmTaGuA4ndnaLoHvJcpHEtDM93+UtXjEMvcPAbg3efr9wQCrPyrjgPa57SrFebVM<br>
qf/UXYAHRipyNhQ7lXUJMo+Y9ViRIfhL8ceO0F8IX1v3VzhS93EMqhEEL3X3fRoF<br>
2OaTWTzxeFNCdy6edNVlo/VGhnuP9p0xl7ncTCrCl4+gLSDb9G9LqHsII0+09JAp<br>
2gbtnoW47rtBP4jbVYXjKIe8zah3A7KTQtwaWAgIZz3c1Fr+CbWp2qt19wfSqv2f<br>
B67cTOqxV1JogUSSH9Zg1+vwwG4vx8Nobp4cagWPdLFI38mxXKmk1TZmWlC90hQ=<br>
=RNxL<br>
<div class="HOEnZb"><div class="h5">-----END PGP SIGNATURE-----<br>
_______________________________________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">http://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
</div></div></blockquote></div><br></div>