DreiDe - 3D Modul

BlitzMax Forums/BlitzMax Module Tweaks/DreiDe - 3D Modul

Vertex(Posted 2005) [#1]
Hi!
I have started a new project named "DreiDe". "DreiDe" is german an stands for "three d" :)

http://vertex.art-fx.org/DreiDe.zip

Features:
- Entitysystem
- Camera
- Materialsystem
- Mesh
- Surfacesystem

Entity:
- only set position, rotation, sclaing and so on
- ...

Camera:
- view range
- viewport
- wireframe
- clearcolor
- clearmode: fragmentbuffer / depthbuffer
- fog mode: linear, exp, exp2
- fog color
- fog range
- ...

Material:
- diffuse, ambient, specular and emission color
- shininess
- texturing
- wireframe: point / line
- gouraud / flatshading
- backfaceculling: yes/no
- fog: yes/no
- ...

Mesh:
- CreateCube :)
- scaling
- get width, height and depth
- ...

Surface:
- based on speedfull vertexbufferobject-system
- if no vbo support, than using vertex-arrays
- setting vertexposition, -color, -normal, -texcoords
- indices for triangles
- ...

just watch the code for more details...

Comming soon for vertexprograms(=vertexshaders on direct3d), terrain, sprite, quake3 levels, bonesystem, mesh loader like x; 3ds; ms3d; md2, more speed etc.

cu olli


