MP3D Engine Alpha 33

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
N_Gnom
User
User
Posts: 76
Joined: Fri Sep 13, 2013 3:20 pm
Location: Germany

Re: MP3D Engine Alpha 32

Post by N_Gnom »

@Mythros: +1
I need the Load of B3D mesh with all textures.
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: MP3D Engine Alpha 32

Post by mpz »

Hi,

@Mythros, you can use the save mesh direct x function. I think it will be much work to integrate a save 3ds and save b3d function.

MP_GetMeshData(Mesh, #PB_Mesh_Vertex[,*Memory, Memorylenght]) is ready, beta lib in mp3d forum. here comes a demo with a dim field

Code: Select all


Structure bgraCol
  b.b
  g.b
  r.b
  a.b
  
EndStructure

Structure MyVertex 
    x.f : y.f : z.f    ; vertices coordinates 
    nx.f : ny.f : nz.f ; normal coordinates
    Color.bgraCol            ; color 
    u.f : v.f          ; texture coordinates 
;    u1.f : v1.f          ; texture coordinates 2 
;    u2.f : v2.f          ; texture coordinates 2 
EndStructure 


MP_Graphics3D (640, 480, 0, 3) ; Erstelle ein WindowsFenster mit 3D Funktion #Window = 0
SetWindowTitle(0, "3D Darstellung eine Würfels") ; Setzt einen Fensternamen

camera = MP_CreateCamera() ; Kamera erstellen

light = MP_CreateLight(1) ; Es werde Licht

Mesh = MP_CreateCube() ; Und jetzt eine Würfel

MP_PositionEntity (Mesh, 0, 0, 3) ; Position des Würfels

vertexcount = MP_CountVertices(Mesh)
vertexlenght = MP_GetMeshInfo (Mesh, 64)

Dim Vert.MyVertex (vertexcount)

MP_GetMeshData(Mesh, #PB_Mesh_Vertex,@Vert(),vertexlenght * vertexcount)

While Not MP_KeyDown(#PB_Key_Escape) And Not WindowEvent() = #PB_Event_CloseWindow; Esc abfrage oder Windows Schliessen

 MP_TurnEntity (Mesh, 0, 1, 1) ; dreh den Würfel
 
 a + 1 ; play with color
 
 For n = 0 To vertexcount-1
    
   Vert(n)\x * 1.001
   Vert(n)\y * 0.999
   
   If a > 60
     vert(n)\color\r = Random(255)
     vert(n)\color\g = Random(255)
     vert(n)\color\b = Random(255)
   EndIf  
   
 Next 
 
 If a > 60 : a = 0 : EndIf
 
 MP_SetMeshData (Mesh,  #PB_Mesh_Vertex |#PB_Mesh_Normal | #PB_Mesh_Color | #PB_Mesh_UVCoordinate , @Vert(), vertexcount)
  
 MP_RenderWorld() ; Erstelle die Welt
 MP_Flip () ; Stelle Sie dar

Wend
Greetings Michael
Working on - MP3D Library - PB 5.73 version ready for download
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: MP3D Engine Alpha 32

Post by Psychophanta »

Wowo! many thanks!!!


Lets try it!
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Mythros
Enthusiast
Enthusiast
Posts: 306
Joined: Mon Aug 19, 2013 3:28 pm

Re: MP3D Engine Alpha 32

Post by Mythros »

@mpz, I don't mean to be rude, but that's not what I asked. There are ALOT of people on the forum who agree with me that we NEED B3D multi texture / animation import / export. Not being able to use my B3D animated models in Purebasic makes me not want to use this plugin anymore.
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: MP3D Engine Alpha 32

Post by mpz »

Hi Mythros,

what i want do in the next time is to expand the b3d import with multitexturing. I dont have seen a sourceode from a b3d animation import so i dont know how much work it is to implement this. If you want you can help to write a b3d save function. I can make you a easy code to get all infromation about a mp3d mesh, then you have all informations about a mesh and can write a b3d or/and 3ds export function. I will implement this function in mp3d and everybody is happy...

Greetings Michael
Working on - MP3D Library - PB 5.73 version ready for download
User avatar
IceSoft
Addict
Addict
Posts: 1682
Joined: Thu Jun 24, 2004 8:51 am
Location: Germany

Re: MP3D Engine Alpha 32

Post by IceSoft »

mpz wrote:I can make you a easy code to get all infromation about a mp3d mesh, then you have all informations about a mesh and can write a b3d or/and 3ds export function. I will implement this function in mp3d...
Good idea!
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Mythros
Enthusiast
Enthusiast
Posts: 306
Joined: Mon Aug 19, 2013 3:28 pm

Re: MP3D Engine Alpha 32

Post by Mythros »

Hi, mpz! That would be GREAT! I would be more than HONORED to beta test it for you! :) Thanks again for your patience & understanding! :)

@Icesoft, I second that. ;)

Mythros
User avatar
N_Gnom
User
User
Posts: 76
Joined: Fri Sep 13, 2013 3:20 pm
Location: Germany

Re: MP3D Engine Alpha 32

Post by N_Gnom »

what i want do in the next time is to expand the b3d import with multitexturing.
sounds very good.
my b3d models have several textures....
and it should be possible to add for every texture surface...or material....the texture layer for normal mapping or such one.
if you have it done i can test it with my models.

i hope it comes in the next few days.
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: MP3D Engine Alpha 32

Post by mpz »

Hi,

yes i will make a information file about the structures of the meshs, the source code for the b3d and 3ds loader and so on. I think to make an export is not very heavy to realize. The special funktions like multitextures etc. will cost some time and good ideas...

Greetings Michael
Working on - MP3D Library - PB 5.73 version ready for download
Mythros
Enthusiast
Enthusiast
Posts: 306
Joined: Mon Aug 19, 2013 3:28 pm

Re: MP3D Engine Alpha 32

Post by Mythros »

Awesome, @mpz! Just don't forget about materials as well (Thanks, Gnom) :3 And make sure you don't forget to make a 5.11 threaded / unicode version! :D

Thank you SO much, @mpz! I look forward to testing this! :D

Mythros
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: MP3D Engine Alpha 32

Post by IdeasVacuum »

Mythos, you are being given the information needed for you to make an export function, so it is you that needs to make it compatible with 5.11
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Mythros
Enthusiast
Enthusiast
Posts: 306
Joined: Mon Aug 19, 2013 3:28 pm

Re: MP3D Engine Alpha 32

Post by Mythros »

Woh, woh. Hey, hey. No offense, but I wasn't asking you, okay? He made V. 5.11 for MP3D_37. I don't see the trouble in quickly compiling it in 5.11.
User avatar
N_Gnom
User
User
Posts: 76
Joined: Fri Sep 13, 2013 3:20 pm
Location: Germany

Re: MP3D Engine Alpha 32

Post by N_Gnom »

and please a 5.20 compatible version....smile
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: MP3D Engine Alpha 32

Post by mpz »

Hi,

i will make a 5.11 and a 5.20 version from the next version of mp33 if this version is ready :)

For now i am working on some files for the structure and demos to load and save meshs. I will make a new thread in my forum with the files and you can send there questions and needed requests etc.. I think i can make the fist download version on this evening.

Greetings
Michael
Working on - MP3D Library - PB 5.73 version ready for download
User avatar
N_Gnom
User
User
Posts: 76
Joined: Fri Sep 13, 2013 3:20 pm
Location: Germany

Re: MP3D Engine Alpha 32

Post by N_Gnom »

is the b3d loading with multitexturing inside?
Post Reply