Hey everyone. I had a forum running earlier, and my range of questions have shifted quite dramatically from my previous posts, and so here I go.
So I just made a blender model that I want to import into my game. It is already completely textured within blender itself. Do I HAVE to UV map the entire thing and then combine all of my textures into one texture and then add it that way, or is there a more simplistic way of doing things?
A couple things that I would like to learn more about:
Does the material file need to just be one texture, or can it be more than one?
I’m not getting the material file right now, which I know is because I haven’t UV mapped, but to UV map it looks like I have to get rid of my textures. What are the ways around this (if any)
Any other things you want to mention about the process would be greatly appreciated, because this is my first time importing a model into Jmonkey. Thank you all for your responses!
All of your textures have to be uv mapped.Otherwise ,jme3 wont load the textures
You can used several materials each material with its own uvmapped texture.Just make sure you give all the material and objects the same name ,so that you have a name.mesh object with a name,material file
Well, everything is UV mapped, even though I have multiple textures. But still, when I export I don’t get a material file :/. I think it’s because I JUST uv mapped a certain couple textures, and there is no material file within blender. I’m going to work on this issue; please post more advice while I work.
EDIT: Alright I got the material files. The thing is that there are multiple material files, which is to be expected, because there are multiple materials, but the problem is that I can’t name one of them the material because there are so many materials. I could only choose to import one. I guess I could just add them within the Jmonkey engine, but is there any way to just get them all in there right off the bat? I expect not.
<cite>@007-Winner said:</cite>
So I just made a blender model that I want to import into my game. It is already completely textured within blender itself. Do I HAVE to UV map the entire thing and then combine all of my textures into one texture
In jME one geometry can only have 1 material. In practice you must prepare your model to be game ready in Blender, either combine all blender materials into one texture and UV-map the model to that texture atlas OR break the model into separate models that each have just one material. Depends on how you plan on using the model in jME.
The renaming of materials is best when you uncheck seperate materials then you can have one material file which contains info about all materials. another way to escape the rename thing is to export a scene file from blender ,then import the scene file in jme3.
Well, I unchecked separate materials, and I did get a single material file, and then I imported it. But when I double clicked the mesh, it said that it couldn’t find the material file, even though they had the same name! So then I imported it manually, and then it did work, but nothing showed up in the SceneComposer after that! My character is there, but he is invisible! There aren’t any lamps! When I go to my .material file (the code for it within Jmonkey) it says at the top “material missing_material”. That might have something to do with it. But I don’t understand why it won’t work!
EDIT: I clicked the lightbulb above scene composer (duh) and my character showed up. But the texture is… strange. He has red and white spots everywhere. Not red as in, there is no material. He definitely looks like he has a material, just not the material that I want him to have.
I always think that it is best that you do the renaming in blender in the outliner ,i posted a link to a pdf tutorial about importing ogre models into jme3 ,look for it under import troubleshooter ,it should sort everything out