Number 7:
Quote: "I'm a little confused about 7 - I didn't think multiple camera views were possible in DBC (which is why I couldn't get an anaglyph 3D mode working - now that would be impressive!)"
Split screens are possible. The anaglyph problem with split cameras is that the camera views aren't drawn simultaneously so you have 1 drawn after the other - overwriting the last or causing major flickering. When the camera views don't overlap, they are drawn 1 at a time so you get the illusion of multiple camera views at once without flickering.
rem Split Screen example by latch
rem selectscreenmode() function is by TDK
SelectSCreenMode()
sync on
sync rate 0
gosub _init
tim=1000
do
for n=1 to 4
turn object left n,1
next n
gosub _four_screens
text 0,0,str$(screen fps())
text 0,20,"Actual Iterations per second : "+str$(1000/(timer()-tim))
tim=timer()
sync
loop
_init:
make matrix 1,1000,1000,25,25
for obj=1 to 4
make object cube obj,50
next obj
color object 1,rgb(255,255,0)
position object 1,200,25,800
color object 2,0
position object 2,200,25,200
color object 3,rgb(0,255,0)
position object 3,800,25,800
position object 4,800,25,200
position camera 500,50,500
obj=0
rem screen size standards
hwd=screen width()/2
hht=screen height()/2
return
_four_screens:
inc y1,hht
if y1 > hht
y1=0
inc x1,hwd
if x1 > hwd then x1=0
endif
x2=x1+(hwd-1)
y2=y1+(hht-1)
set camera view x1,y1,x2,y2
inc obj
if obj > 4 then obj=1
point camera object position x(obj),object position y(obj),object position z(obj)
return
`----------------------------------------------------------------
Function SelectScreenMode()
rem by TDK
position mouse 0,0
oldfont$=text font$()
oldsize=text size()
Set Text Font "Arial",1 : Set Text Size 14 : sync
Perform Checklist For Display Modes
ListNum = Checklist Quantity()
TRows = ListNum/4+1: TColumns = 4: THeight = Text Height("X")
BoxHeight = THeight*TRows+40: BoxWidth = TColumns*90
X=(Screen Width() - BoxWidth)/2: Y=(Screen Height() - BoxHeight)/2
Ink RGB(255,255,255),0: Box X,Y,X+BoxWidth,Y+BoxHeight
Ink RGB(180,180,180),0: Box X+1,Y+1,X+BoxWidth,Y+BoxHeight
Ink RGB(220,220,220),0: Box X+1,Y+1,X+BoxWidth-1,Y+BoxHeight-1
Ink RGB(255,255,255),0: Center Text Screen Width() / 2,Y+5,"Please Select The Required Screen Mode:"
Ink 0,0: Center Text Screen Width() / 2-1,Y+4,"Please Select The Required Screen Mode:"
TextLPos = X+10: TextTPos = Y+30: RowCount=0: Ink 0,0
For N=1 To ListNum
Text TextLPos,TextTPos,CHECKLIST STRING$(N)
Inc TextTPos,THeight: Inc RowCount
If RowCount = TRows
RowCount=0: TextTPos = Y+30
Inc TextLPos,90
Endif
Next N
Get Image 10000,X,Y,X+BoxWidth,Y+BoxHeight
Ink RGB(120,120,220),0: Set Text Transparent
Repeat
Mx=MouseX(): My=MouseY(): Mc=MouseClick()
If Mx>(X+10) and Mx<(X+BoxWidth-10) and My>(Y+30) and My<(Y+BoxHeight-10)
OverColumn = (Mx-(X+10))/90: OverRow = (My-(Y+30))/THeight
ItemNum = OverColumn* TRows +OverRow+1
If OldItemNum <> ItemNum And ItemNum >= 0 And ItemNum <= ListNum
Paste Image 10000,X,Y
Text OverColumn*90+X+10,OverRow*THeight+30+Y,CHECKLIST STRING$(ItemNum)
OldItemNum = ItemNum
Endif
Endif
Until Mc=1 And ItemNum >0 and itemnum <= ListNum
Mode$ = CHECKLIST STRING$(ItemNum)
Delete Image 10000
BitDepth = VAL(Right$(Mode$,2))
NewMode$=Left$(Mode$,Len(Mode$)-3)
For N=1 To Len(Mode$)
If Mid$(NewMode$,N)="x"
XRez = VAL(Left$(NewMode$,N-1))
YRez = VAL(Right$(NewMode$,Len(NewMode$)-N))
Exit
Endif
Next N
`ScreenParams(0)=XRez
`ScreenParams(1)=YRez
`ScreenParams(2)=BitDepth
Set Display Mode XRez, YRez, BitDepth
Ink RGB(255,255,255),0
Set Text Font oldfont$,1 : Set Text Size oldsize : sync
EndFunction Mode$
`----------------------------------------------------------------
In order to update any one camera view, a sync has to be called after the camera view is sized. This, however, will destroy the speed of your program if you sync after each camera view setup in a single iteration. In the example, there are 4 camera views which could mean syncing 4 times per main loop. In order to get around this, in the above example I update 1 camera view per iteration instead of all 4 at once. This allows me to call 1 sync to update all 4 views. For your application, a variation would be to update a view when the mouse pointer is in that window. This will greatly speed up your app because a smaller 3d camera view ,takes up a lot less rendering power than a full screen camera view. So, if handled properly, a split screen view is less expensive than a full screen view.
Quote: "I'm also puzzled why the normals don't load on your 3D objects, I just use the standard "Load object" command. Does DBC have any special normalisation commands that I should be using, or is it just the way the default light is angled/positioned?"
I think this has to do with the animation being stripped out of the direct x file. If I'm not mistaken, it seems that an already animated directx object is losing it's animation upon loading into lightning limbs. The frame templates that hold the mesh, material, normal, and uv information are often tied to the animation keys if there are any. There is a frametransformmatrix template within the frame templates. This controls the initial transformations of the mesh. The animation keys are like mini matrices that are multiplied against the frametransformmatrix to create the transformation of the limbs. The animation keys, and the transform matrix can therefore go hand and hand.
What seems to be an absence of normals, is some kinda of funky transformation that isn't quite right. The mesh could be inside out, or the normals could be at 0 - I don't really know. I'd have to see the state of the directx file after it was loaded into lightning limbs.
I'm kamking a lot of assumptions here. Are you stripping the animation from the direct x file upon loading?
Enjoy your day.