# Working with LD3DView

• ### 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

A função de fala é limitada a 200 caracteres
 Opções : Histórico : Comentários : Donate Encerrar
• Edited by Saturday, December 2, 2017 2:09 AM Corrupted Text
Saturday, December 2, 2017 1:59 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

Saturday, December 2, 2017 9:24 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.

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

### All replies

• Hi,

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

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
 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

Saturday, December 2, 2017 9:24 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.

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.