[Bf-cycles] uv coordinates in Cycles standalone

Mohamed Sakr 3dsakr at gmail.com
Wed Dec 9 23:16:08 CET 2015


it is under cycles/src/blender/
you can search for ATTR_STD_UV inside cycles_xml.cpp

cheers,
Mohamed Sakr

On Wed, Dec 9, 2015 at 11:42 PM, Guillaume Rouault <
guillaume.rouault.fx at gmail.com> wrote:

>
> I couldn't find a file named blender_mesh.cpp in the sources I have.
> And I think it would mainly give me some infos on how to format the mesh
> in the xml object file. but my main issue, I think, is at the shader level
> in the scene xml file, using the standalone XML API . How do I force the
> shader to use uv coordinates provided on the mesh ?
>
> Now that I think of it, there are no examples using uv mapped objects in
> the /examples folder, at least nothing using coordinates generated during
> modeling.  Is it even supported at this stage in the standalone version ?
>
> Guillaume
>
> On Wed, Dec 9, 2015 at 10:19 PM, Mohamed Sakr <3dsakr at gmail.com> wrote:
>
>> in blender_mesh.cpp, find attr_create_uv_map() function and see how they
>> create UVs
>>
>> On Wed, Dec 9, 2015 at 10:26 PM, Guillaume Rouault <
>> guillaume.rouault.fx at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I can't find any infos on uv coordinates for cycles standalone. As of
>>> now, I haven't been able to render an object with the correct uvs. I can
>>> see a texture, but it's mapped to every triangle on the mesh.
>>>
>>> I searched the xml api , and came up with that setup :
>>>
>>>
>>> *<!-- floor shader-->*
>>> *<shader name="floor" >*
>>> * <diffuse_bsdf name="diffuse" roughness="0.05" color="1.0, 1.0, 1.0" />*
>>> * <glossy_bsdf name="glossy" roughness="0.05" color="0.2, 0.2, 0.2" />*
>>>
>>> * <texture_coordinate name="uv" />*
>>> * <image_texture name="tex" src="./maps/aaa.jpg" />*
>>> * <add_closure name="mix" />*
>>> * <fresnel name="fresnel" />*
>>> * <connect from="fresnel fac" to="glossy color" />*
>>>
>>> * <connect from="uv uv" to="tex vector" />*
>>> * <connect from="tex color" to="diffuse color" />*
>>>
>>>
>>> * <connect from="diffuse bsdf" to="mix closure1" />*
>>> * <connect from="glossy bsdf" to="mix closure2" />*
>>> * <connect from="mix closure" to="output surface" />*
>>> *</shader>*
>>>
>>>
>>> Am I on the right path ?
>>> Are there any examples or infos on uvs somewhere ?
>>> Actually, on my meshes,  I don't even know if I have to export uv coords
>>> as vector2  (uv) , or vector3 (uvw) ?
>>>
>>>
>>> *Guillaume*
>>>
>>> _______________________________________________
>>> 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
>>
>>
>
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> http://lists.blender.org/mailman/listinfo/bf-cycles
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20151210/8ecc81e6/attachment.htm 


More information about the Bf-cycles mailing list