Converter does not convert .blend to .j3o

Hey everyone! (Especially @Kaelthas :stuck_out_tongue: )

I just ran across a .blend file the converter refuses to convert.
The previous versions of this file - and every other file - is converted fine, but not this one.

If you wanna have a look at it, I uploaded the model here.

Any suggestions welcome!

HELLO!

The amount of loose parts looked a bit crazy, I’m unsure if that’s what you are going for, but I assumed this is a completed model, so I joined all the parts to a central mesh figure, and that imported fine. Of course the face culling directions looked a bit crazy, but that gets past the import issue.

It still fails for me when I import the raw file with all loose parts.

I haven’t tried exporting it as the other formats(I think .dae, maybe obj), but that should work too since there aren’t any animations.

If these solutions aren’t relevant, then do carry on.

1 Like

@cardboardman

Thanks, I did not think of that!
Well… looks like joining the mesh might be a possibility.

We thought it’d be cool to “build” the house ingame by adding more and more objects.
I’ll have to think about it…

But even if this “solves” the issue for me, it still is an unfixed bug.

Oh, If this is a core ingame feature for you, then I can see it being quite inconvenient.

I think it may be less stressful on a system to use a single transparent material applied to each part that changes to the correct visible material when it gets “built”. Of course, I know nothing about your game system, and it probably won’t work if it’s a free build world.

In regards to the bug, this is the error I get, probably same as yours:

Asset path is outside assetmanager root

1 Like

As for the building:
It’s not that great of an issue. We just thought it to be a cool “building animation” (even tough it’s not really an animation). We’ll come up with something else if need be. But your solution should work as well.

As for the error message:
Ah, I now that one :smiley:
I might’ve uploaded version 1 of the model by mistake. There are some texture paths pointing to some directories that don’t even exist.
I resolved the corrupt texture paths in version 2, but it didn’t make a difference.
Yes, no error message of course, but no conversion as well.

1 Like

Hey @m41q

I have downloaded your model and loaded it without problems.
If there are issues with texture paths you can always embed the texture inside the blend file.

Does the jme SDK prints out any exceptions when you try to load the model ?

1 Like

Hey @Kaelthas

No exceptions and no application output. Just as if I didn’t click convert at all.
When I try to view the model instead, there comes an error: “Error opening building_woodcutters-house_6x4.blend”
Nothing else.

Really strange, especially because it worked with previous versions and works when combining the objects.
If it matters: I’m running Windows 8 and have a GTX 660M.

Right now, the problem exists for cardboardman, my friend and myself.

ps: I don’t think that the texture paths are important here. I set all paths to the right locations and it didn’t work as well.

@m41q could you post the whole exception with stacktrace if you have it ?
It would be much easier to figure out what is wrong :slight_smile:

@Kaelthas Thats the difficult part. There is no exception.
I looked again if I overlooked something and the only thing I noticed is this in the application output (when trying to view the model or convert it to .j3o):
[java]
Loading animations that will be later applied to scene features.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
Loading model’s textures.
[/java]

If there is some kind of “debug mode” or logging I can turn on, let me now xD
Thanks for your efforts, by the way :slight_smile:

@m41q you could set the log level to FINEST and then see what is going on.

Are you using the jme SDK or your own application ?

@Kaelthas
I’m using the jme SDK, downloaded from the website, latest update (nightly).
Is there some option to set the log level of the SDK?

Or do you want me to convert the model “ingame”?
I’ll try that once I can get to it.

@Kaelthas:
Dude. wtf

I cannot convert or view it in my project “Clans_Client” at all… Errors (or no errors) like I described them.
HOWEVER: When I go to a different project, called “BasicGame” it all works flawless! (ok, AssetKey problem, but they don’t matter)

I have a feeling there is a well hidden Higgs-Bugson somewhere…

I don’t know what else significant separates the projects. What could cause something like that?
@cardboardman have you created a new project to test the conversion or an old one?

Oh I have a single messy file on my main project that I jam random things in to test.

I loaded it up only in the scene explorer however.

Well maybee you do chaonge one of the constant somewhere? Like vector3f.Unit_Y, guess this could really break the importer.

@Empire Phoenix said: Well maybee you do chaonge one of the constant somewhere? Like vector3f.Unit_Y, guess this could really break the importer.

It don’t really understand what you are trying to say…
Do you mean I may be changing it somewhere in my code?
I do not run my game at all. I am just trying to view or convert the model in the SDK.

@m41q

OK, I managed to reproduce the issue.
The workaround is to remove the hemi light or replace it with one that is supported (point light for example).

The problem is - I have no idea why does that happen.
When the hemi light is on the scene the warning is logged that it is not supported. The result is returned as an empty node (to keep any parent-child relationships valid).
So nothing wrong happens, but the resulting scene looks like some objects are missing.

When the point light is used instead of hemi light - all looks fine.

The amount of loaded objects in both cases is the same so nothing is missing.
I will try to investigate what is going on.

1 Like

@Kaelthas
=D
It really was the hemi light? My artist told me I should remove it, but I brushed it of: “Ah, don’t worry, it’ll give a warning and work anyways.”

Thats strange indeed.
And thanks by the way, keep up the good work!
The BlenderImporter really is one of the most useful contributions in jME in my opinion.

@m41q

OK I think I know what is going on.
Some of the objects had shadeless material while others had the Lighting material definition. This means that when there is no light source - they won’t be rendered by jme.

So the only solution here is to use some light source. Since jme does not support neither hemi nor sun light sources then those objects won’t be rendered :slight_smile:

@Kaelthas

well… I was aware that object might not be rendered when there is no light source.
But does this also solve the conversion issue?
If so: great - you could just remove the light when converting, couldn’t you?