Page 1 of 2

New 3DEngine: Zap3D with MeshEditor!!!

Posted: Sun May 23, 2004 6:17 pm
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

Oops

Posted: Sun May 23, 2004 6:38 pm
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

Posted: Mon May 24, 2004 5:45 am
by DarkDragon
The GLWrapper Lib must be installed in your UserLibrarys.

Posted: Mon May 24, 2004 1:44 pm
by DarkDragon
English documentation aviable :wink:
And a few bugs were fixed.

The glWrapperlibrary is also included in the Enginepack.

Posted: Mon May 24, 2004 9:21 pm
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)

Posted: Tue May 25, 2004 6:16 am
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]

Posted: Tue May 25, 2004 6:22 pm
by dmoc
@DarkDragon, what PB version are you using? I'm on 3.81 and keep getting "compiler error <no message>"

Posted: Wed May 26, 2004 5:17 am
by DarkDragon
Hello,

I'm using 3.91beta.

Posted: Fri May 28, 2004 5:11 pm
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 !

Posted: Sat Jun 05, 2004 6:13 pm
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

Posted: Sat Jun 05, 2004 6:33 pm
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

Posted: Sun Jun 06, 2004 8:23 am
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)

Posted: Tue Jun 22, 2004 5:25 pm
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

Posted: Tue Jun 29, 2004 6:36 pm
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)

Posted: Thu Jul 01, 2004 11:02 pm
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.