View Full Version : Xors3D engine

02-04-2017, 10:16
Xors3D is an abandonware graphics engine, speedy and good, but does not have enough docs. it needs directX 9 to works. download Directx 9 directx_Jun2010_redist.exe from microsoft
now the story: while checking my very old external hard disk i have found xors3d files examples and includes for powerbasic made by user in PB forum , most likely i have downloaded it from xors3d forum, now closed and its dev is stopped.
if you want to give it a try, download the engine (60 Mega) from here
and then download the powerbasic files (attached), i have added other examples (box_of_points)+(starry_box) .
save the attached "powerbasic" folder to the xors3d installation in this place \Samples\Source\
so \Samples\Source\ will now have these folders:
Blitz3D, BlitzMax, C++, Media, PowerBasic
all examples works. the purpose to save at this place because some examples uses the textures, models from this engine.

now i want to try it for thinbasic. in the Xors3ddecls.inc i have changed parameters number to num.
in file xors3d.inc now the problem of 350 lines something like this:
IF ISMISSING(pred) THEN Local_pred = 255 ELSE Local_pred = pred

i have changed all these 350 lines to something like this
Local_pred = IIF( ISMISSING(pred) ,255,pred)
using a 3 regular expressions using notepad++
another problem is the function ISMISSING . and i don't know how to implement it, so i have created an empty ISMISSING function to do nothing
it works with some examples such as the attached box_of_points.tbasic but not with examples starry_with_cube.tbasic : it display the 2 cubes and the big one should be textured with a drawing to a texture. while the equivalent powerbasic example starry_box.bas works as should be. so what should we do with this ISMISSING function ?

there are good examples about xors3d for bitz3D here:
i have adapted from it the example starry_box

don't forget to download the full xors3d from here https://drive.google.com/file/d/0BzkXGILTmN3JS1ZkTjBzdHo5UHc/view?usp=drive_web as explained above

02-04-2017, 20:03
it seems we can add vertices and triangles easily to the mesh dynamically in real time, useful for visualizations
save this code inside the xors3d_thinbasic folder posted above. and look how the ball of triangles grow with time

#INCLUDE Once "%APP_SOURCEPATH%\key.inc" 'to disable the popup intoductory window

Global light, mesh, surf, cam, i, v1, v2, v3, brush, tri1, tot As Long
Global x,y,z,r,g,b As Single
xGraphics3D(800, 600, 32, 0, 1)
xAppTitle("Example Xors3D: adding more vertices and triangles to the mesh in real time")
light = xCreateLight(1)

mesh = xCreateMesh ()
xMeshPrimitiveType (mesh, 4)
surf = xCreateSurface(mesh, brush)
xSurfacePrimitiveType (surf, 4)

For i=0 To 10
x = Rnd(0,200)-100:y = Rnd(0,200)-100:z = Rnd(0,200)-100
If (x^2 + y^2 + z^2) <= 4900 Then
v1 = xAddVertex(surf, x, y, z, 0, 1)
xVertexColor(surf, v1, r, g, b, 1)
v2 = xAddVertex(surf, x+Rnd(-1,1)*10, y+Rnd(-1,1)*10, z+Rnd(-1,1)*10, 0, 1)
'xVertexColor(surf, v2, r, g, b, 1)
v3 = xAddVertex(surf, x-3, y+3, z-2, 0, 1)
'xVertexColor(surf, v3, r, g, b, 1)

tri1 = xAddTriangle(surf, v1, v2, v3)
End If


'creating the camera
cam = xCreateCamera()
'xMoveEntity(cam, 0, 100, -500)
xPositionEntity(mesh, 0,0,300)
xPositionEntity(cam, 0, 0, 0)

xEntityFX(mesh, 18)
While xKeyHit(%xKEY_ESCAPE) = 0
x = Rnd(0,200)-100:y = Rnd(0,200)-100:z = Rnd(0,200)-100
If (x^2 + y^2 + z^2) <= 4900 Then
v1 = xAddVertex(surf, x, y, z, 0, 1)
xVertexColor(surf, v1, r, g, b, 1)
v2 = xAddVertex(surf, x+Rnd(-1,1)*10, y+Rnd(-1,1)*10, z+Rnd(-1,1)*10, 0, 1)
xVertexColor(surf, v2, r, g, b, 1)
v3 = xAddVertex(surf, x+Rnd(-1,1)*10, y+Rnd(-1,1)*10, z+Rnd(-1,1)*10, 0, 1)
xVertexColor(surf, v3, r, g, b, 1)

tri1 = xAddTriangle(surf, v1, v2, v3)
End If
xTurnEntity(mesh, 0,0.5, 0)


xText(10, 10, "Hello 3D World!")
xText(10, 30, "FPS: " + Str$(xGetFPS()))
xText(10, 50, "Tri: " + Str$(tot))
If xWinMessage("WM_CLOSE") Then Exit While


04-04-2017, 21:00
Ciao primo,

I've created a dedicated forum for Xord3D Graphic Engine (http://www.thinbasic.com/community/forumdisplay.php?394-Xors3D-Graphics-Engine) in case you would like to further develop it and possibly other will be interested.
I'm ranked you as "moderator" of this forum so you can have more features and create Sticky threads, threads that are always listed first in the forum threads list.
Sticky threads are useful to contain latest version of a project, or latest includes or forum rules.

Thanks a lot

05-04-2017, 11:21
Thank you Eros for dedicating a forum to Xors3D.
this engine can be considered a DirectX9 wrapper , some users if not the most hesitated to install DX9 on their expensive windows 10 systems, but in fact installing DX9 will not harm the DX14. in comparison the windows version of purebasic 3D engine (Ogre) depends on DX9 subsystem even with PB latest release version v5.60. another choice is to run the graphics with OpenGL subsystem which is its version is the classic 1.2
so DX9 still used with the latest software.
the xors3d full package referred to in the blitz basic forum above, contains numerous examples for the blitz3d including physics examples such as Balloons and ropes i will try to port examples to thinbasic from time to time. the Blitz3D itself now is a freeware product and its source code is available here :
it is designed with VC6 and 2 other libraries

05-04-2017, 21:24
Thanks a lot.

I think ideal solution is to maintain a post where to attach latest includes versions so other can test and suggest.
For example xors3d.inc and key.inc you posted below I cannot find and cannot run your example.


06-04-2017, 06:51
Hi Eros
i have uploaded the files to the first post. but it needs the DLL files of the xors3d engine (they are more than 1 mega byte) can be found in this link https://drive.google.com/file/d/0BzkXGILTmN3JS1ZkTjBzdHo5UHc/view?usp=drive_web which is referred to by blitzbasic forum year ago https://www.blitzbasic.com/Community/posts.php?topic=106322

05-10-2017, 04:08
I need to find the XORS3D engine, The Blitz link no longer works since Blitz site is dead.

05-10-2017, 09:08
Hi Kuron
yes the blitzBasic page about xors3d is not available so here is the page in mht format with all its pictures so it is 16 MB i have saved it before with opera browser, i uploaded it to wikisend since i got a bad idea about mediaf, but for precautions i have uploaded it also to mediaf and downloaded it via another browser and there is no warning nor a bug flag near the file.
http://wikisend.com/download/602844/Xors3D.zip will last 3 months

how to run xors3d for powerbasic and thinbasic
1- for powerbasic:
* install the full xors3d package from link https://drive.google.com/file/d/0BzkXGILTmN3JS1ZkTjBzdHo5UHc/view?usp=drive_web
** download xores3d_PowerBASIC.rar attached to the first post in this thread and put the folder xores3d_PowerBASIC in this place : C:\Xors3d\Samples\Source just to use the textures in the package
*** copy the 4 dlls from C:\Xors3d\dlls to C:\Xors3d\Samples\Source\xores3d_PowerBASIC
Or find a way to let it work from the C:\Xors3d\dlls

2- for thinbasic:
download the xores3d_thinbasic.rar attached to the first post and put the 4 dlls from C:\Xors3d\dlls to xores3d_thinbasic folder. starry_with_cube.tbasic does not work optimal for reasons i said in the first post, while it works fully in powerbasic look file starry_box.bas in xores3d_PowerBASIC package

Note: look also the other example here http://www.thinbasic.com/community/showthread.php?12771-3D-Tubes-Knot-and-spiral-with-physics

I have tried xors3d as a tourist and traveler since it does not contain good docs , the user usually guess how this will work or not and depending on the examples provided in folder blitz3d in the big package and some tutorials here https://www.blitzforum.de/forum/viewtopic.php?t=34431

05-10-2017, 16:51
Primo, thank you, but try as I can, I can't get Google to actually let me download that file. Clicking the "download anyway" button does nothing.

05-10-2017, 18:01
try this link:

google drive link is working look :
it is downloaded with portable google chrome
the google drive link is posted by a blitz basic user in the old blitz page dedicated for xors3d

05-10-2017, 23:44
Thank you very much, that one works fine.

I have no idea why the google drive link won't work for me. Usually, I do not have trouble with Google Drive links. I have tried it in Firefox and Edge. I have nothing installed that should be blocking it. May just be something in my region messing up.

10-10-2017, 06:18
FWIW, The Google Drive link is now working. Giving that Youtube and everything else Google related looks different now, it was likely unavailable due to Google updating their services.

10-10-2017, 10:03
It is a shame the team behind this engine self-destructed. This is a pretty capable little engine.

10-10-2017, 11:24
yes the xors3d team have disappeared and gone with the wind, i think they should moved the engine to github as an open source. also Blitz3D forum closed but at least its source is moved to (( github github.com/blitz-research/blitz3d )) , and it still can be downloaded as a freeware/donateware from blitzresearch.itch.io/blitz3d/purchase

24-10-2017, 16:34
If I had the room on my system to install Microsoft's bloated compiler, I would download the source for BlitzPlus and have a go and making a derivative. I always wanted to put better GUI support in that and rip out the DirectX and fix the one OpenGL bug that has always bee in there.