jMonkeyEngine / sdk

The jMonkeyEngine3 Software Development Kit based on Netbeans
BSD 3-Clause "New" or "Revised" License
314 stars 101 forks source link

Error on converting models #122

Closed Misat11 closed 7 years ago

Misat11 commented 7 years ago

Hi, I recently started working with JMonkeyEngine and I need help. When you try to convert the model into a blender j3o I get an error: WARNING [com.jme3.scene.plugins.blender.meshes.Face]: Errors occured during face triangulation: Unable to find two closest vertices while triangulating face in mesh: TemporalMesh [name=Woman_1:Female_generic, vertices.size()=10827]Please apply triangulation modifier in blender as a workaround and load again!. The face will be triangulated with the most direct algorithm, but the results might not be identical to blender.

After this message JMonkeyEngine SDK freeze.

I have a model generated by MakeHuman because with Blender I meet for the first time ever :) My model: https://www.dropbox.com/s/72fmdzbl1dqflh0/womanmodel.blend?dl=0

MakeHuman 1.1.1 Blender 2.78 (I'm not using Blender in sdk, because I'm not know this :smile:)

Running on jMonkeyEngine 3.1-stable

Do you know what I'm doing wrong ??

Sorry for my bad English, I'm from Czech

Ali-RS commented 7 years ago

As mentioned in the warning

WARNING [com.jme3.scene.plugins.blender.meshes.Face]: Errors occured during face triangulation: Unable to find two closest vertices while triangulating face in mesh: TemporalMesh [name=Woman_1:Female_generic, vertices.size()=10827]Please apply triangulation modifier in blender as a workaround and load again!. The face will be triangulated with the most direct algorithm, but the results might not be identical to blender.

You can use blender Triangulate Modifier to triangulate your mesh before export.

Misat11 commented 7 years ago

Thanks, but something not loaded properly. My model is transparent and some textures is broken.

Ali-RS commented 7 years ago

My model is transparent

Uncheck transparency in blender material tab

https://jmonkeyengine.github.io/wiki/jme3/external/blender-material-1.png

Please see wiki page, you can find more blender related tutorials at Animations and Scenes section.

Misat11 commented 7 years ago

After unchecked transparency no change

Ali-RS commented 7 years ago

hmm... Can you provide an screen-shot of your model in jme ?

Misat11 commented 7 years ago

yes, wait few minutes

Misat11 commented 7 years ago

Here is a model after import into sdk (the only thing that has changed here after importing is the kind of light)

snimek obrazovky porizeny 06 04 2017 15 12 09

Ali-RS commented 7 years ago

I tested your model and it is not transparent in my case... make sure to put alpha to 1 then uncheck the transparency for ALL materials.

Misat11 commented 7 years ago

oh, I've forgotten a few materials (but Eyebrow001 and Eyelashes04 do not look very nice)

MeFisto94 commented 7 years ago

So manually triangulating solved the problem for you and you could load it? Because I am usually getting those messages as warning rather than a critical error, however there is another issue where we also discovered a freeze of the SDK possibly related to that.

The Problem here is that the importer is part of the engine however the maintainer is inactive. There is, however, a clever way to import models more easily: Using XBUF. It is a Blender plugin which exports the model in a better format than .blend, would use blenders triangulation automatically and such things.

Since the SDK is able to read xbuf files you can just right click on them to create a j3o out of them. Just have a look at hub.jmonkeyengine.org and search for xbuf (or search for xbuf on github to find them project).

Misat11 commented 7 years ago

xbuf its working, but materials not imported