Code Monkey home page Code Monkey logo

maya2gltf's Introduction

Maya to glTF exporter

Poll

If you believe this plugin is good enough to request Github Sponsoring, please say so here

News

Maya Tiger screenshot

Maya Helmet screenshot

Installation

  • Supports Maya 2017-2020, Windows 10 x64, macOS High Sierra+ and Linux

  • Windows 10 x64

    • install the Microsoft Visual C++ redistributables.
      • on many systems this is already installed, so you might want to skip this step.
    • download the desired release
    • extract the downloaded zip file to any location (e.g. your desktop)
    • open the created maya2glTF folder
    • double click on the deploy batch file
      • This will copy the plug-in and scripts to your Documents folder
    • re-launch Maya
  • macOS High Sierra and Linux

    • must currently be build from source, see below

Usage

  • load a scene
  • in the Maya script window, type maya2glTF_UI to launch the UI.
    • You might want to select the maya2glTF_UI script text and drag it using the middle-mouse-button to the Custom shelf, or even better, make a glTF shelf...
  • select the meshes and cameras you want export
    • or click the select all polygon meshes button
  • select the desired animation clips source using the dropdown box
    • TRAX animation clips are also supported.
      • only enabled clips on the first track are exported.
      • if you have multiple characters, select the desired one.
  • hit the export selected meshes button.
    • currently the user interface is not automatically updated when you change or load a scene; just re-run the maya2glTF_UI script or hit the refresh user interface button.
  • good luck! ;-)

Contributions

  • let me know if this doesn't work for you
    • ideally make an issue, providing the OS, Maya and plug-in version, and a test-scene.
  • if it does work, please give maya2glTF a ⭐ on GitHUB, and spread the word 😎

Shading

  • I assume you already used something like Substance Painter to create glTF-PBR textures
  • Make sure you have selected OpenGL for rendering, DirectX is not supported yet image
  • select the polygons you want to shade
  • click the assign PBR shader to selection button
  • the first time, you need to select our PBR OpenGL shader at:
    • Documents\maya\maya2glTF\PBR\shaders\glTF_PBR.ogsfx
  • next, select all the PBR textures you want to apply in one go:
    • for example, for the damaged helmet model, multi-select the following textures:
      • Default_normal.jpg
      • Default_albedo.jpg
      • Default_AO.jpg
      • Default_emissive.jpg
      • Default_metalRoughness.jpg
  • now the PBR shader and all textures should be applied to your selection
  • by default we use the following keyword-in-filename convention to detect the kind of texture:
    • basecolor or albedo => base color texture
    • metal or _orm => metallic texture
    • rough or _orm => roughness texture
    • occl or _orm or _ao => occlusion texture
    • normal => tangent space normal texture
      • see also the -mts flag for MikkTSpace information if your models come from Blender
    • emissive => emissive texture
    • diffuse_env => Image-based-lighting (IBL) prefiltered diffuse environment map (PMREM)
    • specular_env => Image-based-lightning (IBL) prefiltered specular environment map (PMREM)
    • brdf => Bidirectional reflectance distribution function lookup table texture
    • you can customize these conventions, see maya2glTF_assignPbrShader.mel
  • all textures are optional
  • set the technique to transparent if desired
  • see the glTF PBR page page for more info.
  • the metallic and roughness textures are always merged into a single texture when exporting.
    • If you provide JPEGs, we use Maya's JPEG encoder to generate this texture. However, the default Maya JPEG encoding settings are very low quality.
      • The following MEL snippet sets the JPEG encoder quality:
        putenv "AW_JPEG_Q_FACTOR" "92";
        
      • The following MEL code enables maximum possible JPEG quality:
        putenv "AW_JPEG_Q_FACTOR" "100";
        putenv "AW_JPEG_SUB_SAMPLING" "1x1,1x1,1x1";
        

Rationale

At IIM, we are specialized in creating realtime interactive 3D animation, for web, education, events and broadcast television, since 1992. We have developed our own multi-machine real-time 3D puppeteering software called AnimationNow, and we are about to upgrade this to make use of up-to-date rendering techniques.

