Jump to content

applying texture problem - how to be?


sociofob
 Share

Recommended Posts

3 hours ago, Deltakosh said:

Hello and welcome :)

Can you try to set invertY =  false when creating your texture? 

But perhaps I should ask first: How do you create the scene? Is it loaded from Blender or 3dsmax export?

Thank you for reply, Deltakosh

I added a line to my code, liek this:

var materialRoulette = new BABYLON.StandardMaterial("textureRoulette", scene);
materialRoulette.invertY=false;
materialRoulette.diffuseTexture = new BABYLON.Texture("Textures/reversedRoulette.jpg", scene);

Unfortunately, it didn't help.

I use the 3d object from blender.

1)I'm loading the object

var loader = new BABYLON.AssetsManager(scene);
tree = loader.addMeshTask("roulette", "", "", "roulette1.obj");

2)Then I'm adding each mesh to the array

t.loadedMeshes.forEach(function(m) {
			treeMeshArr.push(m);
        });

3)Attaching texture to meshes:

treeMeshArr[0].material=materialBlack;
treeMeshArr[1].material=materialRoulette
treeMeshArr[2].material=materialWheel;

 

Link to comment
Share on other sites

1 hour ago, Deltakosh said:

Ok:)

I thought every number was a different object :D

Can you try to manually flip your texture on X-axis? (using a paint tool)

Yep, It might help, but it's pretty different to flip round texture.

By the way, I found the solution! It is about inverting 3d model in blender on Y axis.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...