Mathieu A(Posted 2005) [#2]
Very good!

Your code is very clear, I'm sure it will help lots of people like me to program our own engine.

Great job!


Grisu(Posted 2005) [#3]
Not able to run this. The window instantly closes... :(


FBEpyon(Posted 2005) [#4]
Very Nice, and its very sharp looking.. Im very impressed now if I could understand the code lol.. Anyways keep up the good work.

Also 500+ FPS is good I think...


LarsG(Posted 2005) [#5]
very nicely done... :)
It ran very nice on Linux (Ubuntu).. got 210 FPS..


Vertex(Posted 2005) [#6]
thx!

Fixed surface-system and added a Milkshape3D-Loader

LoadMS3D:TDDDMesh(oURL:Object)
2 examples included...

Milkshape3D features:
- groups
- materials
- ambient-, diffuse-, speuclar- and emission-color
- shininess
- texturing

comming soon:
- animation(if the bonesystem ready)
- spheremapping
- alphamap
- alpha

cu olli


LeisureSuitLurie(Posted 2005) [#7]
I just know I'm going to go insane remembering to type 3 D's.

Looks very good though. Thanks for this.


Grisu(Posted 2005) [#8]
With the new version I get a MAV error right after the BlitzGL window pops up.

Any ideas?


Vertex(Posted 2005) [#9]
Grisu, sorry, I don't know whats going on with Linux :)

I have add sphericalmapping. AddRenderMode is known as SetEffect. You can set a texture with MyTexture.AddEffect DDD_TEXTURE_SPHEREMAP to sphericalmapping. The Milkshape-Loader does support sphericalmapping too.

http://vertex.art-fx.org/DreiDe.zip

Working currently on alphablending. Cubemapping will support later.

I will use quaternion to delete the gimbal look effect, but all later :)

cu olli

Edit: Sorry, fixed little bug with texture-tranformation. scale-v was set to 0.0 not to 1.0. Now the milkshapeexample looks like it was loaded in milkshape3d self.

Edit2: Here a little screenshot :)

showing with and without "MyCamera.SetWireframe True"


The Caffeine Kid(Posted 2005) [#10]
The example is very nice and shiney! :D

Is this going to be a compiled module, or left as as includable source?


insomnia(Posted 2005) [#11]
OpenSource i hope.. So there are more people who develop :)

(Oli: Warum hast du in dem Example die FPS rausgenommen? *g)


Vertex(Posted 2005) [#12]
The Caffeine Kid: (cooler nick! :)) yes, if I have a first release, DreiDe will becomming a module. But now, it is for me easyer to use Import, and press F5 to test :)

insomnia: yes, opensource all time! (FPS ANzeige ist wieder mit drin, wollte nur sehen, wie wenig Code doch eigentlich nötig ist :))

http://vertex.art-fx.org/DreiDe.zip <- new version with alphablending but without depthsorting(comming soon). Update the MS3D Importer and add SetAlpha to TDDDMaterial.

Alphablending with SetAlpha will work only with enable lighting. Otherwise you have to set vertex-alpha with SetColor 1.0, 1.0, 1.0, fAlpha.

cu olli


Nennig(Posted 2005) [#13]
Hi Vertex,

Good Work!

Why don't you add support for MD2 models in your engine, I have provided some source code here:

http://www.blitzmax.com/Community/posts.php?topic=44764

Thanks


LarsG(Posted 2005) [#14]
Vertex; this is coming along nicely.. :)
it still runs good on Ubuntu Linux, though I miss the FPS text.. :p

one thing though; it seems you've got a memory leak somewhere.. I checked the system monitor, and after letting your app run a minute or so, it had confiscated over 300MB of RAM... I haven't really tried to find where the leak is, as I think you might be a better person to find it than me.. :)


FBEpyon(Posted 2005) [#15]
I like the Module, its very nice and clean, one thing though are you planning on adding matrix terrain into the system, this would be perfect for my new RPG im planning very shortly, I would do the code myself, but I don't have much knowledge on OGL so, im have been looking for a module to help me out, anywyas keep up the good work.

:EDIT:
A little more on the comment side of things would help me and other understand whats happening so that if we do decide to uses your module, that we know what happening


Vertex(Posted 2005) [#16]
Nennig: Looking cool, next time I will write an importer for MD2(and/or MD3) :)

LarsG: Thx! Can you test it again? I hope, that all memoryleaks fixed, but I must say, I don't realy know how this with BlitzMax work :)

FBEpyon: I must read any tutorials about LOD and morphing, but simple mesh-terrains i will produce next time...

To do: !!Depthsorting!!, Multitetxuring, Cubemapping, VertexProgram support.

http://vertex.art-fx.org/DreiDe.zip <- new version with TDDDLight and a example. But I don't know, how I can set the lighting-range with attenuation parameters. Fixed some bugs :)

cu olli

Edit: Der letzte macht das Licht aus...



SillyPutty(Posted 2005) [#17]
Hi Vertex, great work !

For an awsome intro to LOD and ROAM, search for Bryan Turners Article on this topic on gamasutra, I will try and find a link for you :)


LarsG(Posted 2005) [#18]
Vertex:
it seems that it only leaks on linux.. the windows version seems to be stable..

in addition, I can only seem to get aobut 200 FPS on linux, and I get over 1000 FPS on windows...
It might be the ati driver though.. I*m not sure..

but seeing as the win32 version os stable, and linux leaks, it might be something with Marks implementation of GL or something?!?


Vertex(Posted 2005) [#19]
Deux: Stay tuned :)

LarsG: I can only test it with Win2K :( Why it leaks, just quest Mark :)

MD2-Importer:


But the big proble is to update the VBO for animation speedfull. Without animation ca. 800 FPS with ca. 450 FPS. This is [very] bad! With Blitz3D it runs stable by 800 FPS wit and without animation.

cu olli


Robert(Posted 2005) [#20]
it seems that it only leaks on linux.. the windows version seems to be stable..

in addition, I can only seem to get aobut 200 FPS on linux, and I get over 1000 FPS on windows...
It might be the ati driver though.. I*m not sure..

but seeing as the win32 version os stable, and linux leaks, it might be something with Marks implementation of GL or something?!?


Oddly though MemAlloced() doesn't increase, it stays at a constant value.

Yet according to KDE System Guard, memory usage increased by > 150MB during the bglCreateContext call.


Vertex(Posted 2005) [#21]
So, I have delete the old sourcecode, and begin DreiDe from new.

Last feature I have test is Multitetxtuirng and Dot3 Bumpmapping. Work like Blitz3D.



cu olli


pls(Posted 2005) [#22]
<i>So, I have delete the old sourcecode, and begin DreiDe from new.</i>

I'm impressed, by both what you made and by your decision to delete it and start over...

PLS


LarsG(Posted 2005) [#23]
Vertex: cool... Are you gonna show us some new examples soon?!? ;)


Jeroen(Posted 2005) [#24]
Collision detection, that would probably be hard for you Vertex..can get complicated I guess


Vertex(Posted 2005) [#25]
Becouse my new PC, I have forgot this project...
The last think what I done was CubeMapping.

Is there insterest beside the Irrlicht-Engine?

cu olli


regaa(Posted 2005) [#26]
Jo


Dreamora(Posted 2005) [#27]
yepp
Especially as irrlicht is no port just a wrap which makes it useless for OS indepent working.


Panno(Posted 2005) [#28]
yap


Vertex(Posted 2005) [#29]
OK, I must work on a compression tool to monday ( for school :( ) and than I have time for DreiDe. I have finished a new surfacesystem, add some comments, add a HardwareInfo and so on..
cu olli