[Bf-cycles] Smooth Shading

Santosh Singh santoshmca.giit at gmail.com
Tue Mar 19 12:29:14 CET 2019


Thanks for response,

I am using the mesh with UV

<shader name="sphere">
<texture_coordinate name="texcoord" />
<image_texture name="tex" filename="D:\abc\Burgun-Net-1_8bit.png" />
<diffuse_bsdf name="cube_closure" roughness="0.0" color="1.0, 0.5, 0.25" />
<connect from="texcoord uv" to="tex vector" />
<connect from="tex color" to="cube_closure color" />
<connect from="cube_closure bsdf" to="output surface" />
</shader>
<!-- Sphere Object -->
<transform matrix=" 1 0 -0 0 0 1 -0 0 0 0 -1 0 -0 -0.25 -0.0225 1 ">
<state interpolation="smooth" shader="sphere">
<mesh P="1.000000 -1.000000 -1.000000  1.000000 1.000000 -1.000000
-1.000000 1.000000 -1.000000  -1.000000 -1.000000 -1.000000  1.000000
-0.999999 1.000000  0.999999 1.000001 1.000000  -1.000000 1.000000
1.000000  -1.000000 -1.000000 1.000000  " UV="0.0 0.0 1.0 0.0 1.0 1.0  0.0
1.0 0.0 0.0 0.0 0.0 0.0 0.0  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0  0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0  0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0  0.0 0.0" nverts="4 4 4 4 4 4" verts="0 1 2 3 4 7 6 5 0 4 5 1 1
5 6 2 2 6 7 3 4 0 3 7"/>
</state>
</transform >

this is not helping me displaying  render with texture.

inside the code xml_read_mesh(....) there is parser for the UV Data, i am
passing the details using the xml file.

please check your side.

On Tue, Mar 19, 2019 at 4:38 PM Mohamed Sakr <3dsakr at gmail.com> wrote:

> you read number of verts per face in nverts
> xml_read_int_array(nverts, node, "nverts");
>
> search the file for UV
> if(xml_read_float_array(UV, node, "UV")) {
>
> so you need to export UVs with your file.
>
> On Tue, Mar 19, 2019 at 10:28 AM Santosh Singh <santoshmca.giit at gmail.com>
> wrote:
>
>> Hello Mr. Sakr,
>>
>> using Cycle code, how to display texture with render. What i am thinking
>> for texture display we need UV(vt value) data.
>>
>> Currently for the texture display i was trying to use obj file. i tried
>> to update obj details  same  like xml file manner into xml_read_mesh(....)
>> , the mesh structure is filling properly with the same details.
>>
>> currently with the Cycles render code using xml file we are passing only
>> *P*(vertex value) *verts*( face v value) and *nverts(*type of mesh poly
>> or quad).
>>
>> i  searched on google related texture with cycles i saw regarding UV
>> details. Please assist me regarding texture with cycles.
>>
>> may be after texture render i will be able to render bump map properly.
>> According to me for the bump map display we need UV data(vt value).
>>
>> Please guide me.
>>
>>
>>
>> On Mon, Mar 18, 2019 at 6:56 PM Santosh Singh <santoshmca.giit at gmail.com>
>> wrote:
>>
>>> Thanks dear.
>>> Tomorrow i will try with xml file. Then i will update to you.
>>>
>>> On Mon 18 Mar, 2019, 6:37 PM Mohamed Sakr, <3dsakr at gmail.com> wrote:
>>>
>>>> not sure, but parsing the obj file may be the cause of the problem,
>>>> from the code it is made to parse xml file only, Brecht or Sergey know more
>>>> about this
>>>>
>>>> On Mon, Mar 18, 2019 at 12:44 PM Santosh Singh <
>>>> santoshmca.giit at gmail.com> wrote:
>>>>
>>>>> Hello Dear,
>>>>>
>>>>> Please check the render image
>>>>> [image: image.png]
>>>>>
>>>>>
>>>>> <cycles>
>>>>> <background>
>>>>> <background name="bg" strength="1.0"
>>>>> color="0.886275,0.847059,0.768628"/>
>>>>> <connect from="bg background" to="output surface"/>
>>>>> </background>
>>>>> <!-- Camera  -->
>>>>> <transform matrix = "1.000000 0.000000 -0.000000 0.000000 0.000000
>>>>> 1.000000 -0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 -0.000000
>>>>> 1.500000 -3.700000 1.000000">
>>>>> <camera width="800" height="500" type="perspective"/>
>>>>> </transform>
>>>>>
>>>>> <shader name="0">
>>>>> <texture_coordinate name="Texture_Coordinate"/>
>>>>> <mapping name="mapping" Type="Point" Scale="1 1 1" />
>>>>> <image_texture name="imgtexture1" filename="D:\image\830.bmp"/>
>>>>> <image_texture name="imgtexture2" filename="D:\image\Border
>>>>> Fabric.jpg"/>
>>>>> <mix_closure name="Mix_Shader" fac="0.5" />
>>>>> <diffuse_bsdf name="df_bsdf1"/>
>>>>> <diffuse_bsdf name="df_bsdf2"/>
>>>>> <bump name="bumpMap" Strength="1.0" Distance="0.1" />
>>>>> <connect from="Texture_Coordinate UV" to="mapping vector"/>
>>>>> <connect from="mapping vector" to="imgtexture1 vector"/>
>>>>> <connect from="imgtexture1 Color" to="bumpMap Normal"/>
>>>>> <connect from="bumpMap normal" to="df_bsdf1 Normal"/>
>>>>> <connect from="df_bsdf1 BSDF" to="Mix_Shader closure1"/>
>>>>> <!-- <connect from="imgtexture2 Color" to="df_bsdf2 Color"/>
>>>>> <connect from="df_bsdf2 BSDF" to="Mix_Shader closure2"/> -->
>>>>> <connect from="Mix_Shader closure" to="output Surface"/>
>>>>> </shader>
>>>>>
>>>>> <transform matrix=" 1 0 -0 0 0 1 -0 0 0 0 -1 0 -0 -0.25 -1.99551 1 ">
>>>>> <state interpolation="smooth" shader="0">
>>>>> <include src="D:\BitBucket\obj\Render.obj"/>
>>>>> </state>
>>>>> </transform>
>>>>>
>>>>> <shader name="1">
>>>>> <texture_coordinate name="Texture_Coordinate"/>
>>>>> <mapping name="mapping" Type="Point" Scale="1 1 1" />
>>>>> <image_texture name="imgtexture1" filename="D:\image\Normal Map1.bmp"/>
>>>>> <image_texture name="imgtexture2" filename="D:\image\Border
>>>>> Fabric.jpg"/>
>>>>> <mix_closure name="Mix_Shader" fac="0.3" />
>>>>> <diffuse_bsdf name="df_bsdf1"/>
>>>>> <diffuse_bsdf name="df_bsdf2"/>
>>>>> <bump name="bumpMap" Strength="1.0" Distance="0.1" />
>>>>> <connect from="Texture_Coordinate UV" to="mapping vector"/>
>>>>> <connect from="mapping vector" to="imgtexture1 vector"/>
>>>>> <connect from="imgtexture1 Color" to="bumpMap Normal"/>
>>>>> <connect from="bumpMap normal" to="df_bsdf1 Normal"/>
>>>>> <connect from="df_bsdf1 BSDF" to="Mix_Shader closure1"/>
>>>>> <connect from="imgtexture2 Color" to="df_bsdf2 Color"/>
>>>>> <connect from="df_bsdf2 BSDF" to="Mix_Shader closure2"/>
>>>>> <connect from="Mix_Shader closure" to="output Surface"/>
>>>>> </shader>
>>>>>
>>>>> <transform matrix=" 1 0 -0 0 0 1 -0 0 0 0 -1 0 -0 -0.25 -1.99551 1 ">
>>>>> <state interpolation="smooth" shader="1">
>>>>> <include src="D:\BitBucket\obj\Render.obj"/>
>>>>> </state>
>>>>> </transform>
>>>>>
>>>>> </cycles>
>>>>>
>>>>>
>>>>> I am using the obj file instead of Xml data. please try any sphare or
>>>>> curved shape data with include source path.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Mar 18, 2019 at 5:42 PM Mohamed Sakr <3dsakr at gmail.com> wrote:
>>>>>
>>>>>> probably post an image and the xml file
>>>>>>
>>>>>> On Mon, Mar 18, 2019 at 11:53 AM Santosh Singh <
>>>>>> santoshmca.giit at gmail.com> wrote:
>>>>>>
>>>>>>> Thanks for quick respose, i am using the suggested interpolation
>>>>>>> smooth, but the effect is not comming with render output.
>>>>>>>
>>>>>>> On Mon 18 Mar, 2019, 5:18 PM Mohamed Sakr, <3dsakr at gmail.com> wrote:
>>>>>>>
>>>>>>>> in the examples/scene_monkey.xml
>>>>>>>> there is this line:
>>>>>>>> <state interpolation="smooth" shader="monkey">
>>>>>>>> that smooth is the smooth shading, for flat shading change it to
>>>>>>>> "flat"
>>>>>>>>
>>>>>>>> On Mon, Mar 18, 2019 at 10:49 AM Santosh Singh <
>>>>>>>> santoshmca.giit at gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hello Team Members,
>>>>>>>>>
>>>>>>>>> I am using cycles Standalone application for render output with
>>>>>>>>> (GPU quadro P4000).
>>>>>>>>> when using bump node, getting the bump effects with flat shading.
>>>>>>>>>
>>>>>>>>> Please guide me how to use flat or smooth shading into cycles
>>>>>>>>> render(standalone app).
>>>>>>>>> I saw into blender, there is shading option for smooth and flat.
>>>>>>>>>
>>>>>>>>> Please help me render with smooth shade.
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Thanks & Regards
>>>>>>>>>  Santosh Kumar Singh
>>>>>>>>>   Software Engineer
>>>>>>>>> _______________________________________________
>>>>>>>>> Bf-cycles mailing list
>>>>>>>>> Bf-cycles at blender.org
>>>>>>>>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Bf-cycles mailing list
>>>>>>>> Bf-cycles at blender.org
>>>>>>>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Bf-cycles mailing list
>>>>>>> Bf-cycles at blender.org
>>>>>>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>>>>>>
>>>>>> _______________________________________________
>>>>>> Bf-cycles mailing list
>>>>>> Bf-cycles at blender.org
>>>>>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks & Regards
>>>>>  Santosh Kumar Singh
>>>>>   Software Engineer
>>>>> _______________________________________________
>>>>> Bf-cycles mailing list
>>>>> Bf-cycles at blender.org
>>>>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>>>>
>>>> _______________________________________________
>>>> Bf-cycles mailing list
>>>> Bf-cycles at blender.org
>>>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>>>
>>>
>>
>> --
>> Thanks & Regards
>>  Santosh Kumar Singh
>>   Software Engineer
>> _______________________________________________
>> Bf-cycles mailing list
>> Bf-cycles at blender.org
>> https://lists.blender.org/mailman/listinfo/bf-cycles
>>
> _______________________________________________
> Bf-cycles mailing list
> Bf-cycles at blender.org
> https://lists.blender.org/mailman/listinfo/bf-cycles
>


-- 
Thanks & Regards
 Santosh Kumar Singh
  Software Engineer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-cycles/attachments/20190319/c7ffd46b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 259546 bytes
Desc: not available
URL: <http://lists.blender.org/pipermail/bf-cycles/attachments/20190319/c7ffd46b/attachment.png>


More information about the Bf-cycles mailing list