UV deformed in BJS while ok in Blender

Hello folks,

So here I am working on yet another game. This time it is bigger so I have to do some UV mapping and stuff. Anyway, I designed a simple barrel in blender, and textured it, when I import it into BJS the UV’s are not quite right. I have tried with both blender 2.8 and prior. Also, both with newest BJS and prior. I have tried to increase the Max decimal precision for UV’s from the default 3 to 5, still no luck. I am attaching a couple of screenshots of blender and of the BJS result. Interesting enough, I have never had a problem like this and I have imported tens of models in BJS without any problem. Maybe it’s something I am doing but I think I checked everything.

Thanks in advance!

barrel1 barrel2 barrel3

pinging our Blender god @JCPalmer

1 Like

@Null : Hmm. Want to post a .blend file so I can take a look?

Here is a low poly barrel that I made a long time ago displayed in the sandbox - see image below.

No dreadful distortions like in your images that you posted

cheers, gryff :slight_smile:


Hey @gryff,

Thanks for the reply, I could not seem to be able to share it here, it allows only images, but I just realized it allows zips as well. barrel.zip (630.1 KB) . Maybe it happens because of how I have unwrapped the model.

Something which might be a useful information, exporting it as an OBJ works great. However, as I will export the whole scene from blender OBJ is not an option.

@Null : TY for the file. I took a look at it and the texture does seem a little odd. See Image below.

So I did a swift creation of a barrel with my texture and my unwrapping. This zip file contains .blend file. in which I packed the texture. So try exporting from that file to .babylon. It worked fine for me.

a_barrel.zip (280.1 KB)

I don’t know why it would work with a .obj format. Don’t use that format.

As for the texture you are using, the steel bands wander all over the place. Did you make the image somehow from the unwrapping?
Feel free to use my .blend file.

cheers, gryff :slight_smile:

Thanks for having a look @gryff . I have made the texture in blenders texture editor. I am aware the unwrapping is not perfect, from what I noticed, the obj exported file has 6 decimal digits while babylon exporter allows up to 5. I think with meshes unwrapped such a way this causes a problem but I am not entirely sure whether this is the case or not.

Oddly enough, I have exported many models which I have unwrapped and I have never encountered this issue. Maybe I have done a more careful unwrapping :smiley: . I think this can be used as a use case to improve the blender exporter nevertheless :slight_smile:. Thank you for your time .


Lol this barrel is wild, this why ive avoided texture wrapping since the 90s

1 Like

True! It still should work though :smiley: . I mean it is not perfect but it works for what I need it, it is definitely not read correctly babylon side.