Page 50 of 71

Re: MP3D Engine Alpha 32

Posted: Fri May 23, 2014 10:12 am
by Psychophanta
Installer is not needed and Michael should not lost time in it!
:x

Re: MP3D Engine Alpha 32

Posted: Fri May 23, 2014 2:55 pm
by Mythros
Complain all you want, this is for people who actually APPRECIATE what other people do.

Re: MP3D Engine Alpha 32

Posted: Fri May 23, 2014 2:59 pm
by luis
Mythros wrote: Without further adieu
:mrgreen:

Re: MP3D Engine Alpha 32

Posted: Fri May 23, 2014 3:18 pm
by Psychophanta
Mythros wrote:Complain all you want, this is for people who actually APPRECIATE what other people do.
Exactly, that's why i wrote what i wrote. Re-read, and you'll have the answer.
The work we appreciate from Michael is his MP3D lib, not installers or similar craps.
He could have finished the manual instead, for example...

Re: MP3D Engine Alpha 32

Posted: Fri May 23, 2014 3:30 pm
by Mythros
Psychophanta, I feel sorry for you. You are so full of crap it's all the way up to your eyes. I am no longer talking to you & I don't care if you don't care. But that's the problem with this planet. People like you who are SO stuck up they have to pick on other people to make themselves feel better.

Re: MP3D Engine Alpha 32

Posted: Fri May 23, 2014 8:46 pm
by mpz
Hi,

Please do not dispute that it is not worth...

@Mythros thanks for the code, i have changed it a little bit and will use it as installer file...

@Psychophanta i wrote "i like to get ideas to improve the code ;)" and Mythros has worked on it.
"He could have finished the manual instead," -> I am working on the help file too and a new one coming in the next days...

Greetings Michael

Re: MP3D Engine Alpha 32

Posted: Fri May 23, 2014 9:28 pm
by Psychophanta
Mythros wrote:Psychophanta, I feel sorry for you. You are so full of crap it's all the way up to your eyes. I am no longer talking to you & I don't care if you don't care. But that's the problem with this planet. People like you who are SO stuck up they have to pick on other people to make themselves feel better.
:?:

Re: MP3D Engine Alpha 32

Posted: Fri May 23, 2014 10:00 pm
by Mythros
Hi, @mpz! :) I'm glad you like it! ^_^ I did it that way so just incase there is a new version of PB, it can easily be added to an infinite drop down list! :) Same thing with the drop down menu! :)

Also if you could post your code fix, that would be GREAT! :) Thanks as usual, @mpz!

KNOWLEDGE IS FREEDOM!

Sincerely,

~Mythros

Re: MP3D Engine Alpha 32

Posted: Wed May 28, 2014 10:32 pm
by Mythros
Hi, @mpz! :) Any status updates? :D I'm so PSYCHED to be a part of this! :D

Thank You!

Re: MP3D Engine Alpha 32

Posted: Thu May 29, 2014 11:29 am
by mpz
Hi,

little update, the new lib is not ready jet, i make bugfixes about some old functions and for some new function. I need a little bit more time

I have actualized the help file (all comands are inside), and have actualized the sourcecode of the installer (my post with the instalööed code)...

Greetings Michael

Re: MP3D Engine Alpha 32

Posted: Thu Jun 05, 2014 12:15 am
by Mythros
Hi, @mpz! :) Any news about the next update? :D

Thanks alot! :mrgreen:

Re: MP3D Engine Alpha 32

Posted: Wed Jun 11, 2014 10:47 am
by Psychophanta
Need some help from anybody about rotations.
The issue is that i need to rotate a object (entity) in any of the three world axis X, Y or Z. Please note that the rotation must be performed over the absolute world axis disregarding the current rotation status of the entity.
But i am not able to achieve it :(

I have been watching this lesson, but no success:
http://www.directxtutorial.com/Lesson.a ... onid=9-4-5

My approaching code:

Code: Select all

Structure D3DMATRIX
  _11.f:_12.f:_13.f:_14.f
  _21.f:_22.f:_23.f:_24.f
  _31.f:_32.f:_33.f:_34.f
  _41.f:_42.f:_43.f:_44.f
EndStructure
Structure D3DXVector3
  x.f
  y.f
  z.f
EndStructure
Structure TriadaD3DXVector3
  Position.D3DXVector3
  LookAt.D3DXVector3
  UpVector.D3DXVector3
EndStructure
Structure MeshStruct
  kind.i                 ; pointer to kind of entity, for mesh kind = 1
  Mesh.i                 ; pointer to meshinterface
  MeshPosition.D3DMATRIX ; position in 3D matrix
  Triada.TriadaD3DXVector3
  muchmore.i
EndStructure
Structure Grad
  XGrad.f      ; x axis in grad
  YGrad.f      ; y axis in grad
  ZGrad.f      ; z axis in grad
EndStructure
Structure Camera
  kind.i
  World.D3DMATRIX
  fovy.f
  zn.f
  zf.f
  Width.i
  Height.i
  View.D3DMATRIX
  ViewI.D3DMATRIX
  CameraPoint.D3DXVector3
  LookAt.D3DXVector3
  UpVector.D3DXVector3
  CameraGrad.Grad
  Flag.f
  active.b
EndStructure
#D3DTS_WORLD=256
#D3DTS_VIEW=2
#D3DX_PI=#PI
Macro D3DXToRadian(Degree)
  (Degree*0.017453292519943295)
EndMacro


Import "d3dx9.lib"
  D3DXMatrixLookAtLH(*pOut.D3DMATRIX, *pEye.D3DXVector3, *pAt.D3DXVector3, *pUp.D3DXVector3)
  D3DXVec3Normalize(*pOut.D3DXVector3, *pV.D3DXVector3)
  D3DXMatrixTranslation(*pOut.D3DMATRIX, x.f, y.f, z.f)
  D3DXMatrixRotationYawPitchRoll(*pOut.D3DMATRIX, Yaw.f, Pitch.f, Roll.f)
  D3DXMatrixMultiply(*pOut.D3DMATRIX, *pM1.D3DMATRIX, *pM2.D3DMATRIX)
  D3DXMatrixRotationX(*pOut.D3DMATRIX,radian.f)
  D3DXMatrixRotationY(*pOut.D3DMATRIX,radian.f)
  D3DXMatrixRotationZ(*pOut.D3DMATRIX,radian.f)
  D3DXMatrixRotationAxis(*pOut.D3DMATRIX,*pV.D3DXVector3,radian.f)
EndImport


Global *D3DDevice.IDIRECT3DDEVICE9
InitNetwork()

MP_Graphics3D(640,480,0,2):MP_VSync(1)
*D3DDevice.IDIRECT3DDEVICE9=MP_AddressOf(1)
Camera=MP_CreateCamera()
MP_CreateLight(1)
MP_PositionEntity(Camera,0,1,-450)
MP_EntityLookAt(camera,0,0,0)

file$=GetTemporaryDirectory()+"su47.X"
If ReceiveHTTPFile( "http://www.flasharts.de/mpz/su47.X",file$) = 0
  MessageRequester("Error","su47.X file not found - internet working?")
  End
EndIf

*Mesh.MeshStruct=MP_loadMesh(file$)
*Mesh\Triada\Position\x=0:*Mesh\Triada\Position\y=0:*Mesh\Triada\Position\z=0
*Mesh\Triada\LookAt\x=0:*Mesh\Triada\LookAt\y=0:*Mesh\Triada\LookAt\z=1
*Mesh\Triada\UpVector\x=0:*Mesh\Triada\UpVector\y=1:*Mesh\Triada\UpVector\z=0

anglex.f=0
angley.f=0
anglez.f=0
While MP_KeyUp(#PB_Key_Escape)
  WindowEvent()
  If MP_KeyHit(#PB_Key_1)
    For t.l=1 To 90
      anglex.f+D3DXToRadian(1)
      D3DXMatrixRotationX(*Mesh\MeshPosition,anglex)
      MP_RenderWorld()
      MP_Flip()
    Next
    *D3DDevice\SetTransform(#D3DTS_WORLD,*Mesh\MeshPosition)
    MP_RenderWorld()
    MP_Flip()
  ElseIf MP_KeyHit(#PB_Key_2)
    For t=1 To 90
      angley.f+D3DXToRadian(1)
      D3DXMatrixRotationY(*Mesh\MeshPosition,angley)
      MP_RenderWorld()
      MP_Flip()
    Next
    *D3DDevice\SetTransform(#D3DTS_WORLD,*Mesh\MeshPosition)
    MP_RenderWorld()
    MP_Flip()
  ElseIf MP_KeyHit(#PB_Key_3)
    For t=1 To 90
      anglez.f+D3DXToRadian(1)
      D3DXMatrixRotationZ(*Mesh\MeshPosition,anglez)
      MP_RenderWorld()
      MP_Flip()
    Next
    *D3DDevice\SetTransform(#D3DTS_WORLD,*Mesh\MeshPosition)
    MP_RenderWorld()
    MP_Flip()
  EndIf
  MP_RenderWorld()
  MP_Flip()
Wend

Re: MP3D Engine Alpha 32

Posted: Sat Jun 28, 2014 7:31 pm
by Mythros
Hi mpz. Any news lately on MP3D?

Re: MP3D Engine Alpha 32

Posted: Sun Jun 29, 2014 10:52 pm
by mpz
Hi,

little update:

53) new Entity added: MP_EntitySetParent (Entity, Parent), as entity is a camera added
54) new Entity added: MP_EntityGetParent (Entity), as entity is a camera added
55) new function added: MP_RenderCamera(); This command renders all cameras for the parent/kid mode
56) in Helpfile the command MP_LimitHingeAngle (Entity, Angle.f) added
57) in Helpfile the command MP_LimitSliderDistance (Entity, mfMaxDistance.f,mfMinDistance.f) added
58) new function added: MP_CreatePhysicMeshfromPoints(Numvertices, *Address, FVFSize [, Flag]); creates a mesh from a point cloud an create a hull around the points

some little new demos are here:
http://www.flasharts.de/mpz/mp33_beta/go.zip

Installer are here
http://www.flasharts.de/mpz/mp33_beta/M ... taller.exe

What is new: i can load a b3d mesh with textur and light map to create dungons(see the editor http://www.blitzbasic.com/Products/maplet.php). I can make a hull from points clouds (but only a hull and not a complex mesh). I can add a camera to a mesh. I now it is not much, but i cant realize all my ideas for now, but i work on it :)

Greetings Michael

Re: MP3D Engine Alpha 32

Posted: Sun Jun 29, 2014 11:45 pm
by coco2
Hi Michael, did you figure out the rotations? I used to do rotation matices in DOS 3D games but it was so long ago I hardly remember how I did it.