[Bf-cycles] uv coordinates in Cycles standalone

Sergey Sharybin sergey.vfx at gmail.com
Tue Dec 29 13:31:32 CET 2015


Ok, seems i'll have to look into this in details. Will do it later.

Do you mind report the issue to our bug tracker [1] under the Cycles
project? Attaching your simple .xml and textures you're using will make
troubleshooting even easier :)

[1] https://developer.blender.org/

On Tue, Dec 29, 2015 at 2:12 PM, Guillaume Rouault <
guillaume.rouault.fx at gmail.com> wrote:

> Sorry I didn't take time to answer you before.
>  I did add the line to increment index_offset in the code. It compiled
> fine, and the uv "stuttering" seems to be gone.
> It seems a lot more logical like that.
> But still, my uvs are messed up. First polygon is alright, but anything
> after that is messed up. I must do something wrong.
> I spent way to much time trying to export uvs in the right way, when they
> couldn't even be rendered correctly by cycles standalone.  And now I wonder
> if there are some other problems with in the source code.
>  I don't think I will try again unless I see an image with working uvs ,
> rendered with the standalone using XML API. ( I guess I am sort of giving
> up there .... )
> The fact that motion blur is not available yet is also a big issue to me.
>
> Anyway, this little adventure has taught me a lot already. Unfortunately
> my C++ skills are pretty bad. So I'm looking forward to see what awesome
> stuff you guys will give us.
>
> Guillaume Rouault
>
> On Wed, Dec 23, 2015 at 12:45 PM, Sergey Sharybin <sergey.vfx at gmail.com>
> wrote:
>
>> This indeed seems weird and form quick glance we have to increase
>> index_offset by nverts[i] at the end of the outer loop.
>>
>> WOuldn't have time until weekend to look deeper, mind testing such a
>> modification and telling if it all works correct after the change?
>>
>> On Wed, Dec 16, 2015 at 1:30 AM, Guillaume Rouault <
>> guillaume.rouault.fx at gmail.com> wrote:
>>
>>> When I look at the code here :
>>>
>>> https://developer.blender.org/diffusion/C/browse/master/src/app/cycles_xml.cpp;65ff373f0c71c043dd7b5632580501f1fc4bea7e$959
>>>
>>> what I understand is that triangles are created from the provided Ngons
>>> , and the same is done with the uvs below.
>>> So data should be as simple as :
>>> - a list of vertices
>>> - a list of corresponding uvs.
>>>
>>> UV="
>>> 0.0 0.0
>>> 1.0 0.0
>>> 1.0 1.0
>>> 1.0 0.0
>>> "
>>> nverts="4"
>>> verts="0 1 2 3"
>>>
>>> and indeed, it works with a simple plane with 4 vertices.
>>> 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't understand.
>>>
>>> In cyles_xml.cpp where the uvs are created:
>>>
>>> /* loop over the triangles */
>>>  index_offset = 0;
>>> ...
>>> ....
>>> , is it normal that this variable index_offset is never incremented
>>> during the loop?  Isn't looping over the same polygon over and over ?
>>> (which would explain the uv "repetition" )
>>> Can somebody confirm if I am right or wrong ?
>>>
>>>
>>> Guillaume
>>>
>>> On Tue, Dec 15, 2015 at 4:00 PM, Nathan Letwory <nathan at mcneel.com>
>>> wrote:
>>>
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA256
>>>>
>>>> Hi Guillaume,
>>>>
>>>> Ah, I forgot that in my XML importer implementation (C#) I convert
>>>> quads to triangles. I'm looking at nverts, then if it is 4 I add two
>>>> triangles instead of one quad. Excuses about that.
>>>>
>>>> I don't know precisely how the C++ XML import is written, you'll have
>>>> to check the code for that.
>>>>
>>>> /Nathan
>>>>
>>>> On 14/12/2015 18:02, Guillaume Rouault wrote:
>>>> > Hi again,
>>>> >
>>>> > @Nathan, you mentionned to me somewhere that uvs a listed by
>>>> > triangles, but in the example file you gave me:
>>>> >
>>>> https://github.com/jesterKing/CCSycles/blob/master/tests/objects/uv_cu
>>>> be.xml
>>>> <https://github.com/jesterKing/CCSycles/blob/master/tests/objects/uv_cube.xml>
>>>> >
>>>> >  uvs are clearly listed by squares ( 6 of them of course)
>>>> >
>>>> > To be honest, I have really hard time exporting my uvs from
>>>> > houdini. I've tried a lot of things already, and nothing seems to
>>>> > work, I am on the verge of giving up frankly, which would be a
>>>> > shame, because uvs are my last main issue, I have almost a basic
>>>> > working solution for simple animations rendering with houdini.
>>>> >
>>>> > Guillaume
>>>>
>>>>
>>>> - --
>>>> Nathan Letwory
>>>> -----BEGIN PGP SIGNATURE-----
>>>> Version: GnuPG v2
>>>>
>>>> iQEcBAEBCAAGBQJWcCsrAAoJEKtfN7KsE0TtqCIIAL5j7pws4/n9vzLNt35k/L1t
>>>> rmTaGuA4ndnaLoHvJcpHEtDM93+UtXjEMvcPAbg3efr9wQCrPyrjgPa57SrFebVM
>>>> qf/UXYAHRipyNhQ7lXUJMo+Y9ViRIfhL8ceO0F8IX1v3VzhS93EMqhEEL3X3fRoF
>>>> 2OaTWTzxeFNCdy6edNVlo/VGhnuP9p0xl7ncTCrCl4+gLSDb9G9LqHsII0+09JAp
>>>> 2gbtnoW47rtBP4jbVYXjKIe8zah3A7KTQtwaWAgIZz3c1Fr+CbWp2qt19wfSqv2f
>>>> B67cTOqxV1JogUSSH9Zg1+vwwG4vx8Nobp4cagWPdLFI38mxXKmk1TZmWlC90hQ=
>>>> =RNxL
>>>> -----END PGP SIGNATURE-----
>>>> _______________________________________________
>>>> Bf-cycles mailing list
>>>> Bf-cycles at blender.org
>>>> http://lists.blender.org/mailman/listinfo/bf-cycles
>>>>
>>>
>>>
>>> _______________________________________________
>>> Bf-cycles mailing list
>>> Bf-cycles at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-cycles
>>>
>>>
>>
>>
>> --
>> With best regards, Sergey Sharybin
>>
>> _______________________________________________
>> Bf-cycles mailing list
>> Bf-cycles at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-cycles
>>
>>
>
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
>
>


-- 
With best regards, Sergey Sharybin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20151229/0b2a686a/attachment.htm 


More information about the Bf-cycles mailing list