Thanks for your answers

Quote:
* what exactly do you mean? in normal case the black color is transparent and you can change the transparence color. If you need you can use the sprite blendmode, see example MP_SpriteBlendMode.pb
But how to use a simple alpha chanel (png with alpha chanel)?
I think there is some bug with transparency, you can see here :

the code :
Code:
MP_Graphics3D (640,480,0,3)
UsePNGImageDecoder()
Sprite = MP_CatchSprite(?MyData, ?EndOfMyData - ?MyData)
Sprite2 = MP_CatchSprite(?MyData, ?EndOfMyData - ?MyData)
ground = MP_CatchSprite(?MyGround, ?EndOfMyGround - ?MyGround)
part = MP_CatchSprite(?MyGround2, ?EndOfMyGround2 - ?MyGround2)
MP_SpriteSetZ(ground , 10)
MP_SpriteSetZ(Sprite , 50)
MP_SpriteSetCenterY(Sprite, 100)
MP_SpriteSetCenterY(Sprite2, 100)
;MP_TransparentSpriteColor(Sprite, RGB(255,0,255))
;MP_TransparentSpriteColor(Sprite2, RGB(255,0,255))
angle.f=0
While Not MP_KeyDown(#PB_Key_Escape) And Not WindowEvent() = #PB_Event_CloseWindow
MP_AmbientSetLight (RGB(0,50,128))
;{ drawsprite
MP_DrawTiledSprite(ground, 0,0)
;MP_DrawSprite(Sprite, 0, 25)
MP_DrawSprite(part, 150, 150,Abs(Cos(angle)*100))
MP_DrawSprite(Sprite, 300, 250, Abs(Cos(angle)*100))
MP_DrawSprite(Sprite2, x, y)
;}
;{ event keyboard and depth
angle+0.02
If MP_keyDown(#PB_Key_Right) : x+1 : EndIf
If MP_keyDown(#PB_Key_Left) : x-1 : EndIf
If MP_keyDown(#PB_Key_Up) : y-1 : EndIf
If MP_keyDown(#PB_Key_Down) : y+1 : EndIf
MP_SpriteSetZ(Sprite2 , y)
;}
;MP_drawtext(10,10,Str(y))
MP_RenderWorld()
MP_Flip ()
Wend
DataSection
;MyData : IncludeBinary #PB_Compiler_Home + "Examples\Sources\Data\Geebee2.bmp" : EndOfMyData :
MyData : IncludeBinary "sprite.png" : EndOfMyData :
MyGround : IncludeBinary #PB_Compiler_Home + "Examples\Sources\Data\Background.bmp" : EndofMyGround :
MyGround2 : IncludeBinary "particle1.png" : EndofMyGround2 :
EndDataSection
A simple test with this sprite :
The result :

The code :
Code:
MP_Graphics3D (640,480,0,3)
Sprite = MP_CatchSprite(?MyData, ?EndOfMyData - ?MyData)
ground = MP_CatchSprite(?MyGround, ?EndOfMyGround - ?MyGround)
MP_SpriteSetZ(ground , 10)
While Not MP_KeyDown(#PB_Key_Escape) And Not WindowEvent() = #PB_Event_CloseWindow; Esc abfrage oder Windows Schliessen
MP_AmbientSetLight (RGB(0,50,128))
; Draw our sprite
MP_DrawTiledSprite(ground, 0,0)
MP_DrawSprite(Sprite, 0, 25)
MP_DrawSprite(Sprite, x+100, 100, x)
x+1
If x = 300
x=0
EndIf
MP_RenderWorld() ; Erstelle die Welt
MP_Flip () ; Stelle Sie dar
Wend
DataSection
MyData: IncludeBinary "test.png": EndOfMyData:
MyGround : IncludeBinary #PB_Compiler_Home + "Examples\Sources\Data\Background.bmp" : EndofMyGround :
EndDataSection
Quote:
if you change the order of
Sprite = MP_LoadSprite("donut.bmp")
Background = MP_LoadSprite("raupe40_60.bmp")
the background will be on the background and not in front. If you want you can use the MP_SpriteSetZ(Sprite , z) command to change this
ah ok. But how can we sort the sprite by Y, to do a Y-ordering ?
I don't understand why MP_SpriteSetZ() is limited to 0-10 ?
Why this function has not a variable type .w (limited from : -32768 to +32767) for example

?
it could be great to use it as a Z-depth/ordering if we do :
Code:
MP_SpriteSetZ(Sprite , y)
But, I think we need to sort the sprite by the Y axis, for each sprite, because, some monsters can use the same sprite, and the MP_SpriteSetZ(Sprite , Z) set the Z for a Sprite, event if it is used by many "objects".
I work on two 2Diso games (3arks and Arkeos :
http://vimeo.com/29874494).
I need to "sort" a lot of sprites each frame, thanks to the Y. It's ok with the purebasic engine (sprite/sprite3D), but with MP3D, I don't know how I can do that.
is there a technic to sort the sprite

?
Quote:
- About the post processing (bloom, emboss) : can we have the bloom not on a GUi for example ?
* Please make me a little example. I will test it and find a solution
Thank you, here is a little example, based on MP_bloomEffect.pb
Code:
shaderFX.s = PeekS(?Shader,?ShaderEnd-?Shader)
MP_Graphics3D (640,480,0,3)
SetWindowTitle(0, "Bloom & UI")
MP_VSync(0)
camera=MP_CreateCamera()
light=MP_CreateLight(1)
Mesh=MP_CreateTeapot()
MP_PositionEntity (Mesh,0,0,3)
;Texture = MP_CreateTexture(640,480)
;Texture2 = MP_CreateTexture(640,480)
Texture = MP_CreateBackBufferTexture()
Texture2 = MP_CreateBackBufferTexture()
MyShader = MP_CreateMyShader(shaderFX)
MyUi = MP_catchSprite(?Ui, ?UiEnd -?Ui)
ok.a =1
While Not MP_KeyDown(#PB_Key_Escape) And Not WindowEvent() = #PB_Event_CloseWindow
MP_TurnEntity (Mesh,0.1,0.1,0.1) ; dreh den Würfel
MP_RenderWorld() ; Erstelle die Welt
;{ Bloom
If ok = 1
MP_BackBufferToTexture (Texture)
MP_BackBufferToTexture (Texture2)
MP_SetTechniqueMyShader (MyShader,"DownScale")
MP_ShaderSetTexture (MyShader,"TextureA",Texture)
MP_UseBackbufferShader(Texture, MyShader)
MP_SetTechniqueMyShader (MyShader,"DownScale")
MP_ShaderSetTexture (MyShader,"TextureA",Texture2)
MP_UseBackbufferShader(Texture, MyShader)
MP_SetTechniqueMyShader (MyShader,"GaussianBlurH")
MP_ShaderSetTexture (MyShader,"TextureA",Texture)
MP_UseBackbufferShader(Texture, MyShader)
MP_SetTechniqueMyShader (MyShader,"GaussianBlurV")
MP_ShaderSetTexture (MyShader,"TextureA",Texture)
MP_UseBackbufferShader(Texture, MyShader)
MP_SetTechniqueMyShader (MyShader,"Bloom")
MP_ShaderSetTexture (MyShader,"TextureA",Texture)
MP_ShaderSetTexture (MyShader,"TextureB",Texture2)
MP_UseBackbufferShader(Texture, MyShader)
MP_TextureToBackBuffer (Texture)
EndIf
;} Bloom
If MP_keyhit(#PB_Key_Space) ; to Activate the bloom or not
ok = 1-ok
EndIf
; For example, I would like the text and the logo not "bloomed" ;)
MP_DrawSprite(MyUi,200,350)
MP_DrawText (1,1,"FPS = "+Str(MP_FPS()))
MP_Flip ()
Wend
DataSection
Shader: IncludeBinary "bloom.fx" : ShaderEnd:
Ui : IncludeBinary "../Epyxshader/power2.png" : UiEnd :
EndDataSection
Quote:
* You can create a texture and color it. All Sprites have textures and if you change the texture you change the texture of the sprite too. use the command MP_SpriteFromTexture(Texture) for this.
Thanks, I will tried that soon

.
Quote:
- can we have an orthographic camera (to create a 3D isometric camera) ?
* i don't know, is the camera a normal one or not? Do you habe a example for this?
of course, :
purebasic\Examples\3D\camera.pb
Code:
CameraProjectionMode(0,#PB_Camera_Orthographic)
Quote:
- is there a way to project shadow with sprite, or to use normal mapping to illuminate the sprite ?
* You want to make shadow with sprite? or Iluminate it? I think this can be done with the MP_SpriteBlendMode
In fact, I'm looking for this function :
Shadow projection (realised with the sprite3D purebasic engine) :
http://vimeo.com/32071358Normal map illumination (like in 3D, but with sprite) :
http://www.youtube.com/watch?v=ut0SqBeA ... re=relatedQuote:
About the licence, can we use your engine in a commercial game ? Or is it a particular licence to use it ?
* the lib is for free, but please make a info that you use the MP3D in the intro
* i love donation but i am realist
I think that MP3D could be use in a commercial game easily for 3D, and 2D, but with a few little features like :
2D :
- alpha chanel for png with no bug
- possibility to sort and draw the sprite as we need
3D :
- there's a little bug with transparency of object/texture
Your engine is really interesting and it's a very great engine
