MP3D Engine Alpha 33

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Re: MP3D Engine Alpha 28

Post by Sveinung »

Can you do spheremapping, because I cant seem to find that in the doc.
Please help :oops:

Sveinung
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: MP3D Engine Alpha 28

Post by mpz »

Hello Sveinung,

i am sorry, but i don't know what exacly do you mean? :shock:

If you create a Mesh as MP_CreateSphere(Slices) you can texture this Mesh and the Texure of the mesh is spheremapping. You find an example as MP_Bumpmap.pb and if you want you can make your own spheremapping with this example as MP_Spherical Mapping mit UV Koodinaten.pb.

I hope this help you, if not tell me i help...

Greetings Michael
Working on - MP3D Library - PB 5.73 version ready for download
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Re: MP3D Engine Alpha 28

Post by Sveinung »

I hope thiees link can clearify.

http://en.wikipedia.org/wiki/Sphere_mapping
http://www.opengl.org/resources/code/sa ... de176.html

It is kinde of a reflectiv mapping...shiny like cube mapping, but
not so reflective. I know I suck at explaing stuff :lol:

Hope this was some what helpful

Regards
Sveinung

BTW
Awsome lib MPZ...very good work.
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Re: MP3D Engine Alpha 28

Post by Sveinung »

Will MP_EntitySetNormals() update all normals for the entity?

Here is an example on what I'm trying to do,
and what probles i face :D
http://www.sherrox.com/sd.rar

Sveinung
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: MP3D Engine Alpha 28

Post by mpz »

Hi Sveinung,

you want to make this kind of mapping?
http://en.wikipedia.org/wiki/Hand_with_ ... ing_Sphere

For these one you need an shader. I have one but the demo file is not ready for now. Perhaps i can make it ready for the next version.

The MP_EntitySetNormals() update all normals for an entity. All MP_CreateMesh commands have normals and here comes the description of the dx command
http://msdn.microsoft.com/en-us/library ... s.85).aspx

Greetings Michael
Working on - MP3D Library - PB 5.73 version ready for download
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Re: MP3D Engine Alpha 28

Post by Sveinung »

Many thanks MPZ

You are spot on...just what I wanted. I start fideling with shaders then :?
(Not my stronges subject)

Regards
Sveinung
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Re: MP3D Engine Alpha 28

Post by Sveinung »

My shader look great in fxcomposer, but it will not load using MP_LoadTextureShader()
Gets an invalid memory acces.

Here is my shader

Code: Select all

/*********************************************************************NVMH3****
*******************************************************************************
$Revision: #4 $

Copyright NVIDIA Corporation 2008
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
*AS IS* AND NVIDIA AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL NVIDIA OR ITS SUPPLIERS
BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES
WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS,
BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY
LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

% Phong-shaded, metal- and plastic-style surfaces with a mirror term.
% Plastic or dielectic surfaces have varying reflectivity according to
% the angle at which a surface is viewed -- this variation is often
% called "fresnel" reflectance.

date: 070501

keywords: material environment classic

Metallic reflections are generally uniform, and unlike dielectric surfaces,
metallic ones will tint these reflections.


keywords: DirectX10
// Note that this version has twin versions of all techniques,
//   so that this single effect file can be used in *either*
//   DirectX9 or DirectX10

To learn more about shading, shaders, and to bounce ideas off other shader
    authors and users, visit the NVIDIA Shader Library Forums at:

    http://developer.nvidia.com/forums/

*******************************************************************************
******************************************************************************/

/*****************************************************************/
/*** HOST APPLICATION IDENTIFIERS ********************************/
/*** Potentially predefined by varying host environments *********/
/*****************************************************************/

// #define _XSI_		/* predefined when running in XSI */
// #define TORQUE		/* predefined in TGEA 1.7 and up */
// #define _3DSMAX_		/* predefined in 3DS Max */
#ifdef _3DSMAX_
int ParamID = 0x0003;		/* Used by Max to select the correct parser */
#endif /* _3DSMAX_ */
#ifdef _XSI_
#define Main Static		/* Technique name used for export to XNA */
#endif /* _XSI_ */