If something goes wrong in our production pipeline, it usually is exporting our complex rigged Maya characters. In the past, we contributed both donations and patches to the open source OGRE exporter, but now we want to dig deep into the Maya API ourselves, so we can help out our artists if something goes wrong during the export.

glTF 2.0 seems to contain most of the features we need, and is extensible. IMHO glTF must become the defacto standard for animated 3D content. At IIM, we plan to use glTF for all our 3D assets.

Limitations

Maya interally uses a dataflow architecture (called the dependency graph). This means that power-users can connect the dependency nodes in the graph in any way they like. Unfortunately this awesome flexibility also makes it insanely difficult to develop an exporter that always works ;-)

Plugin Command Arguments

_ -outputFolder (-of) STRING _(required)* * the output folder

  • -scaleFactor (-sf) FLOAT (optional)

    • scale factor to apply to the vertices
  • -copyright (-cpr) STRING (optional)

    • copyright text to be embedded in the GLTF file
  • -selectedNodesOnly (-sno) (optional)

    • only exports the directly selected nodes
    • by default all descendants of the selected nodes are exported too
  • -sceneName (-sn) STRING (optional)

    • the name of the glTF filename
    • default is Maya scene name
  • -binary (-glb) (optional)

    • exports a single glb asset file
    • default is a JSON glTF and binary bin file containing the buffers
  • -niceBufferURIs (-nbu) (optional)

    • removes 0 suffix from generated .bin files if only a single one is generated.
    • doesn't append /data to the buffer names, just used the scene name.
  • -hashBufferURIs (-hbu) (optional)

    • computes an 256-bit hash for each buffer, and uses that as the buffer name.
  • -externalTextures (-ext) (optional)

    • doesn't embed textures in the glb files.
    • only valid when exporting a -glb
  • -camera (-cam) STRING (optional, multiple)

    • exports camera given by name.
  • -initialValuesTime (-ivt) TIME (optional)

    • the time where the initial/default values can be found
    • by default frame 0 is used
    • this frame should match the skin bind pose
    • all nodes and meshes get their default transforms and weights from this time
  • -animationClipName (-acn) STRING (optional, multiple)

    • the name of the animation clip
  • -animationClipStartTime (-ast) TIME (optional, multiple)

    • the start time of the animation clip
    • required when exporting animation clips
  • -animationClipEndTime (-aet) TIME (optional, multiple)

    • the end time of the animation clip
    • required when exporting animation clips
  • -animationClipFrameRate (-afr) FLOAT (optional, multiple)

    • the frames-per-second of the animation clip
    • required when exporting animation clips
    • either you pass this for each clip, or once
  • -detectStepAnimations (-dsa) NUMBER (optional)

    • pass -dsa 2 to detect STEP "interpolations" in the sampled animations curves.
    • enable this e.g. when binding the shape.visiblity to node.scale.x, y z, to prevent interpolation.
    • currently this is all or nothing, animation curves are not yet split into discrete and continuous parts
  • -meshPrimitiveAttributes (-mpa) STRING (optional)

    • the attributes for the shapes to export, separated by a vertical bar |
    • by default all attributes are exported, e.g.
      • -mpa POSITION|NORMAL|TANGENT|TEXCOORD|COLOR|JOINTS|WEIGHTS
  • -blendPrimitiveAttributes (-bpa) STRING (optional)

    • the attributes for the blend-shapes to export, separated by a vertical bar |
    • by default all GLTF supported attributes are exported, e.g.
      • -mpa POSITION|NORMAL|TANGENT
  • -force32bitIndices (-i32) (optional)

    • forces 32-bit indices to be written to the GLTF buffers
    • by default 16-bit indices are used whenever possible
  • -disableNameAssignment (-dnn) (optional)

    • do not assign Maya node names to GLTF nodes
    • by default names are copied
  • -mikkelsenTangentSpace (-mts) (optional)

    • use the 'MikkTSpace' algoritm for computing the tangents instead of those from Maya
    • by default the Maya tangents are exported
      • if you imported meshes from Blender without importing the tangents, and you just use Maya for doing animation, you should use this flag.
  • -mikkelsenTangentAngularThreshold (-mta) (optional)

    • the angular threshold to be passed to the 'MikkTSpace' algoritm
      • by default 180 is passed
      • in general you should not use this flag, it is mainly for debugging
  • -skipStandardMaterials (-ssm) (optional)

    • do not export standard materials (lambert, phong, etc), only GLTF PBR materials.
    • by default standard materials are converted
      • but just the color and transparency is copied for now.
  • -excludeUnusedTexcoord (-eut) (optional)

    • exclude texture coordinates when the mesh primitive doesn't have textures?
      • by default texture coordinates are always exported
  • -defaultMaterial (-dm) (optional)

    • always generates a glTF PBR material, even if no material is assigned to a mesh in Maya
    • by default no default materials are generated
  • -colorizeMaterials (-cm) (optional)

    • for debugging, generate a unique PBR material with a different color for each material
    • by default no debug materials are generated
  • -dumpMaya (-dmy) STRING (optional)

    • dumps debugging info of the Maya objects to the given filepath argument
    • use the word CONSOLE to print to the Maya output window
      • WARNING: this can take a very long time if you have complex meshes!
    • by default nothing is printed
  • -dumpGLTF (-dgl) STRING (optional)

    • dumps a formatted version of the glTF asset file to the given filepath argument
    • use the word CONSOLE to print to the Maya output window
      • WARNING: this can take a very long time if you have complex meshes!
    • by default nothing is printed
  • -ignoreMeshDeformers (-imd) STRING (optional, multiple)

    • blend-shape or skin-cluster deformers to be ignored
    • by default no deformers are ignored
    • use this if you have deformers that are used to generate different characters, but not for animation
    • you can also add the custom attribute Maya2glTF_ignored (short name MGi) to the deformer to ignore it.
      • to maya2glTF_UI has a button to add this attribute to the selected deformer(s)
  • -skipSkinClusters (-ssc) (optional)

    • skip all skin cluster deformers, as if the mesh was not skinned
    • by default no skin clusters are skipped
  • -skipBlendShapes (-sbs) (optional)

    • skip all blend-shape deformers, as if the mesh was not morphed
    • by default no blend-shape deformers are skipped
  • -redrawViewport (-rvp) (optional)

    • redraw the viewport when exporting animation.
    • by default the viewport is not refreshed, since this slows down the exporter

