Blender to jME

Could you please send me the .blend and .xml files so I can see if it's a bug in the blender exporter, and if so, fix it?

DanK, thank you for sending me the files. I have been able to work around the problem, it only appeared when exporting vertex colors, a functionality I hadn't tested enough. The wokaround now assumes every shared vertex to have exactly one vertex color, otherwise it will look weird.

That might be a problem for people who need per-face- vertex colors, e.g. to pre-generate vertex color lighting in blender with sharp edges, but I never heard of anyone doing such a thing, so I guess I can leave it at that for now.

Once I have a little more time at my hands, I'll properly fix that problem and remove this hacky workaround. For now, the exporter should work just as you expect it to. Download it from it's well-known home at http://wwwhomes.uni-bielefeld.de/krabien/jmestuff/jmeXMLExport.py.

That's cool, I was just foolin with that paint feature in blender (I think it's new) to get my models a little color.



I am trying to export a gus with the textures from the gus tutorial, is there a trick to this? It exports fine but the stucci and grain stuff doesn't seem to be referenced in the files at all, do I just need to make those kinds of textures on my own and apply them or is it just not available yet?

That's cool, I was just foolin with that paint feature in blender (I think it's new)



er...no.

or define "new"

;)

but it can be vertex paint, texture paint, or procedural textures.

only texture paint gets into textures exported...cant explain fully now, maybe tomorrow :)

pd: there's also vertex weight paint.


hey, not bad.



you must go to "texture paint mode"(brush icon).There where it says usually "object mode" that rolling menu…in theline bellow your 3d window…



now, at the "editing"  buttons, (F9) , a tab called "paint" .there, you can set opacity -very low recommended, for do strokes with polishing ones, as if not, is pixelated-  u can set the color with sliders there, but also , use the non painting mouse button to pick a color from the same texture…at 3d window…I recomend tho to use a 1024 size or so…even 2 tmes bigger than the final output u wont, you'll reduce theimage in some 2d package…is better to 3d paint this way…



That I guess gets exported as texture.

(for some exporter u may need to select the actual painted image in the Uv editor window, to take changes over painted texture…some exporters only care on image in Uv window…)








The mesh's are right now, but I suddenly don't see any of the colors on the objects. The color data is in the xml files, but it looks all gray now (the default blender material I guess). I don't have a pre-this export copy of the xml file to compare against, I'm guessing maybe before the material wasn't in the file or something else musta changed.

What happens if you remove the material from the xml file? To clarify: open the very same xml file in a text editor, and delete the line with the materialstate in it. What is the result when you import it into jME?

No change, still shows up gray. Do you still have the models I sent? I can send you a SimpleGame that loads the models for a test for you if you want.

I still have the models, but I don't think you'll have to send your game class - probably you have a lightstate enabled in your scene, which prevents the vertex colors of your model to show up. Try disabling the lightstate, and  you will probably see the vertex colors again.

I think jME uses vertex colors for lighting, so whenever you enable a lightstate affecting your scene, the vertex colors disappear in favor of lighting, and vice versa. There are ways around this, of course. You could do per pixel lighting using fragment shaders, but it is by far less complicated to dump vertex colors and use texture maps (images) instead.

Err, ya caught me, and I should have known better as I've worked with opengl before… I used setLightCombineMode (LightState.OFF) on the node that had those in it and now they show up just like they are supposed to.



When I added my gus model to the scene (he has several materials set) he didn't show any colors, I realized it was a lack of light that caused it and then somehow overlooked the sudden lack of color in my other models that didn't use materials after adding the light…

I moved the discussion to my question here: http://www.jmonkeyengine.com/jmeforum/index.php?topic=3762.0