#ifndef FXCOMPOSER_VERSION	/* for very old versions */
#define FXCOMPOSER_VERSION 180
#endif /* FXCOMPOSER_VERSION */

#ifndef DIRECT3D_VERSION
#define DIRECT3D_VERSION 0x900
#endif /* DIRECT3D_VERSION */

#define FLIP_TEXTURE_Y	/* Different in OpenGL & DirectX */

/*****************************************************************/
/*** EFFECT-SPECIFIC CODE BEGINS HERE ****************************/
/*****************************************************************/

/******* Lighting Macros *******/
/** To use "Object-Space" lighting definitions, change these two macros: **/
#define LIGHT_COORDS "World"
// #define OBJECT_SPACE_LIGHTS /* Define if LIGHT_COORDS is "Object" */


float Script : STANDARDSGLOBAL <
    string UIWidget = "none";
    string ScriptClass = "object";
    string ScriptOrder = "standard";
    string ScriptOutput = "color";
//  string Script = "Technique=Technique?Metal:Metal10:Plastic:Plastic10;";
> = 0.8;

/**** UNTWEAKABLES: Hidden & Automatically-Tracked Parameters **********/

// transform object vertices to world-space:
float4x4 gWorldXf : World < string UIWidget="None"; >;
// transform object normals, tangents, & binormals to world-space:
float4x4 gWorldITXf : WorldInverseTranspose < string UIWidget="None"; >;
// transform object vertices to view space and project them in perspective:
float4x4 gWvpXf : WorldViewProjection < string UIWidget="None"; >;
// provide tranform from "view" or "eye" coords back to world-space:
float4x4 gViewIXf : ViewInverse < string UIWidget="None"; >;

/************* TWEAKABLES **************/

/// Point Lamp 0 ////////////
float3 gLamp0Pos : POSITION <
    string Object = "PointLight0";
    string UIName =  "Lamp 0 Position";
    string Space = (LIGHT_COORDS);
> = {-0.5f,2.0f,1.25f};
float3 gLamp0Color : SPECULAR <
    string UIName =  "Lamp 0";
    string Object = "Pointlight0";
    string UIWidget = "Color";
> = {1.0f,1.0f,1.0f};


// Ambient Light
float3 gAmbiColor : AMBIENT <
    string UIName =  "Ambient Light";
    string UIWidget = "Color";
> = {0.07f,0.07f,0.07f};

// surface color
float3 gSurfaceColor : DIFFUSE <
    string UIName =  "Surface";
    string UIWidget = "Color";
> = {1,1,1};

float gSpecExpon <
    string UIWidget = "slider";
    float UIMin = 1.0;
    float UIMax = 128.0;
    float UIStep = 1.0;
    string UIName =  "Specular Exponent";
> = 80.0;

// typical Kd on metal is low - just as a dirtiness" factor
// typical Kd on plastics is high
float gKd <
    string UIWidget = "slider";
    float UIMin = 0.0;
    float UIMax = 1.0;
    float UIStep = 0.01;
    string UIName =  "Diffuse";
> = 0.1;

float gKr <
    string UIWidget = "slider";
    float UIMin = 0.0;
    float UIMax = 1.0;
    float UIStep = 0.05;
    string UIName =  "Reflection";
> = 0.8;

float gFresnelMin <
    string UIWidget = "slider";
    float UIMin = 0.0;
    float UIMax = 1.0;
    float UIStep = 0.05;
    string UIName =  "Fresnel Reflection Scale";
> = 0.05;

// This exponent is used to perform the "Schlick APproximation"
//	to Fresnel's original equation. It is fast and visualy satifying.
// The standard value is 5.0 though different values are also
//  visually interesting.
float gFresnelExp : POWER <
    string UIWidget = "slider";
    float UIMin = 0.0;
    float UIMax = 5.0;
    float UIStep = 0.05;
    string UIName =  "Fresnel Exponent";
> = 3.5;

//////////

texture gEnvTexture : ENVIRONMENT <
    string ResourceName = ".\data\default_reflection.dds";
    string UIName =  "Environment";
    string ResourceType = "Cube";
>;

samplerCUBE gEnvSampler = sampler_state {
    Texture = <gEnvTexture>;
#if DIRECT3D_VERSION >= 0xa00
    Filter = MIN_MAG_MIP_LINEAR;
#else /* DIRECT3D_VERSION < 0xa00 */
    MinFilter = Linear;
    MipFilter = Linear;
    MagFilter = Linear;
#endif /* DIRECT3D_VERSION */
    AddressU = Clamp;
    AddressV = Clamp;
    AddressW = Clamp;
};

//////// CONNECTOR DATA STRUCTURES ///////////

/* data from application vertex buffer */
struct appdata {
    float3 Position	: POSITION;
    float4 UV		: TEXCOORD0;
    float4 Normal	: NORMAL;
    float4 Tangent	: TANGENT0;
    float4 Binormal	: BINORMAL0;
};

/* data passed from vertex shader to pixel shader */
struct vertexOutput {
    float4 HPosition	: POSITION;
    float2 UV		: TEXCOORD0;
    // The following values are passed in "World" coordinates since
    //   it tends to be the most flexible and easy for handling
    //   reflections, sky lighting, and other "global" effects.
    float3 LightVec	: TEXCOORD1;
    float3 WorldNormal	: TEXCOORD2;
    float3 WorldTangent	: TEXCOORD3;
    float3 WorldBinormal : TEXCOORD4;
    float3 WorldView	: TEXCOORD5;
};
 
///////// VERTEX SHADING /////////////////////

/*********** Generic Vertex Shader ******/

vertexOutput std_VS(appdata IN,
	uniform float4x4 WorldITXf, // our four standard "untweakable" xforms
	uniform float4x4 WorldXf,
	uniform float4x4 ViewIXf,
	uniform float4x4 WvpXf,
	uniform float3 LampPos) {
    vertexOutput OUT = (vertexOutput)0;
    OUT.WorldNormal = mul(IN.Normal,WorldITXf).xyz;
    OUT.WorldTangent = mul(IN.Tangent,WorldITXf).xyz;
    OUT.WorldBinormal = mul(IN.Binormal,WorldITXf).xyz;
    float4 Po = float4(IN.Position.xyz,1); // homogeneous location
    float4 Pw = mul(Po,WorldXf);	// convert to "world" space
#ifdef OBJECT_SPACE_LIGHTS
    float4 Lo = float4(LampPos.xyz,1.0); // homogeneous coordinates
    float4 Lw = mul(Lo,WorldXf);	// convert to "world" space
    OUT.LightVec = (Lw.xyz - Pw.xyz);
#else /* !OBJECT_SPACE_LIGHTS -- standard world-space lights */
    OUT.LightVec = (LampPos - Pw.xyz);
#endif /* !OBJECT_SPACE_LIGHTS */
#ifdef FLIP_TEXTURE_Y
    OUT.UV = float2(IN.UV.x,(1.0-IN.UV.y));
#else /* !FLIP_TEXTURE_Y */
    OUT.UV = IN.UV.xy;
#endif /* !FLIP_TEXTURE_Y */
    OUT.WorldView = normalize(ViewIXf[3].xyz - Pw.xyz);
    OUT.HPosition = mul(Po,WvpXf);
    return OUT;
}

///////// PIXEL SHADING //////////////////////

void shared_lighting_calculations(vertexOutput IN,
		uniform float Kd,
		uniform float SpecExpon,
		uniform float Kr,
		uniform samplerCUBE EnvSampler,
		uniform float3 LampColor,
		uniform float3 AmbiColor,
		out float3 DiffuseContrib,
		out float3 SpecularContrib,
		out float3 ReflectionContrib)
{
    float3 Ln = normalize(IN.LightVec.xyz);
    float3 Nn = normalize(IN.WorldNormal);
    float3 Vn = normalize(IN.WorldView);
    float3 Hn = normalize(Vn + Ln);
    float4 litV = lit(dot(Ln,Nn),dot(Hn,Nn),SpecExpon);
    DiffuseContrib = litV.y * Kd * LampColor + AmbiColor;
    SpecularContrib = litV.z * LampColor;
    float3 reflVect = -reflect(Vn,Nn);
    ReflectionContrib = Kr * texCUBE(EnvSampler,reflVect).xyz;
}

