New 3DEngine: Zap3D with MeshEditor!!!

Developed or developing a new product in PureBasic? Tell the world about it.
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

New 3DEngine: Zap3D with MeshEditor!!!

Post by DarkDragon »

Hello,

I developed a new 3DEngine for PureBasic. It has also a MeshEditor, which can be English, French or German(File > Preferences). The MeshEditor can Import ASC files.

Right click > Save as...

I hope you have fun to test it. There is also an example for the collision, meshes and the lights.
Maybe there will be a English version of the help-file in a few weeks-months.

Have fun and give me feedback please :wink:



FeatureList:
Features:
-Particles(better to control than the particles of OGRE)
-Lights(with color)
-Automatical Collision(The Mesh stops and the Mesh gets the other MeshID as event)
-Good Performance(GLLists ;))
-MeshEditing(3 Languages)
-ASC Import
-Getting FPS
-Loading Texture(PNG, JPEG, BMP)
Screenshot of the MeshEditor:
Image

Screenshot of a roboter rendered by the engine:
Image
Last edited by DarkDragon on Fri Jun 04, 2004 2:33 pm, edited 5 times in total.
DominiqueB
Enthusiast
Enthusiast
Posts: 103
Joined: Fri Apr 25, 2003 4:00 pm
Location: France

Oops

Post by DominiqueB »

thank's

seems the GLWRAPPER Library is claimed to be missing by the Library !
I can't run the Zap - Example.pb

Sorry
Dominique

Windows 10 64bits. Pure basic 32bits
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

The GLWrapper Lib must be installed in your UserLibrarys.
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

English documentation aviable :wink:
And a few bugs were fixed.

The glWrapperlibrary is also included in the Enginepack.
User Mike
User
User
Posts: 68
Joined: Mon Jan 26, 2004 7:06 pm

Post by User Mike »

DarkDragon, this is exceptional work. I tried out the mesh program and thought it was just awesome. I haven't seen anything in PureBasic like this! You've inspired me to get back to OpenGL programming and make something cool like this for PureBasic.

Keep it up.(And keep those PB OGL tutorials coming )

8)
-Pure Basic User and loving it!-
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Thanks :D !!!
Nice to see somebody interessted on my work ^^.

Uhm sorry, for no new Tutorials on PBGL, but the i-networx server is so slow at the moment. And on Tripod are too much spamming ad's. The next tutorial could be about Terrains with NURBS Objects.

[Offtopic]
Like this example(created by me ;) ):

Code: Select all

XIncludeFile "C:\Programme\PureBASIC\Examples\Sources - Advanced\OpenGL Cube\OpenGL.pbi" ;Correct this path if it is wrong

#WindowWidth = 500
#WindowHeight = 400
#WindowFlags = #PB_Window_TitleBar | #PB_Window_MaximizeGadget | #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered
Version = 1

Procedure MyWindowCallback(WindowID, Message, wParam, lParam)
  Result = #PB_ProcessPureBasicEvents
  If Message = #WM_SIZE
    glViewport_(0, 0, WindowWidth(), WindowHeight())
    Result = 1
  EndIf
  ProcedureReturn Result
EndProcedure

