”scene_blend add” in .material not detected

Hey there,



I’m working from this code, which works fine with sample assets. However my exported Blender models are black in Monkey when I use them instead. The source of the problem seems to be a shiny black “pass” in the material file:



[java]pass

{

ambient 0.0 0.0 0.0

diffuse 0.0 0.0 0.0

specular 0.500000 0.500000 0.500000 1.000000 12.500000

scene_blend add

}[/java]



Logically this should simply add shininess rather than resetting everything to black. However when I change the ambient and diffuse colours of this pass to a higher value the texture becomes visible in Monkey. I’m trying to figure out what I need to do in Blender to export models without this problematic pass causing trouble!



Here’s the whole material file:



[java]material Material/TEXFACE/Big_Bugger.png

{

receive_shadows on

technique

{

pass

{

ambient 0.500000 0.500000 0.500000 1.000000

diffuse 0.800000 0.800000 0.800000 1.000000

emissive 0.000000 0.000000 0.000000 1.000000

texture_unit

{

texture Big_Bugger.png

colour_op modulate

}

}

pass

{

ambient 0.0 0.0 0.0

diffuse 0.0 0.0 0.0

specular 0.500000 0.500000 0.500000 1.000000 12.500000

scene_blend add

}

}

}

material Material/TEXFACE

{

receive_shadows on

technique

{

pass

{

ambient 0.500000 0.500000 0.500000 1.000000

diffuse 0.800000 0.800000 0.800000 1.000000

specular 0.500000 0.500000 0.500000 1.000000 12.500000

emissive 0.000000 0.000000 0.000000 1.000000

}

}

}[/java]



Any help would be greatly appreciated!

Bump.



I’m fairly certain the problem is indeed that JME ignores the “scene_blend add” token, as the following test shows:



[java] pass

{

ambient 1.0 0.0 0.0

diffuse 1.0 0.0 0.0

}

pass

{

ambient 0.0 1.0 1.0

diffuse 0.0 1.0 1.0

scene_blend add

}[/java]



Rather than adding the colour from the second pass to the first, the second pass overwrites the first pass and the result is a teal colour when it should be white.

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:external:blender

@normen said:
https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:external:blender

While a download a newer version of Blender that corresponds to the guide, would you mind being a bit more specific?

The imported data: meshes as well as diffuse, normal and specular maps. Everything else like material blending and whatnot… can not be supported. Unless you bake it.

1 Like

I wasn’t aware that I was adding anything fancy, but I’ll try to follow the guide configurations and see if that helps. For the moment I still need to figure out how to install the Ogre exporter in the new version of Blender which has no scripts window o_O



edit: I managed to install an Ogre exporter, but in file > export all the options are always greyed out, and all of them are .scene and not .xml formats. Activate sad monkey :frowning:

Modelling graphics engines are very different from 3d graphics engines. Blender can spend an hour rendering one frame - whereas ideally JME needs to get out 60 frames per second. As a result quite a few techniques, materials, shaders, etc which are appropriate for one are not for the other.

1 Like

I’m not too comfortable with Blender: mostly I’ve used Wings3D in the past which only really deals with static meshes so is altogether much simpler. I probably turned something on by accident :confused:



Okay: I got hold of the (old) version of the new Blender 2.6 Ogre mesh exporter from here: http://www.ogre3d.org/forums/viewtopic.php?f=8&t=61485



I installed it and activated it as indicated. However… words cannot describe my frustration so here is a screenshot: