Problems with alpha texture and mix nodes

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
User avatar
denon100
Posts: 22
Joined: Wed Nov 20, 2019 3:37 pm
Location: Germany

Problems with alpha texture and mix nodes

Post by denon100 »

Hello,
I don't know how to use an alpha texture in Luxcorerender
I thought it works like in Cycles ?
Can someone help ?

Thanks
Attachments
Cycles.PNG
Luxcore.PNG
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Problems with alpha texture and mix nodes

Post by Dade »

Looking at the screenshot, you may have to "invert" (i.e. 1 - alpha) the alpha value :idea:

The alpha mask seems the negative of what you want. It should also work if you just swap the mixed materials.
Support LuxCoreRender project with salts and bounties
User avatar
denon100
Posts: 22
Joined: Wed Nov 20, 2019 3:37 pm
Location: Germany

Re: Problems with alpha texture and mix nodes

Post by denon100 »

Even if I swap the materials, I always get an inverted alpha texture.
Do you have any advice ?

Thanks
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Problems with alpha texture and mix nodes

Post by Dade »

Can you post the scene ?
Support LuxCoreRender project with salts and bounties
User avatar
denon100
Posts: 22
Joined: Wed Nov 20, 2019 3:37 pm
Location: Germany

Re: Problems with alpha texture and mix nodes

Post by denon100 »

Thank you !
test.PNG
untitled1.blend
(2.31 MiB) Downloaded 213 times
mip
Posts: 8
Joined: Fri May 22, 2020 11:46 am

Re: Problems with alpha texture and mix nodes

Post by mip »

Hi Denon,

Maybe, instead of connecting alpha to MixFactor, you could try :
connect SpongeBob Color -> ColorRamp, setting black Offset to 0.9 in ColorRamp
then connect Color Ramp -> Mix Factor
PetrT
Posts: 81
Joined: Sun Dec 02, 2018 6:13 pm
Location: Russia
Contact:

Re: Problems with alpha texture and mix nodes

Post by PetrT »

This is the way 8-)
Attachments
019.png
User avatar
denon100
Posts: 22
Joined: Wed Nov 20, 2019 3:37 pm
Location: Germany

Re: Problems with alpha texture and mix nodes

Post by denon100 »

Hello,
this works only conditionally and is not what I want to achieve.
With the user Osmodivs , see link, it also works !
viewtopic.php?f=4&t=2569&p=25335&hilit=alpha#p25335

Thanks
mip
Posts: 8
Joined: Fri May 22, 2020 11:46 am

Re: Problems with alpha texture and mix nodes

Post by mip »

I think it's because Osmodivs image has a transparent background while yours has a white background.
You will have to use PetrT way or change your source image.
User avatar
denon100
Posts: 22
Joined: Wed Nov 20, 2019 3:37 pm
Location: Germany

Re: Problems with alpha texture and mix nodes

Post by denon100 »

@PetrT;
you are my hero !
Sometimes you can't see the forest for the trees :idea:

Thanks to all for the help
Post Reply