none
Working with LD3DView RRS feed

  • Question

  • I am not experienced with 3D modeling, but I am learning fast  ;)

    Please, I would like to have a better explanation of how, for example, a semi sphere can be seen outside and inside, on both surfaces.

    I understood and easily used the points and indices in the 'LD3DView.AddGeometry' command. But either I just see the outside or just the inside. Never both. I still do not understand how to use the optional 'normals' method.

    Could someone give me a light?





    G
    M
    T
    <input id="SL_locer" title="Bloquear idioma" type="checkbox" /> <select id="SL_lng_from" style="background:rgb(255, 255, 255) url("moz-extension;"><option value="auto">Detectar idioma</option><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select>
    <select id="SL_lng_to" style="background:rgb(255, 255, 255) url("moz-extension;"><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option selected="selected" value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select>
    A função de fala é limitada a 200 caracteres
    <input checked="checked" id="SL_BBL_locer" title="Mostrar o botão do ImTranslator 3 segundos" type="checkbox" />
    Opções : Histórico : Comentários : Donate Encerrar
    • Edited by Jackson Mello Saturday, December 2, 2017 2:09 AM Corrupted Text
    Saturday, December 2, 2017 1:59 AM

Answers

  • Hi Jackson,

    Every 3D model is rendered to a flat image you see on the sreen.  To do this there are 3 important parts:

    1. Objects that emit light, diffuse, directional lights etc
    2. Objects in the scene that reflect light
    3. A viewer position and direction

    In order for the viewer (camera) to see an object (rendered on the screen) the light must reflect off the object and travel to the camera.  Therefore the object must have an outward direction pointing at least partially towards the camera.  The objects have only one outside direction, this make it easier for the renderer to view a scene without trying to render the hidden back surfaces.

    The objects are always just collections of triangles, each vertex of the triangle has an outward normal (the direction that light will be maximally reflected).  By default the direction is set by the order in which the vertices of the triangle are listed (clockwise or anticlockwise).  The outward normals can be set to provide smoother curved surfaces (to appear less faceted).  They can indeed by completely reversed etc.

    In general it is possible to specify a front and back material, however I have not implemented this in LD3DView, so to see both sides of an object you need 2 overlapping objects with normals in opposite directions.  The 3D rubic cube sample does this for the black inside (see 'Interior colour cubes').

    Normals are just the outward direction of a node vertex - some googling will fill in more details with pictures.

    EDIT

    SInce it may be useful, I added the following methods and uploaded to beta test version of extension.

    LD3DView.SetBackMaterial

    LD3DView.AddBackImage

    Saturday, December 2, 2017 9:24 AM
    Moderator
  • Thank you very much LitDev

    From what I understand, answering my question, so you would need to override two objects — one with the vision of the external surface and the other with the vision of the inner surface.

    YES

     In the example I gave earlier ( semi sphere) by rotating it on the x-axis in the vision of the camera I can only see the exterior and when the inside is facing the camera I see nothing.  The correction that would then do an outer surface on the object 1 and the inner surface on the object 2 correct?

    YES, I would clone the object, reverse the normal of the cloned shape, maybe changing its surface material if you want.

    The two mentioned methods added in beta are now available?

    YES, this is the easiest, just set backface material and then optional image.

    Using the link I gave, beta download is this one highlighted below.

    • Marked as answer by Jackson Mello Tuesday, December 5, 2017 7:23 PM
    Tuesday, December 5, 2017 7:04 PM
    Moderator

All replies

  • Hi,

    Here are some links that help you.

    API Documentation for LD3DView = http://litdev.co.uk/LitDev_LD3DView.html.

    Small Basic - 3D Visualization (blog) = https://blogs.msdn.microsoft.com/smallbasic/2016/06/19/3d-visualisation/

    Thanks,


    Roshan - 7th Grade Student (Age 11) - Learning Small Basic and Visual Basic

    Saturday, December 2, 2017 2:15 AM
  • Hi

    Thank you for the answer. The explanation of the links is very superficial and my question is a little more pertinent to the procedure and not the presentation.

    However his attention was generous.

    G
    M
    T
    <input id="SL_locer" title="Bloquear idioma" type="checkbox" /> <select id="SL_lng_from" style="background:rgb(255, 255, 255) url("moz-extension;"><option value="auto">Detectar idioma</option><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select>
    <select id="SL_lng_to" style="background:rgb(255, 255, 255) url("moz-extension;"><option value="af">Africâner</option><option value="sq">Albanês</option><option value="de">Alemão</option><option value="ar">Arabe</option><option value="hy">Armênio</option><option value="az">Azerbaijano</option><option value="eu">Basco</option><option value="bn">Bengali</option><option value="be">Bielo-russo</option><option value="my">Birmanês</option><option value="bs">Bósnio</option><option value="bg">Búlgaro</option><option value="ca">Catalão</option><option value="kk">Cazaque</option><option value="ceb">Cebuano</option><option value="ny">Chichewa</option><option value="zh-CN">Chinês (Simp)</option><option value="zh-TW">Chinês (Trad)</option><option value="si">Cingalês</option><option value="ko">Coreano</option><option value="ht">Crioulo haitiano</option><option value="hr">Croata</option><option value="da">Dinamarquês</option><option value="sk">Eslovaco</option><option value="sl">Esloveno</option><option value="es">Espanhol</option><option value="eo">Esperanto</option><option value="et">Estoniano</option><option value="fi">Finlandês</option><option value="fr">Francês</option><option value="gl">Galego</option><option value="cy">Galês</option><option value="ka">Georgiano</option><option value="el">Grego</option><option value="gu">Gujarati</option><option value="ha">Hauça</option><option value="iw">Hebraico</option><option value="hi">Hindi</option><option value="hmn">Hmong</option><option value="nl">Holandês</option><option value="hu">Húngaro</option><option value="ig">Igbo</option><option value="id">Indonésio</option><option selected="selected" value="en">Inglês</option><option value="yo">Ioruba</option><option value="ga">Irlandês</option><option value="is">Islandês</option><option value="it">Italiano</option><option value="ja">Japonês</option><option value="jw">Javanês</option><option value="kn">Kannada</option><option value="km">Khmer</option><option value="lo">Laosiano</option><option value="la">Latim</option><option value="lv">Letão</option><option value="lt">Lituano</option><option value="mk">Macedônico</option><option value="ml">Malaiala</option><option value="ms">Malaio</option><option value="mg">Malgaxe</option><option value="mt">Maltês</option><option value="mi">Maori</option><option value="mr">Marathi</option><option value="mn">Mongol</option><option value="ne">Nepalês</option><option value="no">Norueguês</option><option value="fa">Persa</option><option value="pl">Polonês</option><option value="pt">Português</option><option value="pa">Punjabi</option><option value="ro">Romeno</option><option value="ru">Russo</option><option value="sr">Sérvio</option><option value="st">Sesotho</option><option value="so">Somália</option><option value="sw">Suaíli</option><option value="su">Sudanês</option><option value="sv">Sueco</option><option value="tg">Tadjique</option><option value="tl">Tagalo</option><option value="th">Tailandês</option><option value="ta">Tâmil</option><option value="cs">Tcheco</option><option value="te">Telugo</option><option value="tr">Turco</option><option value="uk">Ucraniano</option><option value="ur">Urdu</option><option value="uz">Uzbeque</option><option value="vi">Vietnamita</option><option value="yi">Yiddish</option><option value="zu">Zulu</option></select>
    Hello 
     Thank you very much for the answer. The explanation of the links is very superficial and my question is a little more pertinent to the procedure and not the presentation. 
     
    However his attention was generous.
    A função de fala é limitada a 200 caracteres
    <input checked="checked" id="SL_BBL_locer" title="Mostrar o botão do ImTranslator 3 segundos" type="checkbox" />
    Opções : Histórico : Comentários : Donate Encerrar
    Saturday, December 2, 2017 4:10 AM
  • Hi Jackson,

    Every 3D model is rendered to a flat image you see on the sreen.  To do this there are 3 important parts:

    1. Objects that emit light, diffuse, directional lights etc
    2. Objects in the scene that reflect light
    3. A viewer position and direction

    In order for the viewer (camera) to see an object (rendered on the screen) the light must reflect off the object and travel to the camera.  Therefore the object must have an outward direction pointing at least partially towards the camera.  The objects have only one outside direction, this make it easier for the renderer to view a scene without trying to render the hidden back surfaces.

    The objects are always just collections of triangles, each vertex of the triangle has an outward normal (the direction that light will be maximally reflected).  By default the direction is set by the order in which the vertices of the triangle are listed (clockwise or anticlockwise).  The outward normals can be set to provide smoother curved surfaces (to appear less faceted).  They can indeed by completely reversed etc.

    In general it is possible to specify a front and back material, however I have not implemented this in LD3DView, so to see both sides of an object you need 2 overlapping objects with normals in opposite directions.  The 3D rubic cube sample does this for the black inside (see 'Interior colour cubes').

    Normals are just the outward direction of a node vertex - some googling will fill in more details with pictures.

    EDIT

    SInce it may be useful, I added the following methods and uploaded to beta test version of extension.

    LD3DView.SetBackMaterial

    LD3DView.AddBackImage

    Saturday, December 2, 2017 9:24 AM
    Moderator
  • Thank you very much LitDev

    From what I understand, answering my question, so you would need to override two objects — one with the vision of the external surface and the other with the vision of the inner surface.

     In the example I gave earlier ( semi sphere) by rotating it on the x-axis in the vision of the camera I can only see the exterior and when the inside is facing the camera I see nothing.  The correction that would then do an outer surface on the object 1 and the inner surface on the object 2 correct?

    The two mentioned methods added in beta are now available?

    Tuesday, December 5, 2017 1:23 AM
  • Thank you very much LitDev

    From what I understand, answering my question, so you would need to override two objects — one with the vision of the external surface and the other with the vision of the inner surface.

    YES

     In the example I gave earlier ( semi sphere) by rotating it on the x-axis in the vision of the camera I can only see the exterior and when the inside is facing the camera I see nothing.  The correction that would then do an outer surface on the object 1 and the inner surface on the object 2 correct?

    YES, I would clone the object, reverse the normal of the cloned shape, maybe changing its surface material if you want.

    The two mentioned methods added in beta are now available?

    YES, this is the easiest, just set backface material and then optional image.

    Using the link I gave, beta download is this one highlighted below.

    • Marked as answer by Jackson Mello Tuesday, December 5, 2017 7:23 PM
    Tuesday, December 5, 2017 7:04 PM
    Moderator
  • Once again, thank you very much.

    Actually there are virtually no codes impossibilities. Mainly for master like you.

    Tuesday, December 5, 2017 7:30 PM