Hello all.
I’ve been struggling the past week or so in getting an exported Blender scene/model to import correctly into JMonkey. I have not been able to rule out which environment is presenting the biggest problem. I’ve tried many variations in both programs to varying degrees of success.
I am attempting to import a house model with a couple collections of meshes (wall, roof, fireplace, etc…). I have primarily just been trying to get the wall material and texture to import and be shown in JMonkey (after which I’d work on the rest).
Here are the things I have tried in Blender:
- Alpha channel wood texture with blended diffuse shaders (with color) to get the color and effect
- Regular jpg texture mapped directly to the mesh
- Mark seam/unwrap
- Camera vector prior to unwrapping
Here are the things I have tried in JMonkey:
- Generating the j30 both from the ogre export and from the .blend file directly
- Putting the .blend in the textures directory and moving the j3o to the models directory
- Placing the used texture in every path conceivable that I have com across (same dir as .blend, Textures etc…)
- Creating j3m file with color map to texture, separate texture coordinates checked, color defined as well (when alpha channel texture didnt work)
- Assigning unshaed, lighted and custom material to imported model
Now it’s obvious that either I have done any or all of these things incorrectly or have not done something crucial for this to work.
Here is my house model setup in Blender
Blender
Here is my JMonkey code for model loading
Code
Finally here is the result of the model import (with the custom material applied)
Game
It’s strange because when inside the house certain triangles get a warped texture applied but generally it’s just brown (probably because the color was set to brown in the custom shader).
If anyone can point me in the right direction I’d appreciate it. I’ve been searching and scouring for videos or articles of how to do this but generally they seem to not be helpful or I am doing them wrong. At this point, since I’m not sure where the problem is (though I did get a simple cube model to import using the same material just fine) I’m not sure what I should be focusing on.