Page 38 of 71
Re: MP3D Engine Alpha 32
Posted: Tue Nov 12, 2013 10:24 am
by N_Gnom
@Mythros: +1
I need the Load of B3D mesh with all textures.
Re: MP3D Engine Alpha 32
Posted: Tue Nov 12, 2013 2:39 pm
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
Re: MP3D Engine Alpha 32
Posted: Tue Nov 12, 2013 2:39 pm
by Psychophanta
Wowo! many thanks!!!
Lets try it!
Re: MP3D Engine Alpha 32
Posted: Tue Nov 12, 2013 2:45 pm
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.
Re: MP3D Engine Alpha 32
Posted: Tue Nov 12, 2013 3:39 pm
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
Re: MP3D Engine Alpha 32
Posted: Tue Nov 12, 2013 3:53 pm
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!
Re: MP3D Engine Alpha 32
Posted: Tue Nov 12, 2013 4:07 pm
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
Re: MP3D Engine Alpha 32
Posted: Tue Nov 12, 2013 8:23 pm
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.
Re: MP3D Engine Alpha 32
Posted: Tue Nov 12, 2013 9:06 pm
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
Re: MP3D Engine Alpha 32
Posted: Tue Nov 12, 2013 10:01 pm
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!
Thank you SO much, @mpz! I look forward to testing this!
Mythros
Re: MP3D Engine Alpha 32
Posted: Tue Nov 12, 2013 11:23 pm
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
Re: MP3D Engine Alpha 32
Posted: Tue Nov 12, 2013 11:34 pm
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.
Re: MP3D Engine Alpha 32
Posted: Wed Nov 13, 2013 1:32 pm
by N_Gnom
and please a 5.20 compatible version....smile
Re: MP3D Engine Alpha 32
Posted: Wed Nov 13, 2013 2:06 pm
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
Re: MP3D Engine Alpha 32
Posted: Wed Nov 13, 2013 2:28 pm
by N_Gnom
is the b3d loading with multitexturing inside?