Custom 3d models (Very strange behaviour)

MarcoTronconeMarcoTroncone GBUniversity ✭✭✭

Hi,

I'm trying to learn UrhoSharp (hoping I'm not losing my time as the project doesn't seem very active).

Everything is going very well, after few days I can already do a lot of different things bnut I have a problem with custom models.

Every time I try to use a custom model, it will appear without materials/textures or not appear at all (I use Blender + the urho importer for blender)

Usually I download a free model from a site and then I import it with blender (I have checked the option to export & materials/textures) but until now no luck.

Yesterday I've tried to import a very basic model made with paint3d (no texturtes, only a color) and strangely it worked.

But then I tried to import a flower (available for free in Paint3d), and the result was crazy:

If I set the model without the material, I can see the model, of course without texture;

If I set the model with the material, I can see nothing.

If I use a standard model (cube, spere, etc) and apply the texture, I can see it.

So basically it seems that the combination custom model+ texture doesn't work.

What I'm doing wrong?

Thank you very much

Posts

  • EsaKEsaK SEMember ✭✭

    When you export from Blender, have you checked the UV-coordinates (I think it's unchecked as default)?

  • MarcoTronconeMarcoTroncone GBUniversity ✭✭✭

    @EsaK said:
    When you export from Blender, have you checked the UV-coordinates (I think it's unchecked as default)?

    You are right...I was sure I did (during my hundreds of tests) anyway now seems to work (with the object imported from Paint3d).

    Thank you very much.

    I've also tested it with a model I've downloaded, with no textures but 2 colors (green for the leaves and brown for the log). I tried to import it again like you said but I can see only the model without any colors.

    Any idea why? (in blender I can see the colours)

    Thanks

  • EsaKEsaK SEMember ✭✭

    The only thing I can think of is that you must use the right type of technique (set in material).
    You could try something like this:
    var material = new Material();
    material.SetTechnique(0, CoreAssets.Techniques.NoTextureUnlitVCol, 1, 1);
    model.SetMaterial(material);

    If that doesn't help you could try posting a question at the Urho3D forums. They are quite friendly over there with a lot of knowledge.

  • MarcoTronconeMarcoTroncone GBUniversity ✭✭✭
    edited December 2017

    I've tried what you suggest but also like this, if I attach the new "material", the object disappears, if I remove the material, I can see the object.
    It's a pity beacuse the Engine it's really easy to use, in few hours of work starting from 0 I was able to do a small game but the object import it's a mess and the tools are not very good.

    Thank you very much for your help

    I'll try to ask on the Urho3d forum

  • KriZoltnKriZoltn USMember

    Did you try to use the "Blender render" instead of cycles render in Blender? I had similar issues, but when using the blender render engine, and then exporting to Urho with the exporter, everything started to work. With cycles render, even the most simple box will not be imported correctly into Urho.
    You have to see the textures in blender render mode in the preview in blender. If you have imported models, you might have to change/re-apply textures, uv maps etc. At least for me that worked.

  • OmidMafakherOmidMafakher USMember ✭✭

    I have lot of complex models and I import them using AssetImporter. It's the best solution for import asset.
    https://urho3d.github.io/documentation/1.7/_tools.html

    Don't forget to rotate everything with "90 0 -90" because Urho using Y up and Z depth and Blender is the other way around

  • MarcoTronconeMarcoTroncone GBUniversity ✭✭✭

    I tried to import another model with texture made by a friend. I can see the model and the textures but there is something odd.
    The model is incredibly dark, my friend suggested that the texture is applied on the wrong side. is that be possible?
    I can see correctly the textured model in Blender.

    So strange

  • OmidMafakherOmidMafakher USMember ✭✭
    edited March 2018

    @MarcoTroncone said:
    I tried to import another model with texture made by a friend. I can see the model and the textures but there is something odd.
    The model is incredibly dark, my friend suggested that the texture is applied on the wrong side. is that be possible?
    I can see correctly the textured model in Blender.

    So strange

    same for me before using AssetImporter.exe. the problem is UV and Normal are inverted. if you have complicated model you must use asset importer. i tried all the ways and this is the only solution. Blender Urho addon is not working well

    AssetImporter.exe scene MyScene.blend output\MyScene.xml -ne

Sign In or Register to comment.