.material to .j3m

You have to do all of the things nemesismate is saying or you will have a bad time.

Blender includes a shedload of stuff that has nothing to do with game development. Sometimes finding the narrow slices of things that will work with a game engine like JME is tough. (One of the reasons xbuff is so nice as it has a live view.)

In Blender it works perfectly. The tutorial said to do it like this, with nodes:


The problem is it doesn’t work in jme :frowning:

Do that. Select “Blender render” in the top tool panel in Blender. Then, you’ll see that the texture view is different. Just as the image I uploaded.

Edit: here:
http://i.imgur.com/QgUQpvU.png

I did though… I think. Let me get this straight right… Let’s recap:

  1. Make the model
  2. UV Map it
  3. Colour the UV Map
  4. Apply UV Map to the model in blender
  5. Save and use the .blend file in jme
  6. Generate material.
    At step 6 I have the model, it’s white, no texture. I generate the j3md, I apply the UVMap I used in blender in the material’s property DiffuseMap. What I don’t get it, if I have to do this to theoretically make it work, why colour the model in blender in the first place? I guess that’s a redundant step I made, or…? Thanks for all your feedback :slight_smile:

I tried it as you said and saved that .blend. I tried it and it was still white, generated material, applied diffusemap to the material and it still only reads 1 colour. :frowning:

That is because you set the UV wrap. So, you have set the texture coordinates in a way that jme understand. Now you have:

  1. Make the model
  2. UV Map it
  3. Colour the UV Map
  4. Apply UV Map to the model in blender
  5. Save and use the .blend file in jme
  6. Generate material.

But, if you want after the step 5 have the texture applied you have to:

  1. Make the model
  2. UV Map it
  3. Colour the UV Map
  4. Apply UV Map to the model in blender
    4.2) Apply the texture in a way that jme is able to understand, so, we go back here.
  5. Save and use the .blend file in jme
  6. Generate material.

And you did the “texture set” thing I comment you here??

I am currently going to the hospital but I will try again once I get back. Unless there is an “apply modifications” or whatever button then I’m pretty sure I did it right. Assuming it proprerly read the text coords, would I have to apply anything to the material or does it automatically get the uv map colours?

Nope. Even in Blender the texture won’t show… sigh

Well… I’m not a Blender expert xD, it is someone else who makes the visual stuff in my team but… did you try to load it now on jme3?, when I tried it also looked like that (no good in blender, good in jme3).

I think that it has something to do with your blender TextureNodes and the way you use them in “Cycles render”.

Try to load it in jme3 and if it works (I think so), just find the way in blender to see it fine when using “Blender render”.

Nope. It just makes it a tad lighter, so really no difference. This is starting to get annoying now. It can’t be possible that it’s taking me over a day to make 1 single texture work…

xD well… it happens sometimes if you are learning two things at the same time. What annoys me more is that you have done the same I did and it didn’t work, could you upload the blend just as you have it right now so I could check it out?

1 Like

https://ufile.io/3dafa

Here you go. Thank you so much by the way, I’m extremely grateful :slight_smile:

Ok, the texture coords are fine in that model. If you:

  1. load the model
  2. open the geometry properties in the scene explorer
  3. select “create material” and submit, a material .j3m is generated.
  4. set your uv-map as diffusemap

With that works.

If you want to have the texturemap imported at the same time so when you make step 3. it also generates the texture (uvmap) you can try to disable the blender texture nodes (so you see it right in “Blender render” too):

A rule of thumb when trying to import from blender should be: first make it work on “Blender render”, then try to import it :wink:

I made a simple pine tree working in blender and jme, take a look :smiley:

Already tried that a few hours ago, just tried it again, no avail. Result is the same: it only renders in 1 colour:

I tried disabling the texture nodes, but this is the result:

Forgot to say that you need to add a light :chimpanzee_facepalm:

Well silly me, should’ve seen that happen as well. Should I try it with or without blender light? I’ll try it without first.

Tried importing both with or without light, both with and without material, both with and without diffusemap set to the UV map. Nothing :frowning:

Then… I suggest you to try the model @Xelun made for you. You can try this one too:

Both of them are working “as is”. Just import them. If it doesn’t work for you it must be a version thing. Which sdk version are you using?