How to show a model semi transparent without using transparent textures?

I mean I want to set the transparency of a model to 50% or other values is it possible?

It’s possible with transparent materials. Would that meet your needs?

1 Like

I don’t know what is a transparent material. I can’t find it in the wiki…

1 Like

Yes. There should be a colour variable you can set in the material, not forgetting to set the blend mode to alpha in the additionalRenderState.

Setting the colour should multiply the texture with the colour, so if the colour has alpha you get transparency.

4 Likes

generally there are 4 ways(that i know):

  1. you set transparency Threshold, so your gif/png image will look like gif with transparent pixels(in most shaders it is)

  2. you set png texture and setup blending to alpha in “additionalRenderState” TAB.

             geom.setQueueBucket(RenderQueue.Bucket.Transparent);
             geom.getMaterial().getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Alpha);
    
  3. you set transparent color like new ColorRGBA(1,1,1,0.2f) 0.2f → transparency.
    but here again:

             geom.setQueueBucket(RenderQueue.Bucket.Transparent);
             geom.getMaterial().getAdditionalRenderState().setBlendMode(RenderState.BlendMode.Alpha);
    
  4. create own shader and set pixel colors with transparency (and again above code too)

2 Likes