How to modify parts of 3D model imported in Unreal Engine? - unreal-engine4

I need to find the parts of a 3D model imported in Unreal Engine through fbx importer in order to change something (e.g. a texture, a color, etc.) using Unreal Engine and C++.
I was already able to do so with other open source libraries (e.g. OpenSceneGraph) using the Visitor design pattern to find a pointer to the part and then modifying it but I don't yet know how to do so in Unreal Engine.
Does exist a class to analyze an imported model to find parts? Or is it better to use another approach to modify textures or color of an imported 3D model (e.g. import the parts of the model in an independent manner)?

Generally people reccomended to start poking around the engines FBXImport class since you'll have to homeroll your own FBX conversion code to do anything other than say, change the material during runtime (obvsiously), assuming you mean changing the geometry or such things of an asset thats already been imported.

Related

why do my object files look weird when imported to Unity?

I have made some heart models on medical software Materialise Mimics and have exported them as .obj files because the software doesnt support exporting as .fbx.
I've tried other Unity developed programs with the exact same models and they look really good, but I dont know what they've done to process the files.
I'm quite new to unity and have tried following some guides on making materials and shaders, but nothing seems to work.
Thanks!
Object file in 3D viewer
Object file directly imported to Unity
Object file with Material added
I think the model's normals got inverted. Try using a double sided shader like this https://gist.github.com/naojitaniguchi/62ccf37c801ea55517b7 (not mine) and see if it's works
I hope it do

How to make a mesh editable for unity3D

well i have a 3D model of the human digestive system I found it in the internet, this model is :
a .obj file
if a fixed model (not dynamic)
here is screenshot of the model :
so what I want is to make this model editable on the game like for example
the user of the game can cut the intestine and suture it (so in other way making a surgery)
I'm not sure if it is possible or i should create a new model from scratch to do that
Note :
I'm working with unity3D for creating the game and I'm trying to adapte the model with what I want using blender and cinema 4D so whatever the tool needed to do it i will use it
You should first go through these two pages to understand how meshes work and how you can manipulate them in Unity.
Using the Mesh Class
Mesh
Unity isn't a mesh editor, it's an engine. You can write your own scripts to add the functionalities you need, or also there are some pre-made assets that do some mesh editing available in the Asset Store.
The best approach is to remodel all in small fragments so you can easily cut the pieces you want.

How to separate object in an imported model from sketchup to unity

I have imported the house model from SketchUp to unity for my AR project. The exporting process went fine but when I tried to apply the texture on each part of the house, it just applied for the whole house. I want to know if there's a way to separate each part of the model so that I can apply the texture for each part not the whole house.
Here is my house model after export. The textures are in the separate folder.
As you can see, the door, windows, floors are all connected.
Thank you in advance!
The whole model most likely came with a single material applied to each and every part of the model.
Since that material is shared, if you apply something to it, it gets applied to all of them.
You need to create more material instances in your project and apply to each part.
Then modifying the material will only affect the part where it is used.

Photogrammetry: Software to modify/correct details in 3D objects

I started to work with 123D Catch and Blender a while ago. I made some photos and created 3D object in 123D Catch. Next step is to put it into Unity.
But before it I need to correct some details (some edges have inappropriate shape, colour is missed in some places etc).
I tried to import this 3D object into blender but I couldn't upload texture automatically (I watched some tutorials about mapping, but exaples are easy and my object has complicated construction).
Can anyone reccomend me a software where I can correct basic stuff like egdes, shape or colour easly?
Thank you a lot.
When downloading the models the textures are included as 1 or more
image files.
you can edit them in any image manipulation software (e.g. Gimp or Photoshop)
When opening the model in blender
make shure that you use file>import>obj
and turn on textured mode :
Mapping is not neccesary as the UVs are contained in the model alredy.
After editing the shape you can
export the model via file>export>obj or just drag the .blend file into your assets and let Unity convert it automtically.
Before you use your model in unity you should consider reducing its geometry/detail as the generated models can be very high poly.
For that purpose, I can recommend "Meshlab"
Further reading: http://www.shapeways.com/tutorials/polygon_reduction_with_meshlab

Unreal Engine 4, import with c++?

I need to import an fbx into UE4 using c++. This is to eventually write a batch importer that sets up material connects etc upon import.
I am, however, stuck at the first hurdle.
I cannot find any info on this anywhere.
How can I load an fbx model into the editor using c++ ?
edit:
I do not need to do this at runtime, I just need to import the models into the editor, and adjust their location/material settings as I do so..
Parse the .fbx (there are enough docs), then create the mesh at runtime would be one way.
If you only need the editor stuff, check out the FbxMainImport.cpp
FFbxImporter::OpenFile
FbxNode* GetFirstFbxMesh(FbxNode* Node, bool bIsSkelMesh)
etc...