I am having an issue with texel density when importing a model using datasmith. When I apply materials to my geometry, they appear microscopic and the only way I can fix it is by applying a texture coordinate node to each material and setting the tiling to a crazy small number like .001 or something. To make sure the issue was with my model, I pulled in a generic cube from the engine content and applied the material to it. On the cube, the material looks totally fine. Are there any suggestions on how I can remedy this?
Hi Kroth10 ,
Can you please tell where are you exporting from ? 3dsMax, CAD, Sketchup…?
If its something you the staticmesh , knowing where its from will be very useful
Thank you
MC
Hi Marie-Claude,
I’m exporting from 3dsMax. The model is originally from Revit transferred to Max via FBX then to UE4 via datasmith
Can confirm, texture tiling is very small when importing models from Revit > Max > Datasmith. We kinda corrected this with world aligned materials instead of using the mesh UVs. :rolleyes:
If you give us the 3ds Max file, we might be able to do something. Report Unreal Studio bugs here: https://unrealstudiohelp.epicgames.com/s/article/How-do-I-report-a-bug
HI there ,
Here’s what I found that could help you fix the problem:
Revit exports in Feet no matter what unit scale is used there. 3ds Max System Units are set to inches by default, which means that after transferring your Revit file to 3ds Max, all objects are scaled by a factor of 12. You can see that by selecting an object in Max, then selecting the Scale tool and you’ll find a scaling factor of 1200 in the type-ins at the bottom of the screen. This tends to mess up the texturing & tiling.
You can try importing the .rvt file directly into 3ds Max, this fixes the scaling issue.
If you absolutely need to use FBX, then set your max System Units to Feet before importing to match Revit’s scaling. Datasmith will handle the conversion from feet to cms when going to Unreal.
Also for best compatibility, avoid Revit’s “Autodesk Materials” prior to exporting to Datasmith, You’re better off using Scene Converter (from Max’s Rendering menu) to convert Autodesk Materials & Maps to something Datasmith can understand. You can use Scene Converter’s default setup, it works well.
Hope this help
Hey Marie-Claude !
This is an interesting bit of info about the scaling stuff. While doing some size checks on one of our models, I found out that the model UVs needed to be 200 times smaller (0.005 on both axis) to match a world aligned UV. Models were imported in max using the link RVT option, not import RVT (that way you can refresh your model if any changes were made in Revit later).
Looks like this (order is default export UV size (smallest tiling), scaled UV and world aligned UV) :
https://thumbs.gfycat.com/KeyAggressiveBurro-size_restricted.gif
On the material matter, Autodesk Materials are not even exporting with Datasmith (models are exported without materials at all, just the slots). We went another way than the Scene Converter and use the Architecture Standard Converter script found HERE. It only converts the material node though, so most of the time textures wont be exported by Datasmith.
Cheers
EDIT : added a sample of what it looks like at default export UV size (smallest tiling), scaled UV and world aligned UV.
I run into this importing meshes from Inventor as well. Another pseudo “fix” that might help is to use one of the other UV channels for texturing which can sometimes give some decent results if you can’t do world aligned for whatever reason. Sometimes the shell orientation can be wrong though so results may vary from mesh to mesh.
Are there any performance differences between scaling the UV, using WA materials or using a different texture coordinate?
Hi LegendreVR,
Do you think it would be possible to send us your scene?
I would really like to try something hopefully find a workaround and if not, passing the issue to the development team.
You can do that by logging an issue here :
https://unrealstudiohelp.epicgames.com/s/case-community-page
Thank you
While creating a ticket I checked if the problem was coming from unreal/datasmith or max, and it looks like the scaling problem is also present in max… Is this a problem with how revit models are imported in max then ? Do you still want the datasmith scene ?
Probably an Issue with Revit and Max I won’t need the scene .
This has nothing to do with UE4, this is just how the interoperability between Revit and Max works.
Revit works in “Real-World Map Scale” as architects relate to that easier. If a square brick texture is 5-bricks wide, it is easier for an architect to define the total width as 40" (5x 8"-brick), making the texture 40"x40" in real-world size, which they enter in Revit’s Material Editor. When Max imports that data (via Import or Link), it reads that information in real-world map scale as well. This is hard to see with Autodesk Materials in 3ds Max but since you need to convert those in order to export them to Datasmith anyway, do so by using 3ds Max’s Scene Converter rather than some third-party script.
The Scene Converter (in 3ds Max’s Rendering menu) by default converts Autodesk Materials to Physical Materials, but also and perhaps more importantly converts Autodesk Bitmaps to Standard bitmaps so that you don’t have to redefine them from scratch. When it does that, you will notice that the bitmaps are set in Real-World map scale as they were in Revit and if you were to disable that, the UV tiling would indeed show very small values such as 0.05
Ultimately, if you are adamant on using Max’s Standard material, you can create a Scene Converter preset to convert Autodesk materials to Standard instead of Physical materials but this won’t make a difference with Datasmith, both will convert properly, so save yourself an extra step.
Of course, all this makes a mess of UV coordinates as the unwrapping of individual max objects is way beyond the UV packing square (1:1) but this only affects texture coordinates. Lightmass coordinates will be generated properly by Unreal. In other words, following this workflow shouldn’t give you texture scaling issues in Unreal.
hope this helps,
Amer Yassine
Unreal Studio, Montreal
This clarifies the situation perfectly, thanks a lot !
Hi there,
After I import geometry (basic block, cube, sphere) using Datasmith either from SketchUp or even 3DsMax and try and apply Unreal Materials (StarterContent) they come out extremely tiny.
Any reason for this or way how to fix this?
Thanx in advance.
Robert
PS: It seems to be a similar issue to this one: