Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi there, I've read several posts in the forums about using Param1 in irrEdit/Irrlicht Properties when using a texture with transparency to change the alpha level, but after several attempts I still can't get it to work. I've tried both TGA and PNG formats for the texture. I tried also loading a texture with an inherent 50% opacity, and the interesting behavior I observed is that when I set Param1 below 50%, the texture is visible; above 50%, texture becomes completely transparent. If anyone has any ideas, please drop me a reply. Thanks. XM |
||||
|
This are my settings, if it helps: |
||||
|
This is how the "Param1" is supposed to work, it will hide/show any pixel with alpha value threshold defined in param1 property. You said that you loaded a texture with 50% transparency (Alpha) value, and assuming with the screenshot you shared you have "0.5" as the threshold in "Param1". Which means that any pixel in your texture with an alpha value greater than param1("0.5") value will be fully visible, and any pixel with an alpha value less than param1("0.5") will be fully transparent. that is why when you change the threshold your texture is fully visible and fully opaque. It seems you probably misunderstood this property, it doesn't allow you to control the opacity of your texture. Instead, it just hides or unhides the pixel in your texture based on the Alpha value. To change the opacity of your texture or have a property that you can put value and it will change the transparency level of your texture, you can use custom shader for that. There is already a texture that allows you to fade in or fade out any model or texture, you can modify that shader for use case, I am not sure if I added a variable to that shader in case if anybody wants to use a fixed transparency, maybe I should update that, or will create a totally new shader action that allows you to have more control over the texture and transparency and all. Hope this info is helpful to you. ![]() |
||||
|
Ah! I misunderstood the use for Param1. I understand it now. :) |
||||
|
I've been recently thinking to change the alpha cut-off for transparent materials so you can easily adjust total transparency as you expect. I will have to test it out though as might affect other things like terrain plants and other things.... let you know how it goes as I don't use that functionality of cut-off values atm and almost no-one does it seems either... |
||||
|
In answer to xm: I have adjusted the source code the fixed function pipeline material - transparent_alpha and very happy to say this works perfectly now with very smooth adjustments with only adjusting the "Param1" value and no side effects on anything else. I will release this big improvement in my next update. No longer need some arbitrary cutoff but now you can smoothly fade in and out any static mesh....you dont even need a texture with an alpha channel either.... |
||||
|
I asked a question regarding the fading object in the announcement thread, you can answer to that? I believe it is the same thing that you posted there, So I asked there. As I read that post first. Please answer my question there! |
||||
|
Damn, guys, get yourselves a room at a motel ![]() |
||||
|
@Another guest, i am not sure what you are trying to say here. But feels like you have some issues. |
|