Code Monkey home page Code Monkey logo

Comments (17)

darthmaim avatar darthmaim commented on June 10, 2024

For easier comparison:

Screenshot API
image image

from api-cdi.

dr-ishmael avatar dr-ishmael commented on June 10, 2024

The specializations panel in-game looks like it uses an overlay on the background image - so that's the full background image showing through with a bit of a border applied.

The icon, as referenced by the API, is what's shown in the drop-down list where you change the selected specialization.

from api-cdi.

KelianB avatar KelianB commented on June 10, 2024

Oh yea, that makes sense!
Then I think it would be really cool if we could have the background image for specializations.

from api-cdi.

lye avatar lye commented on June 10, 2024

I can add in the backgrounds, but they're a bit wonky --

1784571

from api-cdi.

KelianB avatar KelianB commented on June 10, 2024

If all of the backgrounds have this exact same issue, it's pretty easy to handle on our side. It would be better than nothing I guess.

from api-cdi.

lye avatar lye commented on June 10, 2024

They mostly have the same issue. Pretty sure the padding dimensions are all the same, but the rgba of the padding varies. Shouldn't be a big deal.

I need to do a live deploy today to correct some discovered issues in /v2/traits-beta, so this change will probably go out today too <3

from api-cdi.

lye avatar lye commented on June 10, 2024

Backgrounds are up. They're a bit weird; the game renders them by upscaling the image to 1024x256px, then cropping it to the lower-left 647x136px. I should probably put that in the endpoint docs. Here's an example rendering in my terrible javascript:

https://jsfiddle.net/o1oavwsa/

Some of them look kind of gross, but @tivac assures me that the browser image scaling is just terrible. Those are what are displayed in-game, so I don't know if there's anything I can do about that :/

from api-cdi.

tivac avatar tivac commented on June 10, 2024

https://developer.mozilla.org/en/docs/Web/CSS/image-rendering

Not the complete answer (compatibility lolololol), but futzing w/ these values should definitely help.

from api-cdi.

darthmaim avatar darthmaim commented on June 10, 2024

I made a quick test resizing them on the server, which looks slightly better, but not much, even after playing quite a bit with different filters. Especially on my retina display all those upscaled images look horrible.
But still better than nothing, thanks for the super quick fix! ❤️

from api-cdi.

lye avatar lye commented on June 10, 2024

I don't even know how we're making it look this crisp in-game though:

spec-in-game

Here's what it looks like in-browser:

spec-in-browser

And with your server's resampling:

spec-resampled

qq

from api-cdi.

lye avatar lye commented on June 10, 2024

So I pulled over an engine programmer and he pointed out that we may actually be returning the correct texture but the wrong mipmap level. It's kind of telling that the bad backgrounds are exactly half the resolution of the normal ones.

The game is definitely using a different bitmap than what the render endpoint is returning though, so the inconsistency is more than just an issue with the browser's resampling. Gonna see if I can figure out how to get the correct image out.

from api-cdi.

KelianB avatar KelianB commented on June 10, 2024

To me, some of the backgrounds have a much better quality than others. Looking at your initial jsfiddle, warrior/guardian/thief/engineer/elementalist seem better than mesmer/necromancer/ranger.

Edit: actually, I just realized the image size is not the same.

from api-cdi.

lye avatar lye commented on June 10, 2024

Yeah, there's some really horribly obscure bug in render.guildwars2.com that's causing it to return the first mip level of images that have embedded mipmaps.

from api-cdi.

darthmaim avatar darthmaim commented on June 10, 2024

Just had a quick look at this again, and it seems like the file ids are wrong? The API returns 1012057, which is the 512x128 version, the correct 1024x256 one would be 1012058 (notice how it seems to always be +1 the small one). Not sure if the really is a bug with render.guildwars2.com then, maybe it's just your code getting the wrong file id (but then again, I have no idea how its stored internally).

1012057 1012057
1012058 1012058

from api-cdi.

lye avatar lye commented on June 10, 2024

Hilariously, this is partially fixed. Three of the mesmer specialization backgrounds are still broken, but the rest look like they're being returned full-res. I'll try to apply the fix again to the mesmer art and see if that finally sticks.

from api-cdi.

lye avatar lye commented on June 10, 2024

Pretty sure these are all fixed.

from api-cdi.

darthmaim avatar darthmaim commented on June 10, 2024

I was hoping your fix for this would also fix some of the item icons that are returned in lower resolutions (like 222822.png of Experience Scroll). Could you maybe take a quick look if this is somehow related and could be fixed the same way?

from api-cdi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.