AcademySoftwareFoundation / openvdb

OpenVDB - Sparse volume data structure and tools
http://www.openvdb.org/
Mozilla Public License 2.0
2.61k stars 645 forks source link

Build maya 2019 plugin on windows 10 #666

Open asztalosdani opened 4 years ago

asztalosdani commented 4 years ago

Hi,

I am trying to build the maya plugin for maya 2019 on windows 10. I did the following things.

  1. Installed VS 2017, CMake, vcpkg
  2. Installed dependencies using vcpkg, according to this
  3. Successfully built OpenVDB Print
  4. Using cmake gui, set up variables to compile the maya plugin
  5. Successfully compiled the maya plugin. I can load it, I can create a Read node, but creating a Visualize node crashes maya.
  6. I found that the build uses different tbb, than what is shipped with maya, so I removed it with vcpkg, then set up cmake to use the one from maya. It compiles successfully, but the Visualize node still crashes maya.
  7. Then it hit me (I have no experience in compiling maya plugins...), that I should use MSVC corresponding to my maya version, so according to this, it is VS 2015 Update 3. So I removed 2017, and installed 2015, but encountered two issues (unfortunately, I don't have them on hand anymore, so writing from memory)
    1. Compiler Error C3203 with ValueIter in PointDataGrid where ValueAllCIter was used. I was able to resolve those, with some code reorganization
    2. Compiler Error C2825 with const typename IteratorT::~NodeType* mParent; in IndexIterator.h. I was not able to resolve it, but found this, which described it being an issue with boost.
  8. So in my desperation I started over.
  9. Removed and reinstalled vcpkg
  10. But when trying to install dependencies (e.g. vcpkg install zlib:x64-windows) with vcpkg, it fails with Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe -- broken

I am currently at this stage, trying to fix the vcpkg install.

Please tell me if I am off track. Should I use VS 2015? Is there any guidance on how to build the maya plugin on windows?

Idclip commented 4 years ago

Hi @asztalosdani - sorry you've run into this. I believe you've done everything correctly and this is instead an issue with that specific node (the OpenVDB Visualize node). As far as I remember, this is currently broken for Maya's viewport 2 and there have been reports that it's not been working correctly in Legacy mode either. I was going to suggest trying to enable Maya's legacy viewport (outlined here: https://knowledge.autodesk.com/support/maya/troubleshooting/caas/sfdcarticles/sfdcarticles/Restore-the-Legacy-Viewport-in-Maya-2018.html) but it seems that's no longer available in Maya 2019.

Note that we don't support VS 2015 anymore and your solution with 2017 using Maya's tbb is the correct workflow to use.

We have a ticket logged about this here: https://jira.aswf.io/browse/OVDB-83 but need to update the user facing docs or disable this node completely for the time being so that this issue is more obvious. I'm unaware of any active development on this so I can't give you ETA on fix for Maya 2019 at the moment.

asztalosdani commented 4 years ago

Hi,

I believe you've done everything correctly

good to hear

and this is instead an issue with that specific node (the OpenVDB Visualize node). As far as I remember, this is currently broken for Maya's viewport 2 and there have been reports that it's not been working correctly in Legacy mode either.

but not this... 😄

We have a ticket logged about this here: https://jira.aswf.io/browse/OVDB-83

I think my issue is different, as Maya crashes instantly when I create the visualize node.

but need to update the user facing docs or disable this node completely for the time being so that this issue is more obvious.

that would be great.