With the help of GPT I tried to tackle your problem. It is not a complete solution, but it points in the right direction, I think. You first need the normals to determine which of the vectors point in the direction of the camera. You would still need to determine to which object these vectors are assigned, to determine the color of the material and create a new transparent material of the same color and assign it to the facet. I don’t know if you can assign a material to a facet alone, otherwise you would have to break the objects into sub-objects. A very interesting task. Good luck with the implementation!
Interesting approach but it doesn’t seem to work with the alpha as per the request (although I must admit I’m not sure to fully understand the request) like why do the meshes need to be merged (which obviously might create an additional level of complexity since opaque and alpha-test or blended meshes do not render simultaneously.
I think It’s useful for complex models that consist of multiple meshes. A better solution would be to wrap a shader over the ‘bag of meshes’ to achieve the desired effect, allowing us to go beyond alpha on the meshes.
An example from my game where I use alpha 0.4 (alphamode 5) with stencil function not equal (its ~15 meshes)
I guess you should try call-in one of the experts or we’ll just continue ‘fiddling’ with it
May be @Evgeni_Popov for the alpha and stencil or else @PatrickRyan for his magic in creating shaders and mastering complex assemblies.
It’s only a matter of time before we dilettantes figure out the right answer.
The infinite monkey theorem states that a monkey hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type any given text, such as the complete works of William Shakespeare. Infinite monkey theorem - Wikipedia
Looks like you spotted me Obviously, I’m no Google; neither in terms of resources nor anything But you know what, I’m still happy with my condition. I just need to better scope what I can achieve and where I would likely need a hand Probably one of the reasons why I luv this forum and you Guys; Money isn’t just everything
I still have half a cup of coffee and have been thinking a bit more about the problem. What do you think of the idea of blending? Just put a plane over the object and use the blending to mix the pixels to achieve a ghost effect?
I can’t imagine handling this in a game. And the plane won’t work with character meshes (or any other shapes). I think a shader might be the only way to go (but then again, I’m sure no specialist of that)
I do not see that as a working solution for me. As Mawa writes, I think a better solution would be a shader that wraps around the meshes without overriding their materials, so we can effectively add alpha and other effects to meshes. However, I do not know how to accomplish this.
I asked ChatGPT to create a shader, but although it made the shader correctly, it did not work on the child meshes.
I’d say wait until tomorrow. Let the experts kick-in and meanwhile move on with something else, or even better, take your sunday off and enjoy some free-time. I’m (quite) sure the solution will come to you beginning of the week. Meanwhile, take care and have a great day
When I get stuck on an issue let it rest for sometime before I try again and ask for guidance.
It’s funny that you say that about free-time, because I have been self-employed-consultant for the last 12 years and I am starting my first permanent job tomorrow! So, I probably won’t be able to go mountain biking in the middle of the day anymore