Code Monkey home page Code Monkey logo

Comments (6)

rdb avatar rdb commented on May 16, 2024

Could you attach the source files we would need to reproduce the issue?

from panda3d.

nosyliam avatar nosyliam commented on May 16, 2024

I would very happy to do so privately. Do you have any other ways to contact?

from panda3d.

rdb avatar rdb commented on May 16, 2024

Contact me at [email protected].

from panda3d.

nosyliam avatar nosyliam commented on May 16, 2024

I have sent an e-mail with the files to [email protected]. Please let me know if you do not receive it.

from panda3d.

rdb avatar rdb commented on May 16, 2024

So here's what's happening: since you set it to clamp mode, egg-palettize is stretching out the colours at the edge of the texture into the margin area, with the intent to reduce artifacts when you use this texture with the "clamp" texture wrap mode. Otherwise, when the texture is sampled in "clamp" mode, you may end up with a darkened border due to the filtering sampling into the margin area.

This seems to be working as intended, as far as I can tell from the files you sent; the weird colour in the margin area is just a repetition of the colours at the edges of your texture. If you change it to "repeat_u repeat_v" instead, then you'll see it wrap around instead. Note that even transparent pixels can have a colour value.

If I open the texture in the GIMP, first paint a 1-pixel border outside the texture with black (to clear the colour information) and then erase it to make it transparent, then there is no extension of the texture border in the margins. (Clearing it with black first is optional, but since egg-palettize does not premultiply the alpha, it means that you are still seeing the colour value in the .png, even though it's masked out by the .rgb that contains the alpha mask.)

Is that what you're expecting—to see only the background colour in the margins instead? It would not be very difficult to add such a feature, if you would request it. If not, and if the above is sufficient to solve your problem, please close this issue.

from panda3d.

nosyliam avatar nosyliam commented on May 16, 2024

I was originally only expecting it to make a margin with the background color, not to extend it. I've actually been making 5-pixel transparent borders on all my images manually beforehand but it's a very tedious problem that I was hoping the margin feature could solve. I'll request it as a feature in another issue, thank you :)

from panda3d.

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.