Texture with transparent pixel

About Monkey 2 Forums Monkey 2 Programming Help Texture with transparent pixel

This topic contains 10 replies, has 5 voices, and was last updated by  Diffrenzy 1 year, 6 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #9864

    Novoitch
    Participant

    I managed to create a cube with custom texture using a pbrmaterial.

    The problem is than using Texture.Load(“image.png”,TextureFlags.FilterMimap) Monkey2 seem to ignore the alpha channel. I first though that it was due to other textures used by the material but it seems it’s not the case.

    I know the answer is probably simple but i’m not sure so, my question is:

    How to add texture with some pixels transparent to a model?

    #9865

    Mark Sibly
    Keymaster

    Transparency isn’t supported yet, should be added soon!

    #9867

    Novoitch
    Participant

    Oh,… ok.

    Thanks for the reply.

    #9872

    Hezkore
    Participant

    What I did was to use ‘discard’ in my own material shader to get transparency.
    if( texture2D( m_EmissiveTexture,v_TexCoord0 ).a < 0.5 ) discard;

    Seen here on the vines: http://monkeycoder.co.nz/forums/topic/quake-bsp-loading/page/2/#post-9288

    #9874

    DruggedBunny
    Participant

    Can we also have the effect that projects semi-transparent textures onto walls, etc, from a light? Can’t think what it’s called! Guess it would be part of shadows… ?

    #9884

    Novoitch
    Participant

    Are you talking about emissive textures? If it’s the case: I think that the pixels are brights but doesn’t emit light for the moment. Check the blog, I think there’s something talking about.

    #10695

    Diffrenzy
    Keymaster

    *Bump*

    Just ran into this, are there any news?

    #10699

    Mark Sibly
    Keymaster

    No news, a ton of other stuff to do first right now, including looking for some actual paid work!

    #10700

    Diffrenzy
    Keymaster

    ok, I’ll work around it 😀

    Sprites has it though?

    #10702

    Mark Sibly
    Keymaster

    Sprites has it though?

    Sprites are very special case. They don’t interact with lighting, and are added to a ‘mesh’ in realtime so are also very easy to sort. Transparent surfaces are much harder to deal with.

    #10703

    Diffrenzy
    Keymaster

    ok,thanks for explaining 🙂

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.