Status

I consider this plugin to be production quality now, but use it at your own risk :)

  • Supports Maya 2017-2020 (64-bit only)

    • Maya 2016 is not supported any more
  • Linux support hasn't been tested a lot.

  • Supports static and animated, skinned and morphed meshes

    • Currently all animation is baked per frame, no compression is done yet
  • Supports multiple animation clips (node and joint transforms, blend shape weights)

    • Blend shape targets are not sparse yet
  • Exports POSITION, NORMAL, COLOR, NORMAL, TANGENT, TEXCOORD, JOINTS and WEIGHTS attributes

  • Supports exporting to glTF + bin, single glTF or single glb files.

  • Uses a modified fork of the glTF code from the COLLADA2GLTF project

  • Currently Phong, Lambert and Blinn shaders are converted to PBR, but only the color texture and transparency is taken into account (this is mainly done for testing with existing models).

  • Comes with GLSL code with a friendly UI ported from the official Khronos PBR WebGL code.

    • See maya2glTF\maya\renderData\shaders\glTF_PBR.ogsfx
    • To use this hardware shader
      • make sure the GLSL shader plugin is loaded
      • use the OpenGL/Core Profile in Preferences/Display
    • You can use the maya2glTF\maya\scripts\assign_glTF_PBR_material_and_textures.mel script to assign multiple textures at once, based on filename patterns
  • Supports exporting cameras

  • No lights yet

Building

  • Currently out-of-the-box downloads are only provided for Windows x64

    • If you want to try the exporter, but you can't build it, give me a sign
  • I assume you already installed a GIT client

  • Some versions of Maya require a Maya devkit

    • Seems not needed for Maya 2018+
  • Clone this repository

    • Open a command prompt (aka terminal), and run
    git clone https://github.com/iimachines/Maya2glTF.git --branch master
    

