Code Monkey home page Code Monkey logo

Comments (6)

ziriax avatar ziriax commented on May 27, 2024 1

Cool stuff!

Okay, you conviced me, a transparency channel will be added.

Unfortunately you will still need to set the technique to transparent for getting correct rendering though.

from maya2gltf.

ziriax avatar ziriax commented on May 27, 2024 1

Besides potential wrong depth sorting of faces in the viewport, not really.

from maya2gltf.

ziriax avatar ziriax commented on May 27, 2024

Currently the opacity map is the alpha channel of the base color, as the glTF spec dictates. Adding an opacity channel is certainly possible, but then it must be merged with the basecolor texture on export. Not a big deal, but it does bring additional complexity (like what codec to use, compression quality, chroma subsampling settings, ...). That being said, we already have code to merge occlusion, metallic and roughness into a single map, so most of the code for dealing with this is already there...

Is having a separate opacity map useful for you?

from maya2gltf.

mikebourbeauart avatar mikebourbeauart commented on May 27, 2024

I think it would be useful, and it seems to be a standard input (at least for transparent shaders). I'm not a shader pro though.

Here's what's going on with my file (i'm getting some other crazy results on publish, but that's another issue):

My baseColor doesn't seem to have an alpha or transparency. It's just blackness where I'm expecting transparency. I'm merging my Substance Painter output textures inside of Substance Designer. I'm then using the Substance plugin within Maya to load the designer shader. I get a graph like this:

image

Even though the files are pngs (i even opened up the file called 1077276536.png in photoshop to make sure it had transparency) everything comes in without transparency. I'm not sure how I would bake in an alpha map or get the transparency to register inside maya's shader network. So the only solution I know of would be to insert an opacity map into an alpha or opacity on the GLSL shader.

from maya2gltf.

mikebourbeauart avatar mikebourbeauart commented on May 27, 2024

Awesome, thanks! Are there any negatives to using the transparent technique?

from maya2gltf.

ziriax avatar ziriax commented on May 27, 2024

I did some experiments, but Maya seems to pass wrong alpha values. For example, in the attached PNG, Maya makes the pixels around the circle opaque, while the blue ones are transparent...

Any idea why this is? My guess is that Maya is un-multiplying the alpha from the colors, but when diving by zero alpha, the result become Infinite, and is clamped to 1...

blue_transparent_circle

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.