3d programming with PB

Advanced game related topics
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: More confused

Post by Comtois »

ekix wrote:Hello guys

The only things I would like to do, are:

1. Possibility to export 3D models from Milkshape ( or 3DSMAX 9), or whatsoever..., anyway both animated models and like game levels (not animated.
there are some tools here

2. Possibility to load these into PureBasic with some easy way.
see entity.pb example on your folder.
3. Resize & reposition & move these models inside PureBasic.
Use ResizeEntity(), EntityLocate() & MoveEntity()
3. Move the Camera with mouse (like walk through a room...)
Have a look at terrain.pb example.
4. Use collisions to avoid walking through walls etc,
Have a look at SimpleCollision.pb in this archiv

http://www.purebasic.com/Ogre1.6.zip
Please correct my english
http://purebasic.developpez.com/
ekix
User
User
Posts: 34
Joined: Thu Apr 21, 2005 7:43 pm
Location: Finland
Contact:

Still confused...

Post by ekix »

Hello guys

Actually I did not get an answer to my question, what would be the right way to go....
Thalius
Enthusiast
Enthusiast
Posts: 711
Joined: Thu Jul 17, 2003 4:15 pm
Contact:

Post by Thalius »

Code: Select all

Actually I did not get an answer to my question, what would be the right way to go....
Depends how much you already know of the matter ;)

Theres several ways going to Rome ;) or to 3D for that matter. Some are simpler to use but somewhat limited by the simple functionality. While others use advanced techniques and are hard to learn but produce state-of-the-art results.

Crossplatform development is also a point.

From your points its possible with almost all available engines so far with PB:
- Ogre Buildin
- Irrlicht
- PureGDK
- DM3D

Of course there are several differences.
Ogre uses .mesh format ( can be exported by milkshape )
- irrlicht can read several formats
- GDK can use X and BB objects ( correct me if i am wrong>! )

Theres also some examples around - well not as many as some people would wish but heck ;)

Just keep in mind that developing 3d stuff can be pretty nerverobbing at times ( especially if the bug your facing is in the underlying drivers of the customers gfx card or something =P ) - just dont give up! Its also rewarding in terms of fun once you get the hang of it !

Cheers,
Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone! ;)"
ekix
User
User
Posts: 34
Joined: Thu Apr 21, 2005 7:43 pm
Location: Finland
Contact:

Blitz3D versus PureBasic

Post by ekix »

Yep, thanks.

At the moment I'm doing all my 3D projects using Blitz3D, which is easy, but I'd like to do similar projects (not so compicated) with PB, so what would you recommend me to start with?
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Post by mpz »

Hi,

i am working on an own 3D_Engine for Purebasic and send this little program to this forum, but got no answer. I think the interest here is zero...

Most of the procedures are like Blitzbasic ( i love this program).
In my Engine i have over 100 commands now like

MP_PositionEntity (Entity.l,x.f,y.f,z.f) ; Entity = Mesh
MP_RotateEntity (Entity.l,x.f,y.f,z.f)
MP_EntityX (Entity.l)
MP_EntityScaling (Entity.l,Sx.f,Sy.f,Sz.f )
MP_CountVertices(Entity.l )
MP_VertexX (Entity.l, index.l )
MP_SetVertexX (Entity.l, index.l,x.f )
MP_ImageToTexture(Img.l,direction.b); (use purebasic image as textur)

An exe example of a mesh converter:
http://www.purebasic.fr/english/viewtopic.php?t=34949

Now with a particle engine:
http://rapidshare.de/files/40968593/MP_ ... o.exe.html
Sourcecode in German forum:
http://www.purebasic.fr/german/viewtopi ... 4&start=13

Forcefeedback Joystick
http://rapidshare.com/files/139429280/M ... 2.exe.html
Sourcecode in German forum:
http://www.purebasic.fr/german/viewtopi ... highlight=

Now i am working on:
Physics (gravity etc.)
sphere collision is ready, but i want to make more collision kinds
procedurale textures/images
landscape
realtime water/moving meshs

I hope i will have in some weeks a alpha version for testing (if somebody wants...)

