niacdoial / blemd

BMD importer for blender (BDL format also partially supported)
GNU General Public License v3.0
32 stars 13 forks source link

Support for shaders #14

Closed antoyo closed 6 years ago

antoyo commented 6 years ago

Hi. I wonder if blemd supports importing shaders? I ask this question because when I export it to another format and try to use it in a 3D engine, the model is darker, like when you disable the shaders in bmdview2. Thanks.

Avatarus-one commented 6 years ago

You gotta recreate shaders in your engine. Blemd will barely help you with this even if it had some kind of support for them. The best way for now is to use "export shaders" option in bmdview2 and carefully read the files it creates. Most of them are simple and contain nothing but brightness adjustment.

antoyo commented 6 years ago

Thanks.

niacdoial commented 6 years ago

I have a couple comments on Avatarus's reply:

"""You gotta recreate shaders i your engine. Blemd will barely help you with this even if it had some kind of support for them."""

Actually, there is support for shaders: you just need to check a box (from the top of my head, it was "GLSL materials" or "complete materials") in the settings (bottom-left of the "import" screen by default) However, the shaders are recreated in the native blender nodes, which, as far as I know, cannot be exported in a multi-program file (such as FBX or DAE). This is why the option is off by default.

"""The best way for now is to use "export shaders" option in bmdview2 and carefully read the files it creates. Most of them are simple and contain nothing but brightness adjustment."""

This is 100% right (including "best way for now"), but if you don't have (or don't want to use) BMDview2, you can also recreate shaders from what can be seen in the node editor. (Although the generated node tree looks ugly because all the nodes are displayed on top of each other until you move them)

EDIT: Also, thanks for answering when I didn't, Avatarus!