We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3D Programming in SB
#10
Great job,

In the first instance it is probably easiest to use some of the premade objects, LD3DView.Add.. (like cube, sphere tube etc).  You can go a long way with these in most cases.  To make more complex objects, generally you would use some other program like blender to create them, but it is great to understand that everything in 3D is ultimately made up of triangles, with normals (vectors pointing outwards). The ordering of the triangle corners along with normals define whether we see the triangle or not and how it reflects light (we see the front, but not the back in general).

The coordinates are X (left/right), Y(down/up), Z(in/out) by convention from - to +, but since you can move and point the camera in any direction, what you actually see will depend on from where you look.  By default LD3DView starts with camera at 0,0,10 looking in direction 0,0,-1.  This is 10 units out of the page looking into the page.  Most default shapes are created with unit size, centered on (0,0,0) - this will make them easier to move when we get there.

So try adding a sphere, try changing its colour, experiment with using material type "E" and "D" to start with.  Also then experiment with using the LD3DView.AutoControl(2) methods and understand the differences between them.
[-] The following 2 users Like litdev's post:
  • AbsoluteBeginner, z-s
Reply


Messages In This Thread
3D Programming in SB - by litdev - 07-08-2024, 09:29 AM
RE: 3D Programming in SB - by AbsoluteBeginner - 07-08-2024, 02:05 PM
RE: 3D Programming in SB - by z-s - 07-08-2024, 03:52 PM
RE: 3D Programming in SB - by litdev - 07-08-2024, 04:08 PM
RE: 3D Programming in SB - by AbsoluteBeginner - 07-10-2024, 08:03 AM
RE: 3D Programming in SB - by litdev - 07-10-2024, 08:39 AM
RE: 3D Programming in SB - by z-s - 07-10-2024, 09:39 AM
RE: 3D Programming in SB - by litdev - 07-10-2024, 10:02 AM
RE: 3D Programming in SB - by z-s - 07-10-2024, 10:12 AM
RE: 3D Programming in SB - by AbsoluteBeginner - 07-10-2024, 10:16 AM
RE: 3D Programming in SB - by z-s - 07-10-2024, 10:16 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)