-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
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
ColladaLoader doesn't set doubleSided #2280
Comments
We have Common trouble with With Downside would be a bit more GL state setting for multimaterial objects, though this is unlikely to have a big effect on performance (we change GL state only when needed). |
Oh, I guess I had it backwards then - I thought doubleSided was a property of MeshBasicMaterial, etc. In that case, if it's found in |
Currently it's in |
Yeah, sorry, I meant geometry in collada terms. Anyway, I will submit a patch for this if I get some free time. |
Yeah, I've been thinking about that too. We should move it to material.
That'd be great! |
Ok, I'll try to do WebGL part. |
Ok, WebGL part done: I realized picking may be now tricker though, it would need to be aware of materials :S BTW I also started this wiki page about diffs between lib versions relevant for migration, something we already spoke about: https://github.com/mrdoob/three.js/wiki/Migration The idea is that we just put a note there when we do some API breaking changes, at the moment we do the breakage. |
Ah... true. Oh well...
Great! I'll be filling it up too. |
Cool, also done changing it on Projector. 0360459 |
Instead of patching ColladaLoader to work with the current Object3D-based doubleSided, should I just wait and make the patch off the new Material-based doubleSided? |
Uhm, we have just changed it. They now sit in the material. |
…tra>, applying it to the Material. This is half of Issue mrdoob#2280.
The above commit (3fd4f8e) adds doubleSided to the material if found. I'm not sure the best way to support double_sided on |
Not really, as sidedness is now a material property, if two different objects share the same material but have different sidedness, they'll need to have two different materials (though even before internally there would have been two shader programs thanks to double sided lighting). |
Now that clone on Material objects works, I took a stab at supporting the double_sided flag inside of |
Many exporters put a double-sided flag in an effect's
<extra>
area to indicate that back faces should be rendered. As an example from Google SketchUp:It should be checked for
.//extra//double_sided
in an effect because different exporters put it under different techniques, but it's always called "double_sided".It can also be put on a geometry, not on a material. I'm not sure if three.js supports setting doubleSided on a geometry instead of a material? Anyway, here's an example of that:
If there's no way to set it on a geometry, a workaround could be to make a copy of the material and set the doubleSided flag for geometries that specify it.
The text was updated successfully, but these errors were encountered: