GithubHelp home page GithubHelp logo

Comments (7)

thangt avatar thangt commented on July 22, 2024

In UE4, if you use a 'Translucent' type material on a 3d model, it will skip the depth of that model and only store the depth of the pixel behind it.
If you want to use translucent material and want UE4 to record the depth of the model, it will be a new feature I need to implement.
Right now the only work around I can think of is to change the material blend mode to be 'Opaque' and set up its refraction. That way you can still capture the refractioness of the object's material and still capture the object's depth.

from dataset_synthesizer.

bmunkhtulga avatar bmunkhtulga commented on July 22, 2024

Thank you very much. I will try that workaround.

from dataset_synthesizer.

bmunkhtulga avatar bmunkhtulga commented on July 22, 2024

I am still trying to take depth image of transparent object. And i heard there is one more workaround which duplicates the mesh with an opaque material currently. You can set that copy to not render in main pass and to render only in custom depth.

But it seems SceneCapturer only captures objects that are rendered in main pass. If SceneCapture can capture depth image from CustomDepth pass, i think this workaround will work much better than one mentioned above.

Does anyone know about anything about this?

from dataset_synthesizer.

thangt avatar thangt commented on July 22, 2024

I do know about this. It was a bit complicated so I wanted to implement it as a new feature to make controlling which transparent object should be captured in the depth map.
You can actually do similar thing with the current NDDS by using the IgnoreActors array in the feature extractors.

There is a bug in the code so you need to change the code first:

  1. Go to Source\Plugins\NVSceneCapturer\Source\NVSceneCapturer\Private\NVSceneFeatureExtractor_ImageExport.cpp
  2. Go to line 116, it should say: if (!CheckActor)
  3. Remove ! so it become: if (CheckActor)
  4. Build the NDDS again.
    NOTE: I will push a fix for this in the next patch, in the mean time, you can do this locally.

After you changed the code, go to the map:
1, Duplicate the transparent actor (RealActor) to get a new one: DupActor (example name)
2, In DupActor:
2.1, Replace the material of its mesh with a non translucent one (it can be anything, event default debug material)
2.2, Remove the AnnotationTag
3, Set up the transform of DupActor to be the same as the real one
4, Go to the Feature Extractor Settings part in the SceneCapturer (the one you placed in the map)
5, Select the FeatureExtractorTrueColor - the one that capture RGB image:
5.1, Add new element to its Ignore Actors array
5.2, Add the DupActor to the array
NOTE: This will make sure the RGB image doesn't include the DupActor

The depth feature extractor should be able to capture the depth from the DupActor and the DupActor won't appear on the RGB image.

Again, as you can see, the whole process is quite manual and need to be repeated to all the objects. I have plan to make it more automated but we need more time to implement and test it.

from dataset_synthesizer.

bmunkhtulga avatar bmunkhtulga commented on July 22, 2024

Thank you for walk-through. Manual work won't be problem.

As I was following the steps, i wasn't able to add the DupActor to the array. I selected it is still displaying None. And i tried other actors such as SceneManager_BP or SceneCapturer_AllFeatureExtractors, they were okay. Is there any reason I can't add DR_AnnotatedActor_BP to the array?

image

from dataset_synthesizer.

bmunkhtulga avatar bmunkhtulga commented on July 22, 2024

Thank you for walk-through. Manual work won't be problem.

As I was following the steps, i wasn't able to add the DupActor to the array. I selected it is still displaying None. And i tried other actors such as SceneManager_BP or SceneCapturer_AllFeatureExtractors, they were okay. Is there any reason I can't add DR_AnnotatedActor_BP to the array?

image

I was able to do it on SceneCapturer_Simple, not on SceneCapturer_AllFeatureExtractors.

from dataset_synthesizer.

thangt avatar thangt commented on July 22, 2024

The reason you can't add some of the actors is because they belong to different sub-level. https://docs.unrealengine.com/en-US/Engine/Levels/LevelsWindow/index.html
The SceneCapturer can only reference to the actor that belong to the same sublevel as itself. I think in the default map, the SceneCapturer belong to a sublevel while the annotated actor belong to the main level.

from dataset_synthesizer.

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.