best
Michael
ekix
User
User
Posts: 34
Joined: Thu Apr 21, 2005 7:43 pm
Location: Finland
Contact:

About your 3D Engine

Post by ekix »

Hello mpz

I think I did miss something because I cannot understand German language at all, anyway:

DirectXtoMeshKonverter01.exe seems to convert .x models into .pb files, nut unfortunately they created some error messages while trying to run the code. Also there's a small thing, you have to manually add .pb file extension even that the convert format seem's to be *.pb

MP_DX9_PartikelDemo.exe works fine and look's cool :)

MP_dx9_demo2.exe gives me an error that d3dx9_38.dll was not found ( do have DirectX 9.0c version in my notebook).

So, anyway if you want, I can test it furthermore when ever you update the 3D_Engine or something whatever you want...

But pls. Could you change the comments inside the pb code into English, and also I don't know if there is some English documentation available.

I'm also using B3D, so the syntax of it is familiar for me, the only thing I would need in Blitz3D is possibility to use normal Windows menus, buttons etc... as with PB, and also in PB I like small application size of the exe's
Saboteur
Enthusiast
Enthusiast
Posts: 272
Joined: Fri Apr 25, 2003 7:09 pm
Location: (Madrid) Spain
Contact:

Post by Saboteur »

@mpz, I think is interesting a 3D engine for PB... ¿it is coded in Purebasic too?
I am working in a Scene Editor for PB builting commands, but there is no much interest too. :lol: So, don't worry about that! When you get a working engine you will be proud. :wink:
[:: PB Registered ::]

Win10 Intel core i5-3330 8GB RAM Nvidia GTX 1050Ti
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Post by mpz »

Hi ekix,

the DirectXtoMeshKonverter01.exe work with Purebasic 4.30 beta 4 fine. I think you have an older version of Purebasic...
I use a newer version of the converter and have added a function for my 3D_engine too to import a Mesh file into the exe file. Now i can make a 3D_engine exe file with diferent Meshs, Textures and music. The size of the program is 50 KB, the picture of the cube has 260 Kbyte. (fine Alpha mode)

I have the d3dx9_38.dll in my Windows\system32 folder:
http://rapidshare.de/files/41012552/D3DX9_38.dll.html
english Forcefeedback file:
http://rapidshare.de/files/41012323/MP_ ... k.exe.html

The complet 3D Engine is written in purebasic and i use Tailbite to create a lib file. I make a help file in german and english too. If i have a alpha version i can send you this for testing...

Here is the Partikle demo with music and 60KByte size. Now i habe 40 KByte free to make a fine Demo for a 100 K contest...
http://rapidshare.de/files/41012740/MP_ ... c.exe.html

Dear Saboteur,
thanks for your writing. Can you send me a link to your Scene Editor? I never heard about them and i will have a look on it...

Best Michael
User avatar
max_aigneraigner@web.de
User
User
Posts: 67
Joined: Sun Nov 02, 2008 10:37 pm
Location: Bavaria
Contact:

Post by max_aigneraigner@web.de »

Well, I only can say, that the new ogre is great, but for me it's not as good as irrlicht is.
The dreamotion3d hast less graphic-effects but much math-commands.
MPZ-s 3d engine seems to be good, too hehe.. but nothing is impossible.

I needed 1 year to learn dreamotion3d, irrlicht and pb-ogre. So it will take some time to get known to the right engine, but it's fun, when you have got it ;)

here as an advertise: our new free RPG "Magical Twilight" (Gemusoft)
in Progress with Irrlicht (wrapper by Thalius and neotoma)
Image

ps: good engine, mpz.. I must try it out soon hehe ;)
pps: there is an interest in 3d programming in purebasic.. just the ones who are interestet don't want to write comments :D;)

and.. there is no really only simple and really good engine ;) good engines seem to be always difficult.
(but the ogre-engine may be the most simple engine at the moment... maybe)
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Post by djes »

mpz> There's still (and more than ever!) room for a good and simple 3d engine but to evaluate it... We need more examples, demos, code samples! And it's going beyond PB, if it's good enough.
Post Reply