Hi everyone,
Been getting into JMonkeyEngine3 for the last week - and it’s a lot of fun. Everything has been going extremely well and I’m really impressed with just how amazing and well-designed v3 is. I’ve come across a problem that I’m having difficulty working out, though…
I’m using Blender 2.63 to create a simple model, which I want to export into OgreXML format to load into JME. I’ve installed the latest OgreXML exporters, both using the JME SDK and the project at Google Code Archive - Long-term storage for Google Code Project Hosting.. By deselecting “separate materials” on the export screen, I can load the model successfully with unshaded materials that match the diffuse colours set in Blender.
However I can’t seem to load a textured material at all. When exporting I get materials defined like the following:
// blender material: Material.002
material Material.002
{
receive_shadows on
technique
{
pass Material.002
{
ambient 0.800000011920929 0.5183919072151184 0.6339618563652039 1.0
diffuse 0.6400000190734865 0.4147135319518078 0.5071694926495773 1.0
specular 0.5 0.5 0.5 1.0 12.5
emissive 0.0 0.0 0.0 1.0
alpha_to_coverage off
colour_write on
cull_hardware clockwise
depth_check on
depth_func less_equal
depth_write on
illumination_stage
light_clip_planes off
light_scissor off
lighting on
normalise_normals off
polygon_mode solid
scene_blend one zero
scene_blend_op add
shading gouraud
transparent_sorting on
texture_unit
{
texture Pond.jpg
tex_address_mode wrap
scale 1.0 1.0
colour_op modulate
}
}
}
}
This is the model that I am trying to render: (Rendered by Blender)
http://i.imgur.com/86MUL.jpg
And this is the result in my SimpleApp:
http://i.imgur.com/PRukN.jpg
Pond.jpg is also exported to the same directory as the material. I've also tried changing the path to a project-relative path, e.g. Textures/Terrain/Pond/pong.jpg.
I've tried registering the Blender asset loader and loading the .blend file that way; it didn't crash, but it didn't load anything into my scene, either. I also can't use the JME SDK to convert a .blend file (e.g. into a j3o/etc file) because it is throwing the "Unknown data type: uint64_t" error when trying to import/export a model.
Any ideas? I'm new to both JME3 and Blender so is there something simple that I'm missing?