Building for Windows

  • Install Visual Studio 2019

    • Select at least the C++ desktop development payload
    • In the individual components tab, select:
      • the Windows 8.1 SDK
      • the Windows Universal CRT SDK
    • This document was written for Visual Studio 2019, other versions might not work.
  • Install the Win64-x64 version of CMAKE

    • Make sure to add CMake to the system path
  • Enter the maya2glTF folder, and run

    windows_create_vs_project -D MAYA_VERSION=2020
    
    • Change 2020 in the Maya version you want to target.
    • After a couple of seconds, a Visual Studio solution should be generated in the build folder.
  • Next build the maya2glTF plugin itself

    • Launch Visual Studio 2019

    • Open the solution maya2glTF\build\maya2glTF.sln

    • Select the desired configuration target (e.g. release)

    • Build

    • If all goes well, the plugin and all scripts will be copied to your %userprofile%\Documents\maya folders

Building for MacOS

  • install XCode from the app-store
  • install CMake
  • open a Terminal window
    • See Finder Utilities Terminal
  • clone this repository
    • e.g. git clone https://github.com/iimachines/Maya2glTF.git ~/Documents/Maya2glTF
  • enter the cloned directory
    • e.g. cd ~/Documents/Maya2glTF
  • create the build script by running
    • ./osx_create_project.sh 2020
    • Replace 2020 with the Maya version you're targetting
  • enter the generated build folder, and make the plugin
    • make
  • then install the plugin by running
    • make install
  • if all goes well, the plugin should be ready to be used.

Building for Linux

- TODO

Testing the build

  • Start Maya

  • Load a scene

    • NOTE to load scenes from this project, first set the Maya project to the maya2glTF\maya folder

    • to see if the plugin was built correctly, it's best to use a scene from this repository, for example maya2glTF\maya\scenes\damaged_helmet.ma

  • select the meshes and cameras you want to export

    • by default all descendants are also exported, unless you add the -selectedNodesOnly (sno) flag.
  • run the following MEL script

maya2glTF -outputFolder "<your output folder>"
  • I use the vscode glTF viewer

    • Make sure to switch between BabylonJS, Cesium and ThreeJS, they all give different results... For our own assets, it seems ThreeJS gives the best results.
  • If you want to contribute to the development, you might want to use the MEL script maya2glTF\maya\scripts\test-iteration.mel. This unloads and reloads the plugin everytime, unlocking the DLL.

maya2gltf's People

Contributors

bigroy avatar fire avatar robertlong avatar vercru avatar ziriax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maya2gltf's Issues

Error: No object matches name: GLSLShader1.u_BaseColorTexture on Mac

I was able to succesfully build and install the script on Mac, however I am getting the error below, when assigning PBR shader to selection

// Error: line 0: No object matches name: GLSLShader1.u_BaseColorTexture

Using Maya 2018, I am simply creating a simple cube, then trying to assign the PBR shader using maya2glTF_UI.

MacOS High Sierra 10.13.6 error

Hey there,

I get the following error when trying to compile on MacOS Sierra 10.13.6:

[ 46%] Building CXX object CMakeFiles/maya2glTF.dir/src/MeshVertices.cpp.o
/Users/davnelso/Documents/Maya2glTF/src/MeshVertices.cpp:422:39: error: no member named 'clamp' in namespace 'std'
const auto assignmentCount = std::clamp(assignmentsSize - componentOffset, 0, vertexJointAssignmentElementSize);
~~~~~^
/Users/davnelso/Documents/Maya2glTF/src/MeshVertices.cpp:422:48: error: expected '(' for function-style cast or type construction
const auto assignmentCount = std::clamp(assignmentsSize - componentOffset, 0, vertexJointAssignmentElementSize);
~~~^
/Users/davnelso/Documents/Maya2glTF/src/MeshVertices.cpp:422:66: warning: expression result unused [-Wunused-value]
const auto assignmentCount = std::clamp(assignmentsSize - componentOffset, 0, vertexJointAssignmentElementSize);
~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
/Users/davnelso/Documents/Maya2glTF/src/MeshVertices.cpp:423:39: error: no member named 'clamp' in namespace 'std'
const auto assignmentIndex = std::clamp(componentOffset, 0, assignmentsSize - assignmentCount);
~~~~~^
/Users/davnelso/Documents/Maya2glTF/src/MeshVertices.cpp:423:48: error: expected '(' for function-style cast or type construction
const auto assignmentIndex = std::clamp(componentOffset, 0, assignmentsSize - assignmentCount);
~~~^
/Users/davnelso/Documents/Maya2glTF/src/MeshVertices.cpp:423:50: warning: expression result unused [-Wunused-value]
const auto assignmentIndex = std::clamp(componentOffset, 0, assignmentsSize - assignmentCount);
^~~~~~~~~~~~~~~
2 warnings and 4 errors generated.
make[2]: *** [CMakeFiles/maya2glTF.dir/src/MeshVertices.cpp.o] Error 1
make[1]: *** [CMakeFiles/maya2glTF.dir/all] Error 2
make: *** [all] Error 2

Got any quick solutions I may be missing to compile this?

Thanks,
-David.

Pivot Freezed Transform

First of all, thanks for this wonderful job !

I have seen that the pivot that I have set in Maya doesn't export in the glTF file. I always setup my pivot and freeze all my transforms at the end of my asset's editing. What's the best way to export with the pivot? I'm thinking about scripting a pivot group creator that will stand at the pivot place a offset the mesh inside.

Am I wrong?

PBR maya material does not support double-sided rendering

Hello!

I have an object that requires double-sided rendering. I do not see an option inside the Maya2GLTF material that provides that functionality. My materials are set to FRONT upon inspection inside of ThreeJS Editor. This option seems to be stored within the THREE.material.
image

The material properties inside of ThreeJS editor provides me with option of rendering the FRONT, BACK, or DOUBLE.
image

I need this option to be set to DOUBLE. Is there a way to do this with the PBR material?

How to export multiple animation clips

OS: Windows 10
Maya Version: 2017
Plugin Version: v0.9.4 BETA

After looking at your instructions I cant seem to find a way to export multiple animation clips via the UI. Ive tried to add multiple animation clips to the same track using the TRAX editor but it exports all animations into a single clip and not their own unique clips.

Could you please provide a solid example for how to export multiple animation clips? Thanks in advance!

does not deploy on win10 maya2017/18

Copying "D:\Users\xxx\Desktop\Maya2glTF-master\maya\maya" to "D:\Users\xxx\Documents\maya"...
File not found - maya
0 File(s) copied
Done. Press ENTER to exit.
Press any key to continue . . .

Adding opacity map to glTF_PBR.ogsfx shader?

I found that you can change the glTF_PBR.ogsfx's technique to transparent, but I'm unable to find a slot to input an opacity map. How would you go about doing this/is it even possible?

maya2glTF.mel invalid encoding

The <FileUpdate> MSBuild task for updating the version in the mel script uses UTF-8 with BOM encoding when I believe Maya expects UTF8.

I see this error when attempting to load the MEL script:

source "C:/Users/robertlong/Documents/maya/2018/scripts/maya2glTF_UI.mel";
// Error: proc string _quoted(string $text)
 // 
// Error: "C:/Users/robertlong/Documents/maya/2018/scripts/maya2glTF_UI.mel" line 1.2: Syntax error // 

I can't make a PR right now because of the LFS quota (see #31) but here's the fix.

In Maya2glTF.vcxproj change this:

<FileUpdate Files="$(ProjectDir)\maya\scripts\maya2glTF_UI.mel" Multiline="true" Singleline="false" Regex="\$maya2glTF_version\s*\=\s*&quot;(.+)&quot;" ReplacementText="$maya2glTF_version = &quot;$(GIT_Tag) $(GIT_Hash)&quot;" />

to:

 <FileUpdate Files="$(ProjectDir)\maya\scripts\maya2glTF_UI.mel" Multiline="true" Singleline="false" Regex="\$maya2glTF_version\s*\=\s*&quot;(.+)&quot;" ReplacementText="$maya2glTF_version = &quot;$(GIT_Tag) $(GIT_Hash)&quot;" Encoding="utf-8-without-bom" />

