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.

AppGameKit Classic Chat / Sharp textures (original look) on models

Author
Message
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 31st Mar 2013 09:14
Hi

I'm trying to set up a graphics style where I mix 3d enviroment with 2d sprites and map 2d sprites and textures to planes. What I wonder is what kind of measurements on the planes, placement of camera etc. I should use to get the textures and 2d models to display in its sharp orignal resolution.

Is this possible or is there some form of antialising going on when using 3d?

I'm trying to get the game to look 2d and use 3d when rotating (like fez) but I want the sharp original 2d look.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 31st Mar 2013 10:04
You need to use setImagMagFilter and/or setImageMinFilter.


this.mess = abs(sin(times#))
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 31st Mar 2013 10:19
Ha! Yes. That was it.

Thanks
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 31st Mar 2013 10:45 Edited at: 31st Mar 2013 10:45
Didn't know the image filter worked on 3D as well. While we are on the subject: Can AppGameKit turn off perspective (seeing sides when off center) and depth (change size depending on distance from camera) for 3D? Again, like in Fez


Demo 3 is out now!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 31st Mar 2013 13:47
There's currently no way of turning perspective off in AGK. The most you can do is change the Field of View (FOV)


this.mess = abs(sin(times#))
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Apr 2013 18:45
Quote: "Can AppGameKit turn off perspective (seeing sides when off center) and depth (change size depending on distance from camera) for 3D?"


You could do this with a shader by ignoring the Projection matrix and using the agk_Ortho keyword instead for an orthogonal matrix.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 2nd Apr 2013 18:46
Oooh, I feel an example request coming on

How do we do that Paul?


this.mess = abs(sin(times#))
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Apr 2013 23:14
A very quick example, untested, but this is how I imagine it would work. This replaces the vertex shader, the pixel shader remains unchanged

vertex


pixel

Login to post a reply

Server time is: 2024-11-24 12:08:24
Your offset time is: 2024-11-24 12:08:24