Home › Forums › Graphics / Blender › alpha blend mode / add shader compatbility
- This topic has 5 replies, 5 voices, and was last updated 1 year, 5 months ago by kdv.
-
AuthorPosts
-
2021-08-04 at 10:09 am #43442thomasupCustomer
since we are trying to avoid alpha sorting issues, we are looking to use additive alpha blending, which should work oder-independent.
now, in eevee you can achieve this by setting the material to alpha blend, and using an add shader (see attached image). unfortunately, this does not export to verge3d in the same way. the material will not blend additively.
as a workaround, we are trying to output the color directly, and setting the blend mode via script manually:
app.scene.getChildByName("BezierCircle.004").material.blending=v3d.AdditiveBlending;
while this works, it is not completely the same blend effect, and it also will not look correct in the blender viewport.future support of the add shader with transparency would be much appreciated. alpha or multiply blend modes are very useful, as they do not depend on the draw order.
Attachments:
You must be logged in to view attached files.2023-03-20 at 9:47 am #61253Alexander KovelenovStaff2023-03-23 at 12:08 pm #61378visualizerCustomerHi
AlexCan the latest version (OIT) support the blending transparency & opacity from 0 – 100 & 100 – 0 as well?
2023-03-23 at 2:58 pm #61379Nurgeldi DovletovStaffHi visualizer,
For now, it works, but usually the more opacity the objects have (except opaque objects), the worse the blending result will be. Therefore, the recommended opacity range is 0.0 to 0.5 (i.e 0-50).
I still recommend to check, maybe in your case there will be an acceptable result.
Verge3D Developer
2023-06-15 at 1:46 pm #64643thomasupCustomervery nice! we will put the additive blending to use!
- This reply was modified 1 year, 5 months ago by thomasup.
2023-06-17 at 12:43 pm #64681kdvParticipantFor now, it works, but usually the more opacity the objects have (except opaque objects), the worse the blending result will be. Therefore, the recommended opacity range is 0.0 to 0.5 (i.e 0-50).
It’s quite possible to make it work in the full opacity range from 0 to 1. Even more, this won’t require additional WebGLOITRenderer, will work with any v3d.js version and will run a little bit faster on low-end/middle-end devices.
4.3.1, original OIT https://v3d.net/l35
4.2.0, custom OIT, sorting disabled https://v3d.net/injsince we are trying to avoid alpha sorting issues
What issue exactly do you mean? There a lot of them with alpha blending. Show an example…
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
-
AuthorPosts
- You must be logged in to reply to this topic.