Lights

Hey guys. Thanks for your hard work! Using your fantastic plug-in for work now, I was wondering if lights could be added. I need to animate flickering lights for a scene and have to do some weird export workarounds to get lights working.

UI not refreshing

In v0.9.4, the UI is not updating when a new scene is loaded, or the current scene is modified.

Either add a refresh button, or subscribe to change events

Maya "reshade" bug.

Hey There! First, thank you for this plugin. It works great so far, the flow from Substance to Maya and out to glTF is fantastic.

I was experiencing this small issue. I have a model I wanted to test with 3 different sized maps. I assign the PBR, the window pops up asking for all the "textures" I select them and perfectly it exports the mapped model as a glTF.

When I go back to "change the maps" in the shader I experience odd things such as, "Roughness" appears to have "Normal" mapped to it, yet "Normal" also has a "Normal" mapped to it. Seeing that, my instinct was to delete the shader and start over (which is fine with me). What happens now though is the new assigned shader comes in and assigns but we don't get the dialogue to "select" maps anymore.

My solution as of now has been to quit Maya and restart all from the top and it works that way just fine.

Also one small detail, is there any way the extension can write out as "gltf" instead of "glTF"? some viewers are rejecting the files as "glTF" and it's got to be renamed to "gltf".

Again thank you for these scripts!

-Patrick

Number of vertices

I have a question for you. I have made a simple polySphere to export to learn a bit more about the glTF format.

I have 382 vertices into my scene, but when I use your exporter, the accessor has a count of 439. Even the accessor for the indices has a a maz of 438 (the biggest index).

I would like to know since it means there's a difference in the file size at the end.

PBR material is being imported as standard material in THREEjs

Hello,

Sorry in advance if this is a feature request and not a bug. Currently when I import a model into THREEjs editor its material is set to MESHSTANDARDMATERIAL. I am using the PBR material provided along with the exporter. The behavior I would expect is for the material to be set as MESHPHYSICALMATERIAL upon import.

One of the big reasons we use MESHPHYSICALMATERIAL over standard is because ambient lights and hemisphere lights only affect MESHPHYSICALMATERIAL. We use these lights all the time and they play a key role in our artist toolset.

Again this could be a feature request or possibly a bug with the maya material. Thanks in advance!

Support place2dTexture nodes

This might be difficult since glTF doesn't have a notion of this, meaning we should bake the UV transformations in the UV coordinates...

Exporting without animation uses wrong binding pose

When exporting a single frame, the skin binding pose is baked at that frame, even when passing the initialValuesTime parameter.

When passing initialValuesTime, the skin binding pose from that frame must be used instead.

Obviously the transformation from the current frame must be stored inside the nodes, it is only the binding pose that must change.

The same can apply to morphing, but that might already work correctly.

BaseColorFactor inside the glTF_PBR.ogsfx shader is not being exported

STEPS:

  1. Create new maya scene
  2. Click CREATE -> Polygon Primitives -> Cube
  3. Launch maya2glTF UI and click ASSIGN PBR SHADER TO SELECTION
  4. Modify BASE COLOR FACTOR to any RGB value other than 255, 255, 255
  5. Select the Cube mesh in the viewport
  6. Inside the maya2glTF UI click EXPORT SELECTED MESHES
  7. Import exported GLTF into a GLTF viewer or ThreeJS editor

RESULT:
BASE COLOR FACTOR value is not exported.

As an artist I expect this value to directly correlated to COLOR attribute inside of THREEjs editor. Even though I modify this value inside the material in Maya, the COLOR attribute inside of THREEjs editor defaults to 255, 255, 255.

image

image

Rotate pivot group

First, thanks for your awesome plugin, it is really easy to use!

I have a problem regarding the mesh pivot point and not sure if it is an issue with this plugin or Three.JS (or probably with me). Maybe you can point me to the right direction and the right Maya setup I should use?

I am basically trying to rotate the hand of a model (with the fingers nested inside it) and keep it somehow attached to the arm, but I can't manage to. Here is the full question on threejs forum.

Basecolor and emissive color picker is confusing

