Results 1 to 10 of 15

Thread: Xors3D engine

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Xors3D engine

    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
    http://download.microsoft.com/downlo...010_redist.exe
    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
    https://drive.google.com/file/d/0Bzk...?usp=drive_web
    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 ?

    notes:
    there are good examples about xors3d for bitz3D here:
    https://www.blitzforum.de/forum/viewtopic.php?t=34431
    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/0Bzk...?usp=drive_web as explained above
    Attached Files Attached Files
    Last edited by primo; 01-09-2018 at 10:09.

  2. #2
    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
    mesh.PNG
    #INCLUDE "%APP_SOURCEPATH%\xors3d.inc" 
    #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
      tot+1
      r=Rnd(0,255):g=Rnd(0,255):b=Rnd(0,255)
      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)
      'xFlipMesh(mesh)
      End If
    Next
    
    xUpdateNormals(mesh)
    
    'creating the camera
    cam = xCreateCamera()
    'xMoveEntity(cam, 0, 100, -500)
    xPositionEntity(mesh, 0,0,300)
    xPositionEntity(cam, 0, 0, 0)
    
    xFlipMesh(mesh)
    xEntityFX(mesh, 18)
    xUpdateNormals(mesh)
    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
      tot+1
      r=Rnd(0,255):g=Rnd(0,255):b=Rnd(0,255)
      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)
      xUpdateNormals(mesh)
      
      'xUpdateWorld_()
      xRenderWorld()
      
      xText(10, 10, "Hello 3D World!")
      xText(10, 30, "FPS: " + Str$(xGetFPS()))
      xText(10, 50, "Tri: " + Str$(tot))   
      xFlip()
      If xWinMessage("WM_CLOSE") Then Exit While
    Wend
    xReleaseGraphics()                                                                      
    
    Stop
    

  3. #3
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    Ciao primo,

    I've created a dedicated forum for Xord3D Graphic 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
    Eros

    Last edited by ErosOlmi; 04-04-2017 at 21:03.
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  4. #4
    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 :
    https://github.com/blitz-research/blitz3d
    http://www.blitzbasic.com/Community/...p?topic=102907
    it is designed with VC6 and 2 other libraries

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10
    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.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #6
    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/0Bzk...?usp=drive_web which is referred to by blitzbasic forum year ago https://www.blitzbasic.com/Community...p?topic=106322

Similar Threads

  1. TBGL+3d-Engine
    By ReneMiner in forum TBGL General
    Replies: 3
    Last Post: 20-02-2013, 21:40
  2. 3Impact 3D Engine
    By zak in forum Software discussion
    Replies: 2
    Last Post: 17-04-2012, 14:32
  3. M15 Hovercraft with jet engine
    By Michael Hartlef in forum Resources
    Replies: 3
    Last Post: 19-04-2008, 01:11
  4. MS Excel as 3D engine :D
    By ErosOlmi in forum Development
    Replies: 3
    Last Post: 13-03-2008, 01:09
  5. Retro DOS like graphics engine
    By Petr Schreiber in forum TBGL Scripts and Projects
    Replies: 0
    Last Post: 12-05-2006, 22:38

Members who have read this thread: 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •