Giter Club home page Giter Club logo

Comments (9)

ziriax avatar ziriax commented on June 1, 2024 1

Then the easiest would be to add a "double-sided" attribute to my PBR material itself. I could even connect this attribute to the Maya shape's backface culling so that it renders correct in Maya. The limitation being that if you manually reuse the same PBR material on other Maya shapes, that the backface culling of this other shapes will not be correct unless the link is restored. But that is a corner case

I will do it like this, that is very easy to do.

from maya2gltf.

ziriax avatar ziriax commented on June 1, 2024

That is indeed not yet implemented, but should be very trivial to implement, I'll see what I can do

from maya2gltf.

Chase-Reid avatar Chase-Reid commented on June 1, 2024

Thanks Ziriax! Youre the best :)

from maya2gltf.

ziriax avatar ziriax commented on June 1, 2024

@Chase-Reid It is a tad harder than I anticipated.

In glTF, the doublesided property is on the PBR material.

But in Maya, double-sided is achieved by setting backface culling in the shape's attribute editor Mesh Component Display (and it seems that double-sided is the default, since backface culling is off by default)

Since a Maya PBR shader can be shared amount multiple objects, but each object could have a different backface culling setting, I would need to generate different PBR materials for the same Maya PBR shader.

Doable, but a bit harder.

Out of curiosity, how would you make a double-sided / single-sided object in Maya?

PS: I'm on vacation for two weeks, so don't expect this to be added very soon 😉

from maya2gltf.

Chase-Reid avatar Chase-Reid commented on June 1, 2024

Hmm thats a tough question. To replicate double-sided behavior in Maya I would just toggle off backface culling in the Viewport.

Im a 3D artist working with game engines so Ive relied on external editors to provide this functionality outside of Maya (Unreal, Unity, etc). These external editors often provide this functionality within their material properties.

Ill look into it though to see if I can give you a better answer on this. 😄

from maya2gltf.

artistneel avatar artistneel commented on June 1, 2024

is there any solution?

from maya2gltf.

ziriax avatar ziriax commented on June 1, 2024

I will try to make a new release this week to address this issue

from maya2gltf.

ziriax avatar ziriax commented on June 1, 2024

I added a flag to the "PBR Advanced" group in the shader, and perform back-full culling in the shader. I currently ignore the Maya component display mesh backface culling attribute (might be confusing, but ignoring the "double sided" flag in the PBR material would be even stranger IMHO).

Release coming up tomorrow.

from maya2gltf.

ziriax avatar ziriax commented on June 1, 2024

This should be fixed by V0.9.8-alpha (224bdca)

from maya2gltf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.