Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Alpha texture #94

Open
nicolab28 opened this issue May 11, 2020 · 5 comments
Open

Alpha texture #94

nicolab28 opened this issue May 11, 2020 · 5 comments

Comments

@nicolab28
Copy link

How to make a transparency mask, I have tried everything I can't do it.

@ManishJu
Copy link

I do not think there is support for transparency mask yet in this ray-tracer.

@elfrank elfrank added help wanted Extra attention is needed question Further information is requested labels May 17, 2020
@elfrank
Copy link
Collaborator

elfrank commented May 17, 2020

@nicolab28 could you clarify what you mean by Transparency mask? such as, what's the use case? To make sure we guide you in the right direction.

@nicolab28
Copy link
Author

What I would like to do is use either a png or a grayscale image, If it's white, it's opaque, if black, transparent ...
Like a layer in Photoshop.
To do wrire netting / roasting / grating

@jaxry
Copy link
Contributor

jaxry commented May 17, 2020

In other words, the .alphaMap property. This is a really useful feature to have.

Just to give my two cents: It would be straight forward to implement for the first light bounce (the rasterization pass). But when I looked into other ray tracing implementations, reading alpha maps during the ray intersection step can cut performance by 2x or more. So implementing this feature needs some care.

It might be sufficient just to have alpha mapping for the first bounce, since secondary bounces have significantly less detail. Or it also might be possible to implement alpha mapping for ray intersection in a really clean way that only slows down performance for extreme cases (like trees with hundreds of semi-transparent leaves).

@jaxry jaxry added feature request and removed help wanted Extra attention is needed question Further information is requested labels May 17, 2020
@nicolab28
Copy link
Author

Not everyone necessarily needs real-time rendering ... Performances halved, that may be fine.
Sometimes we need to do semi opaque, or gradient lacquering.
maxresdefault

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants