Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

project and scale 3D object to 2d screen space

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 hserver   Members   

142
Like
0Likes
Like

Posted 11 November 2012 - 12:07 PM

Hi
I have a function that already project a 3d point into my screen whitch I want to share with you !

Public Function GetScreenCoordBy3DPoint(ByRef RetX As Single, ByRef RetY As Single, ByRef Px As Single, ByRef Py As Single, ByRef Pz As Single, ByRef RetdistZ As Single) As Object
	    Dim MatView As Matrix
	    Dim matProj As Matrix
	    Dim RetVec As Vector3
	    Dim Vec1 As Vector3
	    Vec1.X = Px
	    Vec1.Y = Py
	    Vec1.Z = Pz
	    Dim tViewPort As Direct3D.Viewport ' DxVBLibA.D3DVIEWPORT8
	    Dim IdentMat As Matrix
	    IdentMat = Matrix.Identity
	    MatView = D3DDevice9.GetTransform(Direct3D.TransformType.View)
	    matProj = D3DDevice9.GetTransform(Direct3D.TransformType.Projection)
	    'd3ddevice9.GetTransform D3DTS_WORLD, IdentMat
	    tViewPort = D3DDevice9.Viewport
	    RetVec = Vector3.Project(Vec1, tViewPort, matProj, MatView, IdentMat)
	    RetX = RetVec.X
	    RetY = RetVec.Y
	    RetdistZ = RetVec.Z
    End Function
I want to render a 3d mesh and prevent its scaling when it go far from camera
any suggestion how should I scale it ??
----
sorry for bad EN

#2 cofruben   Members   

141
Like
0Likes
Like

Posted 19 November 2012 - 03:15 AM

Aren't you looking for an isometric transformation?
Are you looking for a patcher, for your future MMOG? Check HPatcher! Visit http://cofruben.krusher.org

#3 Radikalizm   Members   

4794
Like
0Likes
Like

Posted 19 November 2012 - 05:06 AM

You're looking for an orthographic or orthogonal projection
An isometric projection would be a projection where a unit is of equal length for all three projected axes, and where the angle between two adjacent projected axes is exactly 120°.

Edited by Radikalizm, 19 November 2012 - 05:08 AM.

I gets all your texture budgets!





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.