Jump to content

[SOLVED] Wrong material orientation importing fbx from 3dsmax


photo

Recommended Posts

Starting from 3dsmax project where the wood panels are vertical using an Unwrap UVW modifier to rotate 90° the UV and achieve this result

image.png.79bcba72fcd563c0b75a00a88ccdf597.png

Exported as fbx using Game settings and imported in Unigine, recreating the material using the base texture show an horizontal orientation

image(1).png.f38c2c062eeaee567abbd93b160c5e01.png

Need I to change something else?

Edited by davide445
Link to comment

Are you using 3dsmax to export.

As a guess, put an Editable Poly Modifier on top, then export it.

Or collapse the stack (if you can do that for your project).

b.w.

  • Like 1
Link to comment

Thanks Werner

I used an Unwrap UVW modifier on top of the Editable Mesh

image.png.fa35a7ffad2813348424ad5c2000139c.png

and used the UV Editor to rotate it.

Trying Edit Poly modifier I didn't see any option to do so. Or you was meaning something else?

Edited by davide445
Link to comment

Werner it worked. The point is I really didn't understand why.

I attach the 3dsmax file in 2019 format and the textures for Unigine, will be very helpful to know why just adding a modifier (that I didn't know before) not related to UV in fact solved the problem.

The wall without any modifier show the wood vertical in max (correct), horizontal in Unigine (wrong).

With just the UVW Unfold modifier and rotating 90° the UV the wood is horizontal in max (wrong), also horizontal in Unigine (wrong)

With also the Edit Poly modifier result horizontal in max (wrong), but vertical in Unigine (correct)

Really didn't get it.

REVIT Tavolato_Shading.jpg

REVIT Tavolato.jpg

REVIT Tavolato_NORM.png

Basic_wall_2019.max

Link to comment

You have a 90 degree rotation in the map node in 3dsmax.

I guess that is was caused the confusion about what you see in 3dsmax viewport and Unigine.

The fbx exporter doesnot respect that rotation.

The export works as expected, even without the edit poly modifier.

;)

image.png.60450a7eb3608769dfbebcae33785701.png

Edited by werner.poetzelberger
Link to comment

The fbx imported in 3dsmax was exported from Revit and imported without any changes. To be 100% sure attached the 3dsmax project with the fbx exported from Revit deleting all the elements except the wall. For me importing this model in Unigine without any modifier result in a wrong orientation.

I suppose being both Autodesk products they are reading metadata such as this one in the fbx, that Unigine importer is not reading?

Doing all this check and corrections by hand is really time consuming, I know in the gaming sector is all optimized in this way, but there are any tool able to check in the fbx the presence of data not managed from Unigine? There is any Unigine fbx "validator"?

RVT_Basic_wall_2019.max

Edited by davide445
Link to comment

I guess, that in this case, the texture map specific features (transformations) need to be imported by fbx unigine and translated to the material parameters.

Should be possible I guess?. ;)

 

Link to comment

Saving the fbx in ascii format I discovered the node

	Texture: 1937159942528, "Texture::Map #155", "" {
		Type: "TextureVideoClip"
		Version: 202
		TextureName: "Texture::Map #155"
		Properties70:  {
			P: "Rotation", "Vector", "", "A",0,0,90.0000025044782
			P: "Scaling", "Vector", "", "A",0.181428581476212,0.362857162952423,1
			P: "UVSet", "KString", "", "", "UVChannel_1"
			P: "UseMaterial", "bool", "", "",1

So I suppose with a custom fbx importer will be possible to load also these properties such as the Rotation.

Of course I'm not an fbx format expert, there is any documentation to know what Unigine standard importer is exactly loading?

Basic_wall_ASCII.fbx

Link to comment

Davide,

Quote

Doing all this check and corrections by hand is really time consuming, I know in the gaming sector is all optimized in this way, but there are any tool able to check in the fbx the presence of data not managed from Unigine? There is any Unigine fbx "validator"?

You can try to use FBX Review (app from Autodesk) and check how it renders your model with texture. Internally it uses the same FBX SDK. I've also tried to import your model to the different engines available on market and they are all displaying your FBX the same way (including UNIGINE).

We will see how can we improve the import in the future versions.

Thanks!

  • Like 1

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

I guess, another option would be an importer script to 3dsmax.

Or a 3dsmax script, to pass these transformations e.g. from the map to the UVs.

 

Edited by werner.poetzelberger
Link to comment
4 hours ago, silent said:

Davide,

You can try to use FBX Review (app from Autodesk) and check how it renders your model with texture. Internally it uses the same FBX SDK. I've also tried to import your model to the different engines available on market and they are all displaying your FBX the same way (including UNIGINE).

We will see how can we improve the import in the future versions.

Thanks!

Silent I'm not able to make the texture show up in FBX Review (sorry for that), how is appearing to you? 

Edited by davide445
Link to comment
×
×
  • Create New...