If OpenWindow(0, 0, 0, #WindowWidth, #WindowHeight, #WindowFlags, "Titel v. "+Str(Version))

SetWindowCallback(@MyWindowCallback())

hWnd = WindowID(0)
pfd.PIXELFORMATDESCRIPTOR   ;OpenGL starten
hDC = GetDC_(hWnd)
pfd\nSize        = SizeOf(PIXELFORMATDESCRIPTOR)
pfd\nVersion     = 1
pfd\dwFlags      = #PFD_SUPPORT_OPENGL | #PFD_DOUBLEBUFFER | #PFD_DRAW_TO_WINDOW
pfd\iLayerType   = #PFD_MAIN_PLANE
pfd\iPixelType   = #PFD_TYPE_RGBA
pfd\cColorBits   = 24
pfd\cDepthBits   = 32
pixformat = ChoosePixelFormat_(hDC, pfd)
SetPixelFormat_(hDC, pixformat, pfd)
hrc = wglCreateContext_(hDC)
wglMakeCurrent_(hDC, hrc)

SwapBuffers_(hDC)

floatX.f = 0.5
floatY.f = 0.25
floatZ.f = -0.5

gluObj = gluNewNurbsRenderer_()

glEnable_(#GL_FOG)
glEnable_(#GL_DEPTH_TEST)
glEnable_(#GL_AUTO_NORMAL)
glEnable_(#GL_CULL_FACE)

Dim uknots.f(7)
Dim vknots.f(7)
Dim ctrlP.f(3, 3, 2)

;Initialize the Terrain
For u=0 To 3
  uknots(u) = 0.0
  uknots(u+4) = 1.0
  For v=0 To 3
    If u = 0
      vknots(v) = 0.0
      vknots(v+4) = 1.0
    EndIf
    ctrlP(u, v, 0) = 0.8*((u/7)-0.5)
    ctrlP(u, v, 2) = 0.8*((v/7)-0.5)
    If (u=1 Or u=2) And (v=2 Or v=1) ;Create hill in the middle of the terrain
      If u=1
        ctrlP(u, v, 1) = 0.5
      Else
        ctrlP(u, v, 1) = 0.0
      EndIf
    Else
      ctrlP(u, v, 1) = 0.0
    EndIf
  Next
Next

Repeat
  glClear_(#GL_COLOR_BUFFER_BIT | #GL_DEPTH_BUFFER_BIT)
  glLoadIdentity_()
  glScalef_(2.5, 2.5, 2.5)
  glTranslatef_(0.25, -0.25, 0.0)
  glRotatef_(350.0, 1.0, -1.0, 0.0)
  glColor3f_(0.25, 0.5, 0.0)
  gluBeginSurface_(gluObj)
  gluNurbsSurface_(gluObj,8,@uknots(),8,@vknots(),3*4,3,@ctrlP(),4,4,#GL_MAP2_VERTEX_3)
  gluEndSurface_(gluObj)
  SwapBuffers_(hDC)
  Event = WindowEvent()
  Delay(5)
Until Event = #PB_Event_CloseWindow
End
EndIf
[/Offtopic]
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

@DarkDragon, what PB version are you using? I'm on 3.81 and keep getting "compiler error <no message>"
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Hello,

I'm using 3.91beta.
bye,
Daniel
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Weird...

I just get an empty black window :(

Mesh editor complains about having old GL version...

I have an GForce4 MX440 with nVidia Drivers...


--EDIT--

It's a hardware problem.... GL displays get extremly dark with my monitor (i have to change contrast and luminosity to max to see anything !
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Uhm download a newer version of you GFX-Card driver. Then you'll get a newer opengl version.

And now here is another example, with a skinned roboter and a ego-shooter mousecontrol:
http://mitglied.lycos.de/dani008/downloads/robot.zip
bye,
Daniel
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6175
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

num3, nvidia drivers have a few options to compensate for dark opengl displays, if your drivers don't have those options get some newer drivers
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Uhm I downloaded the newest GFX-Card driver and then all OpenGL applications got very fast. I turned VSync off and got ~20 FPS more. Uhm til the next update you can look at this professional shading :mrgreen: :
Image(I think it looks better than a 8-bit deep engine)
bye,
Daniel
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Hello :wink:

I have no Updates for you, but here are two 1024x768 backgrounds:

http://mitglied.lycos.de/dani008/screens/013.jpg
http://mitglied.lycos.de/dani008/screens/014.jpg

On one background you can see the new Skysystem.

News:
-Displaying 2DTextures(white=invisible could be enabled)
-Skysystem
-Collision is rotating with the Object
bye,
Daniel
DarkDragon
Addict
Addict
Posts: 2348
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Post by DarkDragon »

Hello,

The last time I visited this topic is a long time ago.
That means many new features:

Maybe I have forgotten something:
-Display 2DTextures on the window(alpha-transparency uncorrect)
-BoxCollision rotates with the Mesh.
-Transparent Meshes(50%).
-DLL version(If you like to use the engine in C++)
-Skysphere

MeshEditor:
-Scaling
-Rotating
-Triangleselection in another way

New forum: http://www.zap3d.xdn.de

(download the engine with the old link)
bye,
Daniel
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Hi!

i have been trying your engine and it works fine.
It works fine on my comp, except that if i minimize the zmesh editor i cant restore it.
and when i click the rotate button it opens a window with "scale ob..." in the title :)
But anyway i think i'll go play with it a little more.
Post Reply