When picking colors in the PBR shader for the base color and emissive color, the artist expect these to be in sRGB space, just as typical textures.

However, in GLTF, these factors are in linear space. We need to add options to indicate the intended color space of these diffuse and colors, which should be sRGB by default. This will unfortunately break existing models...

backface visibility

I didnt find any option to make the backface visible in maya gltf shader, can you help

Maya2GLTF PBR Material - Environment maps not being exported

Hello!

I am having an issue with the maya PBR material. While applying maps to my car body, I have applied the following texture:
t_cityblock_env

...to the Environment fields outlined below:
image

I export the object out of maya, but unfortunately, when I import my object into the threejs editor my environment map is empty.
image

Am I using the environment properties incorrectly or is this a bug?

Transparent base-color-texture does not change material alphaMode to BLEND

Currently the only way to set the alphaMode of a material to BLEND is by setting the base color opacity to something < 1.

We should either expose the alphaMode as an attribute, scan all the pixels of the base-color-texture, or provide both

When the Technique is set to Transparent, the alphaMode must be set to BLEND

implement mesh instancing

Currently each instanced maya shape is exported as a new mesh. Most code should be in place to deal with instances.

PBR OpenGL shader does not exist

As stated above I do not see the PBR OpenGL shader inside of this directory:
\Documents\maya\Maya2glTF\PBR\shaders\glTF_PBR.ogsfx

I did not attempt to compile my own version of the plugin. I downloaded the v0.9.4 BETA release. Perhaps that is the reason why. I also do not see it inside of the Maya2GLTF repo either.

Could you provide me with some direction here to obtain the shader or could you add it to the repo?

Optimize nodes with a single shape

Currently a Maya transform node with child shape is exported as two glTF nodes (eg pCube1 and pCubeShape1). However, if the Maya transform only has a single shape (the common case), the second glTF node is redundant.

Implement logical parents

This allows overriding the actual parent to be used, using e.g. a custom attribute.

Like this a completely different hierarchy can be exported without having to create and maintain two different rigs in Maya.

Ability to export materials with names

Currently materials are exported without their names; however, it can be useful to reference materials by names in other renderers. How possible would it be to add this functionality to Maya2glTF?

Document exporting animation clips and setup pose at frame 0

Update the README, frame 0 (or the frame specified with the -ivt argument) should contain a setup pose, Maya2glTF is not using Maya's skin binding pose information, since that turns out to be unreliable (can be locked, so going to the binding pose is not always possible unless modifying the scene)

Repository over GitHub's data quota

λ git clone https://github.com/Ziriax/Maya2glTF.git
Cloning into 'Maya2glTF'...
remote: Counting objects: 2240, done.
remote: Compressing objects: 100% (169/169), done.
remote: Total 2240 (delta 148), reused 116 (delta 57), pack-reused 2013
Receiving objects: 100% (2240/2240), 54.72 MiB | 26.94 MiB/s, done.
Resolving deltas: 100% (1640/1640), done.
Downloading img/logo.png (122.79 KB)
Error downloading object: img/logo.png (10b86c0): Smudge error: Error downloading img/logo.png (10b86c0df51f756494f6d33baf6701fee6a4589d388073e0ddba9f2a121d8210): batch response: This repository is over its data quota. Purchase more data packs to restore access.

Errors logged to C:\Users\robertlong\workspace\Maya2glTF\.git\lfs\objects\logs\20180622T114433.3992671.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: img/logo.png: smudge filter lfs failed
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

Adding support for Maya 2014

It would be awesome if older versions of Maya, like Maya 2014 could be supported. The main reason is that Maya 2014 was one of the last version of Maya before AutoDesk switched to a subscription model.

Implement segment scale compensation

Investigate if this can be handled by adding one/two extra joints before/after each joint that requires segment scale compensation, and that actually has a non-uniformly scaling parent (taking all animation into account)

macOS Support

I'm interested in getting work started on macOS support. Does anyone have an idea of what is currently needed to add macOS support. Besides moving everything to CMAKE, are there other dependencies that are Windows specific right now? @donmccurdy mentioned COLLADA2GLTF may not have macOS support yet.

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.