Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 7
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 416 times and has 6 replies Next Thread
geegee1
Newbie



holland
Joined: Feb 19, 2024
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
import 3d model to unreal engine

I wanted to import the sweethome3d project to unreal engine and in another thread here someone advised to first import the obj file to twinmotion.
this worked fine although the model was on its side but this was easily fixed by dragging the model 90 degrees.

Next i saved as datasmith file and imported it into unreal engine.

This seemed to work but there are some problems like all textures are missing.
but worse, when saving the project unreal engine crashes.

then after opening the project it seems all the walls are missing.

I tried it in unreal engine 5.1 and 5.3.2 but same problems.

anyone have the same problem or have any tips like for example remove all lights in the scene or dont use custom textures or .... etc etc before exporting to .obj file?

I know it's a bit complicated to find where the problem is since it involves 3 different programs but maybe someone here encountered the same problem.

I also noticed that the obj probably contains a lot more than just the used objects, it looks like it exports all the installed libraries because i see objects in the UE project that i actaully didnt even use in my sweethome3d project.
[Feb 19, 2024, 10:11:15 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status: Offline
Reply to this Post  Reply with Quote 
Re: import 3d model to unreal engine

I also noticed that the obj probably contains a lot more than just the used objects, it looks like it exports all the installed libraries because i see objects in the UE project that i actaully didnt even use in my sweethome3d project.
How did you export the project?
If you only want what is visible on the levels you have, select "Select all on all levels" from the edit menu and then export to OBJ. That result should not include anything that is not a part of the design.
[Feb 19, 2024, 11:25:53 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
geegee1
Newbie



holland
Joined: Feb 19, 2024
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: import 3d model to unreal engine

thanks for the tip, i removed all furniture and lights just leaving walls doors and windows. in the end, when saving the UE project it seems to go better but still saving crashes just at the end.

probably need to trail and error a lot to find out on which object it stubmbles.
[Feb 20, 2024, 10:26:59 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status: Offline
Reply to this Post  Reply with Quote 
Re: import 3d model to unreal engine

If you exported multiple levels, first try it with a single level.
By-the-way, doors and windows are also 'furniture'. Actually, everything is just an object, a mesh described in the OBJ file.
So maybe start with only walls, then add furniture as long as everything keeps working. You might also try with a single door and then with two doors. Maybe double objects cause a problem.
(If you can't find the source of a problem you try everything, no matter how weird it may sound :) )

I assume that you export as a single object because with multiple objects UE gets a problem with already existing asset names. A single object should be seen as a single asset so make sure the name is unique in the UE asset list.

ETA: just thought of something else. Import the object in Blender and export it again. Blender and Sweet Home 3D produce different formats of the same mesh so it might make a difference.
If that doesn't help try a second method: add a line in the OBJ file before the first "g " line with "o my_object_name" (an o, not a zero, without the quotes). Then import in Blender with the setting import objects on, groups off. Export from Blender and try again. This will merge all groups into a single object.

Importing the materials from MTL seems to be a problem more people encountered. Look it up in the UE forum.
----------------------------------------
[Edit 1 times, last edit by Keet at Feb 20, 2024, 11:37:21 AM]
[Feb 20, 2024, 10:51:26 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
geegee1
Newbie



holland
Joined: Feb 19, 2024
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: import 3d model to unreal engine

didnt think of importing to blender, ill try it alongside with your other tip tonight. thx!
[Feb 20, 2024, 11:59:34 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
geegee1
Newbie



holland
Joined: Feb 19, 2024
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: import 3d model to unreal engine

update:
it does import to blender, then exporting it UE also works but it creates a collision frame around it so i cant enter the house in player mode. i think this happens in the import process when it calculates collision objects.

i also tried opening the .obj file with open3d and perhaps a clue: it opens fine but also doesnt show any walls so somethings going on with those walls in the obj file.

[Open3D INFO] Skipping non-triangle primitive geometry of type: 20

next ill try editing the obj file.
[Feb 23, 2024, 12:09:08 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 790
Status: Offline
Reply to this Post  Reply with Quote 
Re: import 3d model to unreal engine

Aha, that might explain at little.
In 3D modeling all surfaces are created with faces between vertices and edges. Usually these faces are triangles where multiple triangles compose to a full face. For example a square side is composed of two triangle faces to fill in the side. Look at a box you exported and then imported in Blender. It will show two triangles for each side.
There's a good reason for the triangles: they are always in a single flat plane.

There are however quad faces and the wall export sometimes does have those for connected wall ends. You can fix that in Blender. Not sure exactly where the function is but you can convert all quad faces to triangle faces. This is typically a function needed for games only because they don't want to convert quads to triangles in the game. You can search for 'Blender convert quad faces' and you'll probably find lots of references, including the relation between quad faces and game development.

This might solve your complete problem, let us know!
[Feb 23, 2024, 3:43:24 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved