Filtered vs. Pixel Perfect Sharpen Textures in Blitz3D. Help
Übersicht

piojBetreff: Filtered vs. Pixel Perfect Sharpen Textures in Blitz3D. Help |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hi! It's been quite long, isn't it? ![]() I'm currently working on my own Sprite Lib based on Draw3D from Hectic (I learned a lot from your code, thx dude!). It's coming nicely to apply it on the next version of Bemap! Editor... Yesterday I tested Sprite Candy Demo and it's awesome with all the features it has. The lib "magically" is able to load pixel-perfect textures without any hack or extra dll. I took a shot to compare the differences between my standard method (the same as Draw3D) and S.C.'s. ![]() Do you guys know why this happen? I mean, Everytime I create or Load a texture, Blitz3d automatically filters it...How does Sprite Candy works to correct that? I later came with a theory that seems to be two possible solutions: 1. re-Write to texturebuffer from imagebuffer, for the color, while keeping the old alpha... 2. copy the whole image to a texturebuffer, then apply a new alpha (textureblend 3, per example) What do you think. Can it be somewhat like this? BTW, talking about Draw3D, I love the way it handles triangles to ensure only low amount of surfaces are created. Now I know how to add more features, like CopyGrabbedImage3D or something like that.. |
||
![]() |
hecticSieger des IS Talentwettbewerb 2006 |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hi pioj,
change the value of constant in ''Draw3D.bb'' from Code: [AUSKLAPPEN] ;====-===-==-=-O-P-T-I-O-N-S-=---- --- -- - - - - -
Const DRAWOFFSET#=0.25 ;Grabing-UV-Offset-Constant (Standard 0.25) to Code: [AUSKLAPPEN] ;====-===-==-=-O-P-T-I-O-N-S-=---- --- -- - - - - -
Const DRAWOFFSET#=0 ;Grabing-UV-Offset-Constant (Standard 0.25) |
||
Download der Draw3D2 V.1.1 für schnelle Echtzeiteffekte über Blitz3D |
pioj |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hi, hectic.
Thx, edges won't appear anymore as you crop some height... Does this constant do something more? |
||
![]() |
hecticSieger des IS Talentwettbewerb 2006 |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hallo pioj,
wir kennen uns ja schon aus einigen E-Mail-transfers. Dabei weißt du ja schon, das mein Englisch nicht so gut ist. Vor allem dann nicht, wenn ich so spezielle Sachen erklären will. Ich hoffe für dich, das geht so in Ordnung. ![]() Die Draw3D-Konstante soll in erster Linie eine einfachere Handhabung für unerfahrene User ermöglichen. Besonders Anfänger tun sich schwer damit, aus welchem Grund ich diese Konstante erst so voreingestellt hatte. - - - Draw3D.bb / DRAWOFFSET#=0 Bilder werden so genommen, wie sie oft unzulässig erstellt wurden. Dann kommt es bei einer nicht <> *1 -Skallierung oder gedrehten Bildern zu Überläufen nach benachbarten Texel. 2 x perfekt 4 x schlecht - - - Draw3D.bb / DRAWOFFSET#=0.25 (Standard in der Draw3D V.3.2) Bilder werden so genommen, wie sie oft unzulässig erstellt wurden. Nun ''korregiert'' die Draw3D die Fehler, die der Programmierer machen könnte, indem automatisch mehr gegrabbt wird, als angegeben wurde. So ist allerdings eine pixelperfekte Darstellung nicht mehr möglich. Also ein Tilesystem ist problematisch. 4 x gut 2 x schlecht - - - Draw3D.bb / DRAWOFFSET#=0 Bilder wurden vorher bereits im Grafikprogramm so erstellt, dass es zu keinem Zeitpunkt zu Überläufen nach benachbarten Texeln kommen kann. Das erfordert aber, dass alle Bilder die gedreht oder skalliert werden sollen, vorher entsprechend im Grafikprogramm erstellt worden sind. Die neue Draw3D2 arbeitet mit einer Voreinstellung von DRAWOFFSET=0, um ein perfektes Ergebnis erreichen zu können. Um aber Probleme im Vorwege zu umgehen, werde ich entsprechend noch eine FAQ dazu erstellen müssen. 6 x perfekt - - - Ich hoffe das hilft erstmal weiter... |
||
Download der Draw3D2 V.1.1 für schnelle Echtzeiteffekte über Blitz3D |
pioj |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
thx, i suspected it was related to something like that...
I made some tests with several images both mine and from Internet, and all of them looks the same 1:1 pixel perfect quality to me. I don't think there is a post texel treatment at all, neither an scaling sharpen process... Sprite Candy does definitely have to do something reading directly from the image buffer or something. This has a lot of sense, as it'd be the fastest way to achieve that result. [UPDATE] To show a more detailed difference, I've taken a shot at 300% zoom. ![]() I can notice a very thin change between contrast and brightness in the SpriteCandy result, so this could mean indeed there's a post-pixel/texel treatmen after all... Anyone else knows about this? |
||
pioj |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
I just bought Sprite Candy today and it's really neat. Lovely ![]() However, I'm going crazy because I can't see no difference between his code and mine at all, except for the layer stuff... Another weird thing is that I get a blurred image after I'm playing with scale transform in some of the examples that come with the code, but then I run the Demo and the image keeps clean after I scaled again. ![]() (I hope Mozilla Fundation doesn't punch me for putting some images from their browser, ![]() |
||
![]() |
hecticSieger des IS Talentwettbewerb 2006 |
![]() Antworten mit Zitat ![]() |
---|---|---|
Die Sprite Candy wie auch alle anderen 2D-Grafikbibliotheken (u.a. auch die Draw3D) die auf 3D-Unterstützung aufbauen, haben das gleiche ''Problem''.
Das liegt einfach daran, dass es nicht möglich ist, ein absolut pixelperfektes Bild in gleicher Qualität gedreht darzustellen. Schon allein, wenn man sich Gedanken darüber macht, wie die Grafikkarte das Bild anhand eines Quads an den Kanten anzeigen muß, wird einem das schnell klar. Auch die Unschärfe mitten im Bild kann nicht pixelperfekt sein. Das ist einfach physikalisch nicht möglich. Die einzige Lösung um Blender zu verhindern ist folgende: - Immer um ein Bild muß mindestens ein Pixel transparenz innerhalb als auch außerhalb der Schnittkante ausgelassen werden. Das heisst, dass effektiv bei einem Bild von 256x256 Pixel tatsächlich nur 254x254 Nutzbar sind, oder man lädt die Textur mit Modus +48. - Bei einem ausgeschnittenem Bild - also einem Teilbild aus einer größeren Textur - muß noch zusätzlich außerhalb des ausgeschnittenem Bild (z.B. GrabImage3D ![]() - - - Außerdem kann man etwas mehr Schärfe bekommen, indem man die Textur in dem VRAM lädt. Das hiesse LoadTexture Modus +256. Sollte auch was bringen. Zumindest tut es das in, wenn man Texturen unter echtem 3D verwendet. Ansonsten wünsche ich dir, dass du das ausgegebene Geld nicht bereust. ![]() - - - Edit1: Was ist eigendlich mit der persönlichen Nachricht die ich dir gestern noch geschickt hatte? Schau dir das mal an... |
||
pioj |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Thx. Don't get me wrong, I'm not THAT obsessed with the image quality.
I always try to push Blitz3d limits as much as I can so the only bug expected is me programming. ![]() Btw, It was right to pay it for. Sprite Candy has a LOT of functions that fit in my needs. Ease motion, or text arragement were some of them... |
||
![]() |
hecticSieger des IS Talentwettbewerb 2006 |
![]() Antworten mit Zitat ![]() |
---|---|---|
Kurz erklärt:
Wenn man ein Bild 1:1 darstellt, dann entspricht es --> ein Pixel auf ein Texel. Dadurch kann man - wenn das Rohmaterial es vorgibt - ein sehr scharfes Bild zeichnen. Aber, sobald man das Bild dreht (ungleich 0°, 90°, 180°, 270° ...) oder das Bild skalliert (+/- 1*), dann stimmt das 1:1 nicht mehr. Das heisst: Ein Pixel mischt sich auf mehrere Texel aus. Oder andes ausgedrückt, ein Texel wird durch mehrere Pixel auf dem Bildschirm verteilt. |
||
Download der Draw3D2 V.1.1 für schnelle Echtzeiteffekte über Blitz3D |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group