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.

DarkBASIC Professional Discussion / Accessing/Modifying the Projection Matrix

Author
Message
Mr Anderson
21
Years of Service
User Offline
Joined: 14th Oct 2003
Location: NYC
Posted: 16th Mar 2004 06:34
I learned how to make high res images... I just need to be able to change the projection matrix.

anyone?

IDIC (Infinite Diversity Infinite Combinations)
Mr Anderson
21
Years of Service
User Offline
Joined: 14th Oct 2003
Location: NYC
Posted: 21st Mar 2004 03:22
Ok maybe I sounded alien.

In OpenGL there is something called the projection matrix. I'm sure that DirectX has an equivilant mechanism, I just wanted to know if you could manipulate it within DBPro.

I wanted to create screen shots that are very high resolution. The only technique I have found manipulates the projection matrix part of the render pipeline. And you render out several square images that fit together to form the final image.

Anyone

IDIC (Infinite Diversity Infinite Combinations)
walaber
21
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 21st Mar 2004 03:52
oooh... highly unlikely... DBPro doesn't let the user quite that deep into the DirectX pipeline.

I suppose you could try rendering the scene several times from different camera positions, and then re-assembling the screen later, but I think you would run into perspective problems...

tough one.

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Bulleyes
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 21st Mar 2004 11:09
You can't, but you can sorta like altering the projection matrix by fiddling with the camera parameters like FOV, far/near clipping plane, etc. I don't know whether this will help you though.

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
DrakeX
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 21st Mar 2004 16:35
strangely, there is a way to retrieve the projection matrix, but no way to set it. in the 3dmath command set, there is the PROJECTION MATRIX4 command that fills a matrix with the current projection matrix, but.. i can't find a command that set the projection matrix!

OK, i was a bit conservative with my release date. predicted DBP P6 release date: Bjork 45, 3418

cookies, milk, and communism.
AtomR
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Portugal
Posted: 21st Mar 2004 20:14
BUILD LOOKAT LHMATRIX4
BUILD LOOKAT RHMATRIX4
BUILD ORTHO LHMATRIX4
BUILD ORTHO RHMATRIX4
BUILD FOV LHMATRIX4
BUILD FOV RHMATRIX4
BUILD PERSPECTIVE LHMATRIX4
BUILD PERSPECTIVE RHMATRIX4
BUILD REFLECTION MATRIX4

Have you tried using these commands? I honestly don't know what they are for but maybe it's what you want.

I think that DBS should invest a little time making proper documentation for the 3d maths commands, if nothing else's. They are really not at all self explantory. On the other hand if words like projection matrix, perspective matrix, loot at matrix doesn't say anything it's highly likelly the documentation wouldn't help much either. Can anyone point me to some tutorial sites where I/we could learn a bit more about these technical terms?

Take care
AtomR
DrakeX
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 22nd Mar 2004 05:16
those commands let you make projection matrices, but there is no command to actually apply the matrix after you've made it.

OK, i was a bit conservative with my release date. predicted DBP P6 release date: Bjork 45, 3418

cookies, milk, and communism.
Neophyte
22
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 22nd Mar 2004 08:07
The 3d Math command set is mostly for shaders. If you want to apply your own projection matrix you'll have to write a shader to do it, and pass in the value of whatever projection matrix you want. This is a bit over kill but unfortuanately its the only way right now. Until Lee or Mike decided to allow us apply the matrixs to object and whatnot I'm afraid a shader is your only route.

@Mr Anderson

I'm not entirely sure what technique you found but I just don't understand how modifing the projection matrix would give higher resolution. If you want higher resolution screen shots just switch you resolution to something bigger and snap a picture. Problem solved.
Dmitry K
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Russia
Posted: 23rd Mar 2004 10:19
You must use Set Camera Fov, Set Camera Range



Specs: P4 2.4GHz, DIMM 256 266Mhz, 60GB HD 7200rpm ATA-133, GeForce 4 MX440, CD-RW+DVD, WinXP

Login to post a reply

Server time is: 2025-06-06 17:16:49
Your offset time is: 2025-06-06 17:16:49