Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Orthographic camera

Author
Message
Dmitry K
16
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Russia
Posted: 13th Nov 2004 02:53 Edited at: 13th Nov 2004 02:57
Orthographic camera in DBPro.
Useful for modeling program.



Specs: P4 2.4GHz, DIMM 256 266Mhz, 60GB HD 7200rpm ATA-133, GeForce 4 MX440, CD-RW+DVD, WinXP
Cloggy
14
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 13th Nov 2004 04:10
Dmitry,

Excellent piece of work. Just what I was looking for. If possible, would you be able to alter it slightly to give me the projection im am trying to get in this post

http://forum.thegamecreators.com/?m=forum_view&t=42563&b=1

I'm sure I just need to fiddle with the numbers a bit. I'll try but I'm sure it's easy for you

Cheers,

Cloggy
Dmitry K
16
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Russia
Posted: 13th Nov 2004 04:51
Try this:



BTW, the object size must be in screen coordinates.

Specs: P4 2.4GHz, DIMM 256 266Mhz, 60GB HD 7200rpm ATA-133, GeForce 4 MX440, CD-RW+DVD, WinXP
Cloggy
14
Years of Service
User Offline
Joined: 31st Oct 2004
Location: Rayleigh, Essex
Posted: 13th Nov 2004 06:29
Dmitry,

Thats perfect. If I change the value *m33 I can get the effect of zooming in and out.

I just wish I knew what the matrix values mean. It's one thing changing them and quite another actually understanding them.

Cheers,

Cloggy
Vai mamar na pila
14
Years of Service
User Offline
Joined: 10th Nov 2004
Location: Behind Your Behind
Posted: 17th Nov 2004 03:58
what is an ortographic camera ?
Jess T
Retired Moderator
15
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 24th Nov 2004 12:41 Edited at: 24th Nov 2004 12:45
Dmitry, yet again you have out done yourself.
I personally can use this code a great deal, and for that, I thank you

For those that do not understand the Projection Matrix structure, here is a description on MSDN. It's a bit left of centre if your not used to how a 'Matrix' works, but if you read a couple of times, you may understand it (I'm still trying to )

http://msdn.microsoft.com/library/en-us/directx9_m/directx/direct3d/gettingstarted/transforms/projection%20transformation/whatisprojectiontransformation.asp

Jess.


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!
David T
Retired Moderator
16
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 25th Nov 2004 00:28
Dmitry - excellent work! Very clever the way you do it - by calling internal dlls and altering the memory values

Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Mobiius
Valued Member
16
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 30th Nov 2004 09:45
Usefull!

1800+ XP - GeforceFX 5600 - 256MbDDR - 60Gb Hdd - XP Pro (SP2)
X Trade
15
Years of Service
User Offline
Joined: 19th Feb 2004
Location: near bristol, UK
Posted: 30th Nov 2004 23:29
its cool, works nice although it was a bit confusing untill i realised that the camera was spinning not sliding across...

i could find this very useful...

is it possible to change the code to make it create a spheremap camera? i know theres probably no chance whatsoever, as far as i understand the camera system... but.. i could be wrong??

www.AoFP.tk
Dmitry K
16
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Russia
Posted: 3rd Dec 2004 02:53
Quote: "
is it possible to change the code to make it create a spheremap camera? i know theres probably no chance whatsoever, as far as i understand the camera system... but.. i could be wrong??
"

I tried to find the information on the spheremap camera in internet but unsuccessfully. If I find out the formula of spheremap camera I shall write an example at once.

Specs: P4 2.4GHz, DIMM 256 266Mhz, 60GB HD 7200rpm ATA-133, GeForce 4 MX440, CD-RW+DVD, WinXP
Maleck
15
Years of Service
User Offline
Joined: 12th May 2004
Location: US
Posted: 7th Jan 2005 05:11
I have been using this in a util I was working on and it is doing great. I wanted wireframe orthographic views for adding effects locations to models, and once i figured out that I needed ot turn culling off to see all the wireframe sections, and tweaking it a bit to allow zooming with the mouse wheel, it has been working wonderfully.

Thanks again for putting this together Dmitry.

Login to post a reply

Server time is: 2019-05-26 13:56:35
Your offset time is: 2019-05-26 13:56:35