facebookresearch / Replica-Dataset

The Replica Dataset v1 as published in https://arxiv.org/abs/1906.05797 .
Other
1.01k stars 98 forks source link

Asset import workflow for Unity and Unreal Engine #66

Open luisvsm opened 3 years ago

luisvsm commented 3 years ago

I have a use case for importing the Replica Dataset assets into Unity and Unreal.

Importing the mesh with vertex colors is easy done but linking the .hdr textures and surface information is proving to be a little more tricky.

I'm thinking that the meshes would need to be split (like PTexLib.cpp does) and the textures would need to be converted to a compatible format like EXR.

Has anyone's done anything similar before, or had success importing the mesh and HDR textures into a 3d modelling program that'd export to a format that Unity and Unreal would work with?

tse-hou commented 3 years ago

Hi, I have a similar question. Any hints are appreciated. Thanks, Tse-hou

luisvsm commented 3 years ago

Hi, I have a similar question. Any hints are appreciated. Thanks, Tse-hou

I wasn't able to get the HDR textures working, but I did find a workflow for importing assets with Vertex colours in Unity with a HDRP shader graph if you wanted a hand with that

eliabntt commented 2 years ago

@luisvsm FYI that is possible also in Blender by using blenderproc

hackertehlike commented 2 years ago

Hi, how did you manage to import assets with vertex colours into unity? I would appreciate any kind of help

luisvsm commented 2 years ago

You can use Shader Graph to make a shader that will read in the vertex colour data, unfortunately I don't have an example at the moment but hopefully that'll get you on your way

luisvsm commented 2 years ago

To be clear the level of detail is way lower than the example screenshots though, as that won't use the HDR textures (what this ticket was originally about)

hackertehlike commented 2 years ago

Where do you read the vertex color data in from? The .ply file is binary encoded and hence unreadable, and once you convert that to .obj via meshlab you lose the vertex color data Edit: Ah I see that you don't, but how do you use Shader Graph to read the per-line data from the .obj data?