float4 metalPS(vertexOutput IN,
		uniform float3 SurfaceColor,
		uniform float Kd,
		uniform float SpecExpon,
		uniform float Kr,
		uniform samplerCUBE EnvSampler,
		uniform float3 LampColor,
		uniform float3 AmbiColor
) : COLOR {
    float3 diffContrib;
    float3 specContrib;
    float3 reflContrib;
	shared_lighting_calculations(IN,Kd,SpecExpon,Kr,
				EnvSampler,LampColor,AmbiColor,
				diffContrib,specContrib,reflContrib);
    float3 result = diffContrib +
			    (SurfaceColor * (specContrib + reflContrib));
    return float4(result,1);
}

float4 plasticPS(vertexOutput IN,
		uniform float3 SurfaceColor,
		uniform float Kd,
		uniform float SpecExpon,
		uniform float Kr,
		uniform float FresnelMin,
		uniform float FresnelExp,
		uniform samplerCUBE EnvSampler,
		uniform float3 LampColor,
		uniform float3 AmbiColor
) : COLOR {
    float3 diffContrib;
    float3 specContrib;
    float3 reflContrib;
    float3 Nn = normalize(IN.WorldNormal);
    float3 Vn = normalize(IN.WorldView);
    // these two terms usually pre-shaded-out
    float KrMin = (Kr * FresnelMin);
    float InvFrExp = (1.0/FresnelExp);
    float fresnel = lerp(Kr,KrMin,pow(abs(dot(Nn,Vn)),InvFrExp));
	shared_lighting_calculations(IN,Kd,SpecExpon,Kr,
				EnvSampler,LampColor,AmbiColor,
				diffContrib,specContrib,reflContrib);
    float3 result = (diffContrib * SurfaceColor) +
			specContrib +
			(fresnel*reflContrib);
    return float4(result,1);
}

///////////////////////////////////////
/// TECHNIQUES ////////////////////////
///////////////////////////////////////


#if DIRECT3D_VERSION >= 0xa00
//
// Standard DirectX10 Material State Blocks
//
RasterizerState DisableCulling { CullMode = NONE; };
DepthStencilState DepthEnabling { DepthEnable = TRUE; };
DepthStencilState DepthDisabling {
	DepthEnable = FALSE;
	DepthWriteMask = ZERO;
};
BlendState DisableBlend { BlendEnable[0] = FALSE; };

technique10 Metal10 <
	string Script = "Pass=p0;";
> {
    pass p0 <
	string Script = "Draw=geometry;";
    > {
        SetVertexShader( CompileShader( vs_4_0, std_VS(gWorldITXf,gWorldXf,
				gViewIXf,gWvpXf,
				gLamp0Pos) ) );
        SetGeometryShader( NULL );
        SetPixelShader( CompileShader( ps_4_0, metalPS(gSurfaceColor,
				gKd,gSpecExpon,gKr,
				gEnvSampler,gLamp0Color,gAmbiColor) ) );
	    SetRasterizerState(DisableCulling);
	    SetDepthStencilState(DepthEnabling, 0);
	    SetBlendState(DisableBlend, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF);
    }
}

#endif /* DIRECT3D_VERSION >= 0xa00 */

technique Metal <
	string Script = "Pass=p0;";
> {
    pass p0 <
	string Script = "Draw=geometry;";
    > {
        VertexShader = compile vs_3_0 std_VS(gWorldITXf,gWorldXf,
				gViewIXf,gWvpXf,
				gLamp0Pos);
		ZEnable = true;
		ZWriteEnable = true;
		ZFunc = LessEqual;
		AlphaBlendEnable = false;
		CullMode = None;
        PixelShader = compile ps_3_0 metalPS(gSurfaceColor,
				gKd,gSpecExpon,gKr,
				gEnvSampler,gLamp0Color,gAmbiColor);
    }
}


#if DIRECT3D_VERSION >= 0xa00

technique10 Plastic10 <
	string Script = "Pass=p0;";
> {
    pass p0 <
	string Script = "Draw=geometry;";
    > {
        SetVertexShader( CompileShader( vs_4_0, std_VS(gWorldITXf,gWorldXf,
				gViewIXf,gWvpXf,
				gLamp0Pos) ) );
        SetGeometryShader( NULL );
        SetPixelShader( CompileShader( ps_4_0, plasticPS(gSurfaceColor,
				gKd,gSpecExpon,gKr,gFresnelMin,gFresnelExp,
				gEnvSampler,gLamp0Color,gAmbiColor) ) );
	    SetRasterizerState(DisableCulling);
	    SetDepthStencilState(DepthEnabling, 0);
	    SetBlendState(DisableBlend, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF);
    }
}

#endif /* DIRECT3D_VERSION >= 0xa00 */

technique Plastic <
	string Script = "Pass=p0;";
> {
    pass p0 <
	string Script = "Draw=geometry;";
    > {
        VertexShader = compile vs_3_0 std_VS(gWorldITXf,gWorldXf,
				gViewIXf,gWvpXf,
				gLamp0Pos);
		ZEnable = true;
		ZWriteEnable = true;
		ZFunc = LessEqual;
		AlphaBlendEnable = false;
		CullMode = None;
        PixelShader = compile ps_3_0 plasticPS(gSurfaceColor,
				gKd,gSpecExpon,gKr,gFresnelMin,gFresnelExp,
				gEnvSampler,gLamp0Color,gAmbiColor);
    }
}

/***************************** eof ***/
Sveinung
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: MP3D Engine Alpha 28

Post by mpz »

Dear Sveinung,

