Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If 2 meshes use the same geometry and one is colored and the second is a texture, the second mesh is not shown #4751

Closed
jens-duttke opened this issue May 2, 2014 · 3 comments
Labels

Comments

@jens-duttke
Copy link
Contributor

I've defined a PlaneGeometry and use that with just a color for one mesh and with an texture on another mesh.
In that case, only the colored mesh is shown.

If I use textures for both meshes, both are shown, and if I use two geometries both meshes are also shown.

Here only one plane is shown:
http://duttke.de/threejs/bug.html

Here both planes are shown:
http://duttke.de/threejs/bugfree.html
I've changed only the commenting in line 59/60.

If you replace material1 by a copy of material2, it will also work.

It seems like the geometry-object stores some informations about the material as soon as the first mesh is created. But the material and the geometry shouldn't be affected by creating a mesh - they should be seperated by each other, and should be reusable, shoudn't they?

@mrdoob mrdoob added the Bug label May 2, 2014
@mrdoob
Copy link
Owner

mrdoob commented May 2, 2014

Known problem.

As a work around, create the one with a texture first.

@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 27, 2018

This problem is solved now.

https://jsfiddle.net/f2Lommf5/3894/

@Mugen87 Mugen87 closed this as completed Mar 27, 2018
@mrdoob
Copy link
Owner

mrdoob commented Mar 29, 2018

Haha. We've come a long way... 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants