I tried to use models in the following formats: .obj, .j3o, and also .blend.
I tried to apply the texture using “ColorMap” (gives error, as the model material is set to “Common/MatDefs/Light/Lighting.j3md”, but I also tried “Common/MatDefs/Misc/Unshaded.j3md” with no success), “DiffuseMap”, “m_DiffuseMap” (don’t really know what’s the difference).
And I know – by the way – what some of you are going to say - “Create a geometry instead of importing an object from a file. It’s faster.” Yes, I know it would be faster and simplier, but let’s be honest, creating models right in the code for more complex figures is a torment. So, it’s just putting problems off.
The current code which is responsible for setting up the object and applying a material and which I stuck with :
I really don’t know what causes it not to work. I don’t think the texture is invalid (isn’t it?). Maybe something wrong with the above code or with the model itself. But I am almost sure it is something very trivial that needs a few clicks of a mouse.
I’m not a lawyer and neither a pro game maker, but a beginner that just started playing around with jME, so all I know comes from tutorials (and a bit from documentation). Thus, please, don’t judge me…
Does the block have normal maps or bump maps in blender? Maybe it just needs tangents generated… though I’d expect the badness to look differently.
And by the way, while it’s a good test maybe to load the .blend file in code. Really the JME way is to convert it to a j3o file and load that. Normally the application won’t be able to load .blend files I think except in development mode.
@pspeed said:
Does the block have normal maps or bump maps in blender?
No, it doesn't.
@Edit: At least, I don't think so. Meself no pro in Blender. ;) Just kidding... I know I don't need to be a pro to know how to create normal or bump maps but I do not know. Really.
@pspeed said:
And by the way, while it's a good test maybe to load the .blend file in code. Really the JME way is to convert it to a j3o file and load that. Normally the application won't be able to load .blend files I think except in development mode.
Well, I've already tried converting it to j3o with jME SDK and loading it in the code but I get the same result.