@That1Smart Guy
Definately read up on cross product and matrix math. It will help you with understanding 3d overall. But in the mean time, you can actually cheat a little bit for the vertex normals.
The following method isn't always accurate because it doesn't account for face tilt (the face normals) but can produce some good results without much math. The idea is to use the normalized vertex as the vertex normal.
For example, if you make a cube in DBC 1.20, it's created with 16 vertices: I'm guessing 2 for each corner. That's a strange count for a cube. I would expect 8 or 24, but not 16. Each of the vertices start at the center of the cube and point outward to a corner. If you were to normalize each of those vertices, you would have a set of possible vertex normals for the cube. I tested this against a cube in DBC. DBC's normals were quite different. At first I couldn't figure out why the values didn't match, then it occured to me that DBC was calculating the face normals of the cube and assigning them to each vertex normal.
In the following example, I create a cube in DBC, create 2 memblocks from the mesh, display the normalized vertex values and the actual normal values. I then write the normalized vertex values to one of the memblocks and create a second cube out of it. The cube on the left is the original DBC cube with it's normals. The cube on the right is the new one with the normalized vertices.
set display mode 800,600,32
autocam off
sync on
sync rate 60
make object cube 1,10
make mesh from object 1,1
make memblock from mesh 1,1
make memblock from mesh 2,1
hide object 1
delete mesh 1
backdrop off
cls 0
vertcount=memblock dword(1,0)
vertpos=memblock dword(1,4)
normcount=memblock dword(1,8)
normpos=memblock dword(1,12)
print "Press any key to continue"
print
print
print "Nomalized Vertices";space$(30);"Actual Normals"
for pos=0 to (vertcount-1)*12 step 12
rem get the verts out of the memblock
x#=memblock float(1,vertpos+pos)
y#=memblock float(1,vertpos+pos+4)
z#=memblock float(1,vertpos+pos+8)
rem calcuate some normals by normalizing the vertices
nx#=x#/sqrt((x#^2)+(y#^2)+(z#^2))
ny#=y#/sqrt((x#^2)+(y#^2)+(z#^2))
nz#=z#/sqrt((x#^2)+(y#^2)+(z#^2))
print str$(nx#)+" , "+str$(ny#)+" , "+str$(nz#);
rem now let's make a cube with the calculated vertex normals and
rem later we'll see if it looks different
write memblock float 1,normpos+pos,nx#
write memblock float 1,normpos+pos+4,ny#
write memblock float 1,normpos+pos+8,nz#
rem and now the actual normals from the memblock using memblock 2
rem (that's a copy of memblock 1)
normx#=memblock float(2,normpos+pos)
normy#=memblock float(2,normpos+pos+4)
normz#=memblock float(2,normpos+pos+8)
print space$(10),str$(normx#)+" , "+str$(normy#)+" , "+str$(normz#)
next pos
wait key
rem now let's make a cube with the calculated vertex normals and
rem see if it looks different
make mesh from memblock 1,1
make object 2,1,0
set object ambient 2,0
show object 1
set object ambient 1,0
position object 1,-10,0,0
position object 2,10,0,0
position camera 0,5,-50
set ambient light 0
backdrop on
do
turn object left 1,.1
pitch object up 1,.4
turn object left 2,.1
pitch object up 2,.4
sync
loop
The original DBC cube handles the lighting a bit better than the new cube. It's a little more subtle and spread out and gradated well across the faces. However, if we run the same code and use a DBC cylinder instead, the normals from the normalized vertex method looks a LOT better than DBC's normals. The new cylinder's lighting is consistant to the light source and has a very smooth gradation from light to shadow:
set display mode 800,600,32
autocam off
sync on
sync rate 60
make object cylinder 1,10
make mesh from object 1,1
make memblock from mesh 1,1
make memblock from mesh 2,1
hide object 1
delete mesh 1
backdrop off
cls 0
vertcount=memblock dword(1,0)
vertpos=memblock dword(1,4)
normcount=memblock dword(1,8)
normpos=memblock dword(1,12)
print "Press any key to continue"
print
print
print "Nomalized Vertices";space$(30);"Actual Normals"
for pos=0 to (vertcount-1)*12 step 12
rem get the verts out of the memblock
x#=memblock float(1,vertpos+pos)
y#=memblock float(1,vertpos+pos+4)
z#=memblock float(1,vertpos+pos+8)
rem calcuate some normals by normalizing the vertices
nx#=x#/sqrt((x#^2)+(y#^2)+(z#^2))
ny#=y#/sqrt((x#^2)+(y#^2)+(z#^2))
nz#=z#/sqrt((x#^2)+(y#^2)+(z#^2))
print str$(nx#)+" , "+str$(ny#)+" , "+str$(nz#);
rem now let's make a cube with the calculated vertex normals and
rem later we'll see if it looks different
write memblock float 1,normpos+pos,nx#
write memblock float 1,normpos+pos+4,ny#
write memblock float 1,normpos+pos+8,nz#
rem and now the actual normals from the memblock using memblock 2
rem (that's a copy of memblock 1)
normx#=memblock float(2,normpos+pos)
normy#=memblock float(2,normpos+pos+4)
normz#=memblock float(2,normpos+pos+8)
print space$(10),str$(normx#)+" , "+str$(normy#)+" , "+str$(normz#)
next pos
wait key
rem now let's make a cube with the calculated vertex normals and
rem see if it looks different
make mesh from memblock 1,1
make object 2,1,0
set object ambient 2,0
show object 1
set object ambient 1,0
position object 1,-10,0,0
position object 2,10,0,0
position camera 0,5,-50
set ambient light 0
backdrop on
do
turn object left 1,.1
pitch object up 1,.4
turn object left 2,.1
pitch object up 2,.4
sync
loop
So, this method is pretty easy to implement and depending on the shape of your object may yield desirable results.
Enjoy your day.