Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FBX Converter now exports in a ObjectLoader compatible format #9326

Closed

Commits on Jul 12, 2016

  1. Configuration menu
    Copy the full SHA
    c78d687 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0af2999 View commit details
    Browse the repository at this point in the history
  3. THREE.Reference - so objects can refer to objects not yet loaded.

    This is also an optimisation for scenes where child objects may
    belong to multiple parents e.g. Several MultiMaterial may share the
    same child Materials.
    Benjamin-Dobell committed Jul 12, 2016
    Configuration menu
    Copy the full SHA
    8a056c1 View commit details
    Browse the repository at this point in the history
  4. Updated ObjectLoader to support materials referring to each other.

    ObjectLoader looks for Reference objects in materials and resolves
    them correctly. Cyclic material reference detection is included so
    infinite loops will not occur.
    Benjamin-Dobell committed Jul 12, 2016
    Configuration menu
    Copy the full SHA
    10d6ba5 View commit details
    Browse the repository at this point in the history
  5. FBX converter now exports to an ObjectLoader compatible format.

    In addition to making the output ObjectLoader compatible, I've also added or
    improved a bunch of functionality:
    
      - Fixed oddity whereby textures were output to a 'maps/' directory but only
        referenced by filename. The relative path is now stored in JSON.
    
      - Added texture filename collision detection which aborts conversion when two
        textures would be copied over each other. The abortion behavior can be
        replaced with a printed warning by specifying --ignore-texture-collisions
        (-i).
    
      - Textures can now be saved to directories other than 'maps/' by specifying
        --texture-output-dir (-o). This path is relative to the output JSON file and
        file references in the JSON are updated accordingly.
    
      - Materials whose textures contain a non-empty alpha channel now automatically
        have 'transparent' set to true (Requires ImageMagick). This can be disabled
        by specifying --no-transparency-detection (-a).
    
      - Non web compatible textures are now automatically converted to PNG or JPEG
        files, the former if they contain alpha (Requires ImageMagick). If
        ImageMagick is not available a warning is reported and we gracefully fall
        back to the old behavior.
    
      - Existing --pretty-print (-p) behavior has now been extended to print JSON
        properties in the order 'metadata', 'type', 'uuid', <other keys>, 'data',
        'children'.
    
      - Redirected errors and warnings to stderr rather than printing to stdout.
    
      - Fixed FBX -> three.js texture bindings.
    
      - Added support for LineSegments.
    
      - Added duplicate geometry detection functionality enabled by specifying
        --optimize-geometry (-g). This just does a brute force search for identical
        geometry and removes the duplicates, replacing node geometry references
        accordingly.
    
    Also performed general refactoring which included:
    
      - Deleted lots of dead and commented-out code.
    
      - Made method naming consistent (using underscores).
    
      - Deleted unused/pointless variables.
    
      - Replaced manual path string manipulation with native python methods (which
        fixed a couple of obscure bugs).
    
    The following functionality has been removed:
    
      - Scene flattening, --flatten-scene (-f), has been removed as it made a heap
        of assumptions and doesn't really make sense in a *converter*. The task is
        better performed in a 3D modelling package, or even in three.js itself after
        a Scene has been loaded.
    Benjamin-Dobell committed Jul 12, 2016
    Configuration menu
    Copy the full SHA
    2a65e5f View commit details
    Browse the repository at this point in the history