this is not a textureshader, it is a normal shader and the mp3d Engine works in other kind with this shader, see the code. For this shader i must made an new commands like "MP_ShaderGetViewI (Camera))" to make an inverse cameraView (MP3D 29 will have the new commands and much more). Here comes an example (not good, i don't have the original meshs of the demo ). If you send me the comple demo with meshs i can make a better demo:

http://www.file-upload.net/download-327 ... r.exe.html

Code: Select all

Global xres=800, yres=600
txp=8 : txres=1 << txp : txcp=txp-6 : txcell=1 << txcp-1

MP_Graphics3D (xres,yres,0,3) ; Erstelle ein WindowsFenster #Window = 0
SetWindowTitle(0, "Mesh with Metal/ Plastic Shader, change with F1 / F2 button") 

camera=MP_CreateCamera() ; Kamera erstellen

Mesh=MP_Createcube()

Muster = MP_CatchTexture(?MyData1, ?MyData2 - ?MyData1)
Surface = MP_TextureToSurface(Muster) 

MP_SurfaceSetPosition(Surface,0,0,1)
MP_SurfaceDestRect(Surface,0, 0, xres, yres)

MP_PositionEntity (light,0,20,0)   
MP_PositionCamera (Camera, 0, 0, 3.4)
MP_CameraLookAt(Camera,MP_EntityGetX(Mesh),MP_EntityGetY(Mesh),MP_EntityGetZ(Mesh))

   
MyShader = MP_CreateMyShader (PeekS(?MyData2, ?MyData3 - ?MyData2))
   
MP_SetTechniqueMyShader (MyShader,"Metal")
;MP_SetTechniqueMyShader (MyShader,"Plastic")
MP_ShaderSetTexture (MyShader,"gEnvTexture",Muster)

MP_ShaderSet_D3DMATRIX (MyShader,"gWorldXf",MP_ShaderGetWorld (Mesh))
MP_ShaderSet_D3DMATRIX (MyShader,"gWorldITXf",MP_ShaderGetWorldI (Mesh))
MP_ShaderSet_D3DMATRIX (MyShader,"gWvpXf",MP_ShaderGetWorldView (Mesh))
MP_ShaderSet_D3DMATRIX (MyShader,"gViewIXf",MP_ShaderGetViewI (Camera))
   
MP_ShaderSetEntity  (MyShader,Mesh)
 
While Not MP_KeyDown(#PB_Key_Escape) And Not MP_WindowEvent() = #PB_Event_CloseWindow; Esc abfrage oder Windows Schliessen


  MP_RenderBegin()

    MP_RenderSurface()
    
    If MP_KeyDown(#PB_Key_F1)=1
      MP_SetTechniqueMyShader (MyShader,"Metal")
    EndIf
    If MP_KeyDown(#PB_Key_F2)=1
      MP_SetTechniqueMyShader (MyShader,"Plastic")
    EndIf
    
    mp_turnentity(mesh,0.1,0.1,0.1) 

    MP_ShaderSet_D3DMATRIX (MyShader,"gWorldXf",MP_ShaderGetWorld (Mesh))
    MP_ShaderSet_D3DMATRIX (MyShader,"gWorldITXf",MP_ShaderGetWorldI (Mesh))
    MP_ShaderSet_D3DMATRIX (MyShader,"gWvpXf",MP_ShaderGetWorldView (Mesh))
    ;MP_ShaderSet_D3DMATRIX (MyShader,"gViewIXf",MP_ShaderGetViewI (Camera))
    
    MP_RenderMesh()

  MP_RenderEnd()
  
  MP_Flip () ; Stelle Sie dar

Wend

DataSection
  
    MyData1:
      IncludeBinary "default_reflection.dds"
    MyData2:
      IncludeBinary "plastic.fx"
    MyData3:
      
EndDataSection
Greetings Michael
Working on - MP3D Library - PB 5.73 version ready for download
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Re: MP3D Engine Alpha 28

Post by Sveinung »

I liked the demo :D

Can't wait for your next release. I think the new version will solve most of my problems
Kepp up the good work. Simply love this engine.

Regards
Sveinung
Nituvious
Addict
Addict
Posts: 1027
Joined: Sat Jul 11, 2009 4:57 am
Location: United States

Re: MP3D Engine Alpha 28

Post by Nituvious »

My friend (he don't have a forum account) found this bug and asked me to post it for him:
Compiling a threadsafe executable while using MP_LoadMesh("bones_all.x") produces a POLINK error.

Code: Select all

POLINK: error: Unresolved external symbol '_PB_StringBasePosition'.
POLINK: fatal error: 1 unresolved external(s)

Code: Select all

MP_Graphics3D(800,600,32,2)

sxCamera = MP_CreateCamera()
sxLight = MP_CreateLight(1)
MP_LightSetColor(sxLight,RGB(175,0,0))

sxMesh = MP_LoadMesh("bones_all.x")

MP_Viewport(0,0,800,600)

Repeat
	
	MP_EntitySetZ(sxMesh,4)	
	MP_RenderWorld()
	MP_Flip()
	
Until MP_WindowEvent() = #PB_Event_CloseWindow
▓▓▓▓▓▒▒▒▒▒░░░░░
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Re: MP3D Engine Alpha 28

Post by Sveinung »

If you turn off threadsafe, it will work.
So there is something wrong with the threadsafe part of the lib.

Regards
Sveinung
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: MP3D Engine Alpha 28

Post by mpz »

Hi,

i use tailbite to create the lib (all written in Purebasic). I must make a "normale" lib and a thread-save lib for both cases. In the next version i can make a special thread-save lib too

Greetings Michael
Working on - MP3D Library - PB 5.73 version ready for download
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: MP3D Engine Alpha 28

Post by mpz »

Hi,

the next version of mp3d will have

Physik:
http://www.file-upload.net/download-332 ... k.exe.html

Some XNA Shader Demos
http://digitalerr0r.wordpress.com/tutorials/

and Frustum Culling

the version will come in the next future (if i have checked and tested the new functions)

Greetings Michael
Working on - MP3D Library - PB 5.73 version ready for download
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Re: MP3D Engine Alpha 28

Post by Sveinung »

Any news?

Sveinung
mpz
Enthusiast
Enthusiast
Posts: 497
Joined: Sat Oct 11, 2008 9:07 pm
Location: Germany, Berlin > member German forum

Re: MP3D Engine Alpha 28

Post by mpz »

Hi,

I did not have enough time lately, but i am working on shadows but the shadows is hard for me to implement. I need a little bit more time for it. I will implement it and then i will make a new version. The physiks works great and will have much great functions. With the physiks function it will be easy to create 3d shooter and other 3d worlds. The shader funtions has now much more functions and it is possible to make shader like in the game "Crysis".

For now i can only make a shadow on a flat plane and this is not enough for me...

Grettings Michael
Working on - MP3D Library - PB 5.73 version ready for download
Post Reply