Git Product home page Git Product logo

Comments (19)

noalak avatar noalak commented on August 17, 2024 1

Last version does not fix normal flip issue encountered in Cesium.

This is something we are aware of and will be fixed soon. Stay tunned, this issue will be pinged when a pull request fixes it.

from exporters.

deltakosh avatar deltakosh commented on August 17, 2024

If fbx exporter has the same issue, I'm afraid this is not something we can tackle at exporter level.
Support for 3dsmax 2018 is coming soon, will see if it helps

from exporters.

noalak avatar noalak commented on August 17, 2024

Hi tkazik,

No miracle solution :(
You can fix transform issue but animations are deleted in the process.

Here is the pipeline:

  • select all nodes, delete their animations
  • break the parenty relation between 'main_gear_leg_rh', 'main_gear_leg_lh', 'nose_leg' and their children (those relations seem to cause some issues)
  • select all nodes, in the Tool tab of the Command panel choose 'Reset XForm'. Transformations should remain unchanged.
  • restore parenty relation (if required)
  • flip normals of some meshes (nacelles around engines, wings...)
  • export

from exporters.

tkazik avatar tkazik commented on August 17, 2024

Thank you for your quick reply, deltakosh and noalak!
@noalak Good to know, there is a fix available, although it includes a bit of work.
The parenty relation should not pose any problems thereafter, right? Just curious: How can you tell that these seem to cause issues?
@deltakosh I have quite some hope, that the exporter of 2018 might have the fix: The .fbx exporter of 2018 seems to be able to handle the export correctly:
fbx_2017_vs_2018
The gltf exported by 3ds max looks surprisingly similar the the exported fbx in 2017.
Also being curious: Is the exporter using the fbx exporter 'under the hood'?

Here you find the fbx, if needed:
FBX_2017_vs_2018.zip

from exporters.

noalak avatar noalak commented on August 17, 2024

Ignoring step 2 results in wheels being slided down for an unknown reason after ResetXForm.
Once ResetXForm is done, feel free to restore hierarchy as it was to ease animation process or let them unattached.

from exporters.

deltakosh avatar deltakosh commented on August 17, 2024

I'm gonna try to compile the max2018 version today

from exporters.

deltakosh avatar deltakosh commented on August 17, 2024

(And btw we are not using FBX exporter :))

from exporters.

tkazik avatar tkazik commented on August 17, 2024

Thanks, awesome! Looking forward to it and keep my fingers crossed :)

from exporters.

YangAndI avatar YangAndI commented on August 17, 2024

I need your help,the y-axis and z-axis is swap when i export the model from 3dsMAX.Thanks!

from exporters.

deltakosh avatar deltakosh commented on August 17, 2024

Please use the forum for questions :)

from exporters.

tkazik avatar tkazik commented on August 17, 2024

Short update and one (hopefully last) question:

We fixed our model according the the "no miracle solution" by @noalak, which was more work for our designer than expected. This seems to be our error/issue/mistake, as described on the 3ds max page.

The corrected model now exports nicely to gltf/glb and is displayed perfectly in these two viewers:

https://gltf-viewer.donmccurdy.com
http://sandbox.babylonjs.com

However, one viewer is still having troubles and unfortunately it is exactly this viewer that we need, as we are working with Cesium:

https://www.virtualgis.io/gltfviewer

Now my question: Is the model ok? Do you discover any flaws in it? The model looks flipped, as though the normals are inverted. Or do you think it is rather an issue with the viewer?

The files of the model are here.

Thank you very much for your help!

PS: Thank you very much for this feature...very helpful and works perfectly!

from exporters.

deltakosh avatar deltakosh commented on August 17, 2024

Hello!
you can try to run the model inside the gltf validator: https://github.com/KhronosGroup/glTF-Validator

from exporters.

YangAndI avatar YangAndI commented on August 17, 2024

What is "Autodesk.Max.IGameConversionManager.CoordSystem.D3dā€œ this? And why the W = -meshRotation.W? And why do these "rotation = new float[] { 0, (float)Math.PI, 0 }, scaling = new float[] { 1, 1, -1 }"

from exporters.

Selmar avatar Selmar commented on August 17, 2024

The rotation and negative scale is to convert from a left-handed to a right-handed coordinate system.

It's definitely possible to convert all output data instead of applying a root matrix, but the root matrix was easier, I assume.

I think the conversionmanager is leftover code from an idea to do the conversion properly.

from exporters.

noalak avatar noalak commented on August 17, 2024

I can't imagine the disappointment of your graphic designer when he saw issues are still there.

The inverted normal issue is related to this gltf feature.
BabylonJS and ThreeJS handle it correctly while Cesium doesn't.

The exporter currently inverse Y and Z axis by setting a negative scale, thus negative determinant.
We are planning to change the way the inversion is done (at object level rather than global) as it causes other flip issues with rigged meshes.

For now, find attached the binaries for the 3ds max exporter without the normal flip.

Stay tunned for exporter update. In the meantime, keep saying to your designer that everything is gonna be all right.

@Selmar ConversionManager is a feature of max api and inverse Y and Z at object level. Indeed, doing it at global level when exporting to gltf was easier, at that time :)

from exporters.

tkazik avatar tkazik commented on August 17, 2024

Perfect @noalak, thank you very much for the binaries, now everything is fine!
I reported this issue also in the Cesium forum, where I got an answer that might help you:

https://groups.google.com/forum/#!topic/cesium-dev/Ktc9vwJiiTU

from exporters.

deltakosh avatar deltakosh commented on August 17, 2024

Good catch..Perhaps we are exporting the faces with the wrong winding order

from exporters.

tkazik avatar tkazik commented on August 17, 2024

The new exporter version 0.36 combined together with 3ds max 2018 also seems to invert some meshes, see:
new_flipped_meshes
The binaries without normal flip version 0.34 and 3ds max 2017 work fine on the model.
Any ideas why the new version is not running poperly?
Thx!

PS: Also the general normal flip issue is still present...

from exporters.

tkazik avatar tkazik commented on August 17, 2024

Perfect, thank you very much! Now Cesium displays the model correctly.
Some surfaces are still inverted, but I guess that originates from [this issue].(#90)

from exporters.

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.