Forum

Problem Exporting Image-Based Alpha Transparency

23 October 2014 10:03
Earlier I was asked to export a model I'd built into Blend4Web generated html. All went well except when I tried to output the transparency-based sign I'd made. When I tried to do it as a normal material, I didn't get the 'cutout' effect I wanted; the alpha simply made the entire mesh transparent.

Next I decided to try node materials, and got a beautiful result - at least inside Blender. On the browser side I got a big block of bright purple. Below are the before-and-after screenshots of what I tried to do. I'm hoping I just missed a setting somewhere. Otherwise, I would like to know the correct method to get the effect I want.



23 October 2014 11:15
Hello again!

Blend4Web needs to know what UV to use. Just put the name of your UV map here in geometry node :)



Also, some errors are shown in console in HTML player. Press F12, maybe there'll be reddish "Missing UV Layer" or so

And all errors and info are shown in viewer application, it can be found in our SDK.

P.S.
In one of our future releases we're planning to avoid this thing: if no UV are chosen, the engine will just load first UV. As for now, it must be chosen manually
23 October 2014 11:30
Oops! This reminds me of how scared I felt the first time I tried Blender - boxes to fill with data everywhere. So easy to miss one! It also never helps that Blender has a knack for making scene elements LOOK complete even when they aren't.

Thanks!

Any and all for-dummies automation will be endlessly appreciated!
23 October 2014 11:49
One other lesson - always be sure that you're viewing your actual working file. I kept uploading a backup and never saw the changes I made that actually worked hours ago!
23 October 2014 12:13
You're welcome

Oh, yeah, it happens And, btw, sometimes you need to clean browser cash to see the changes you've made
23 October 2014 13:00
Oh, and you can use alpha in non-node material. Well, I recommend nodes, but anyway, B4W can deal with transparent stack material In texture tab in influence turn color and alpha on and in material tab (in Blender Game mode) find Transparency parameter. Turn it on and reduce Alpha gauge to 0. That must work
24 October 2014 02:20
Seems like 80 or 90% of my problems come down to missing a setting, often a 'hidden' one. For example, am I right that vertex animation won't export if I fail to set the object physics type? If so, I think this was missing from the reference pdf.

I guess you recommend node mats as being 'friendlier' to Blend4Web? In any case I get the sense they are more powerful
and flexible, and that I would do well to get comfortable with them.
24 October 2014 11:00
No, right now exported Vertex anim on freshly added plane, everything works fine. There can be some things:
-If you used shape keys, it won't export, right now shape keys are working only by using workarounds, for example, using addon New Tek MDD format and modifier Mesh Cache Here is the workflow of this process.

If you're not using this, then see if you:
-Baked VA in our VA baker
-In Object Export options (tab Blend4Web) turned "Export vertex animation" and "Animation: Use default" and "Cyclic" on.

That must work!


I guess you recommend node mats as being 'friendlier' to Blend4Web?

No, I recommend it as Blender user What is better to B4W can say our programmers (they say it's whatever, actually options of stack materials are just not fully supported)
Nodes just give you WAY more options to work with I started to use nodes here, at work, about 5-6 month ago, and became so addicted already A tortoise was my first project where I used nodes.

In free time I'm working on tutorial focused on node materials :) Dunno, when I will finish, but it won't take long.
 
Please register or log in to leave a reply.