OpenVDB and Unreal Engine

1,675 views
Skip to first unread message

S WK

unread,
Apr 28, 2018, 6:31:52 AM4/28/18
to OpenVDB Forum
Hi,

I would very much like to use OpenVDB for various things in an Unreal Engine project, but I'm having trouble figuring out how to bring it into a UE4 project. Does anyone have any experience doing this, who could point me in the right direction?

Thanks!

S

S WK

unread,
Apr 30, 2018, 7:01:27 PM4/30/18
to OpenVDB Forum
I'll explain where I'm at, and maybe someone will be able to help based on that...

I don't need the viewer, so my understanding is that these are the dependencies I need:

  1. OpenEXR
  2. ITBB
  3. ZLib
  4. Boost
The first three are already used by Epic in Unreal Engine, and have already been build as static libraries that work in UE4. So I've grabbed them (lib and include folders) from the Engine folder (C:\Program Files\Epic Games\UE_4.18\Engine\Source\ThirdParty).

I found someone who has already built Boost for UE4 (https://github.com/hausfrau87/Boost_PCL_UnrealThirdPartyPlugin) so I've grabbed his lib and include folders.

I've created a new Visual Studio project (I'm using VS2017) for making a C++ static library, with no precompiled header.

I've then added the following folders/files from the openvdb source from Github:
  • folders
    • cmd
    • io
    • math
    • points
    • tools
    • tree
    • util
  • files
    • Exceptions.h
    • Grid.h
    • Grid.cc
    • Metadata.h
    • Metadata.cc
    • MetaMap.h
    • MetaMap.cc
    • openvdb.h
    • openvdb.cc
    • Platform.h
    • Platform.cc
    • PlatformConfig.h
    • Types.h
    • version.h
I've then added all the Additional Include Directories in the project properties. Everything seems to be being found just fine, there's no include errors.

I'm trying to build x64 Release, which is apparently what UE4 needs static libraries to be.

Aaaaand then I'm getting a large number of errors and warnings I don't understand at all: https://docs.google.com/spreadsheets/d/1xIiE28DdwYt9xPyJQwYSlgdyEAcbf4tArUB6-hSglW0/edit#gid=0

Clearly, I'm stabbing in there dark here, not really sure what I'm doing!

Can anyone help me out here?

edward

unread,
May 3, 2018, 1:47:43 AM5/3/18
to OpenVDB Forum
You should google and search this list for how to build OpenVDB on Windows. From my reading of the posts on this list, cmake builds on Windows seem to have the best chance of success so I suggest you read BuildingWithCMake.md in the source code. This would at least produce a project file for you that you can more easily examine the required compiler options. Or, if you know GNU Make, you can directly see the compiler options by looking at https://github.com/sideeffects/openvdb_dev/blob/master/openvdb/platform.mk

Best regards,
-Edward

S WK

unread,
May 3, 2018, 6:36:34 AM5/3/18
to OpenVDB Forum
Hey edward,

Thanks for responding. I bashed my head against this for a few days (with no success) and then discovered yesterday that in the latest version of UE4 (4.19) there is an experimental plugin called ProxyLOD which uses OpenVDB, so it contains all the relevant libraries and includes already setup for Win64 in Unreal Engine. So using that as a basis, I now have OpenVDB up and running in UE4, which is amazing.

This whole experience has made me realise I probably need to learn CMake (because it's over my head right now), but I've been able to punt that further into the future for now.

Thanks!

Steve
Reply all
Reply to author
Forward
0 new messages