Does there exists any command line tool that helps you import/export obj/fbx files.
I couldn't get the autodesk fbx converter to work.
Any decent package preferably CLI tool out there that does the heavy weight lifting or if there's any three.js converters.
For converting various 3D file formats, you can use assimp (https://github.com/assimp/assimp).
A library to import and export various 3d-model-formats including scene-post-processing to generate missing render data.
It also provides a CLI tool (which you have to build yourself).
However, it states that FBX export is still experimental. But give it a try!
EDIT: I just see, there is also a compiled version by now (if you are working on Windows): https://github.com/assimp/assimp/releases/tag/v4.1.0
You have to look for assimp.exe.
Docs on how to use CLI tool should be in doc/AssimpCmdDoc_Html/AssimpCmdDoc.chm, which is, however, a bit outdated.
Basic usage is:
assimp.exe export input.fbx output.obj [additional parameters]
See assimp help and assimp export --help for additional help.
Related
One feature that I find impressive about the Godot Engine is how it is so lightweight and quick to compile. I realize that Godot exports using its precompiled export templates but I am confused about how it does so. I am working on macOS so that's mostly what I'm curious about. How is Godot able to add code to a precompiled executable. I've spent hours looking through the source code but can't figure it out.
Godot's export templates are compiled binaries that use a specific set of SCons options. They're always built using tools=no which disables editor functionality, and official export templates use either target=release_debug or target=release optimizations (for debug and release export templates respectively).
Note that Godot doesn't compile native code when exporting a project -- it just bundles data, scripts and the export template together. Game data and scripts are packed into a PCK file, which is a custom archive format that can store arbitrary files (without compression). The export template then runs the main script contained in the PCK file.
Scripts are compiled to bytecode when exporting a project in release mode, which speeds up loading times but otherwise doesn't affect the script execution speed.
See this page on compiling binaries for macOS.
I am using rtags which is a C++ source code indexer based on clang. I have been able to play around with it and now I want to actually index the firefox source code. I am pretty new to this stuff and this tool uses cmake to generate a compile_commands.json file to pass over to the program that indexes code.
Is there a way I can generate a the compile_commands.json file for the firefox source code that provides the exact compilation line for each translation unit inside the firefox source?
You can generate compile_commands.json by
mozilla_cnetral/mach build-backend -b CompileDB
In my environment(Ubuntu 16.04), it was created at mozilla_cnetral/obj-x86_64-pc-linux-gnu/.
Reference:
https://developer.mozilla.org/en-US/docs/Developer_Guide/Editor_Configuration#rtags_(LLVMClang-based_Code_Indexing)
Not sure if I follow the part "Is there a way I can generate a the compile_commands.json file for the firefox source code that provides the exact compilation line for each translation unit inside the firefox source?". But I can offer simply that you can generate a compile_commands.json file from a make-based system using the bear utility (which I obtained from my package manager: brew). After a make clean, I do 'bear --append make' and it traces the make build process and produces the compile_commands.json. More can be learned here: https://vxlabs.com/2016/04/11/step-by-step-guide-to-c-navigation-and-completion-with-emacs-and-the-clang-based-rtags/
As the article referenced implies, my motivation was to be able to use the wonderful rtag system inside Emacs. Hope this helps a bit.
Looking at Three.js's build script, I see they use Google Closure compiler. I am having a small script utilizing Three.js. Can I use Google Closure to compile the script with Three.js as a library (instead of having Three.min.js preambled or included in an HTML tag) so the final output javascript is much smaller.
I'm asking this because I don't see any goog.provide in Three.js source.
It looks like the build command does not specify a compilation level. That means it is using the default SIMPLE_OPTIMIZATIONS.
If that is indeed true, then no, you probably cannot include the source as a library as it is not compatible with ADVANCED_OPTIMIZATIONS.
One way to do this is to prepend the three.js script to the compiler output using whatever shell or build system you are using.
I'm using Direct3D 11 and Visual Studio 2012.
I've read that VS2012 can automatically compile FBX files during the build phase, similar to HLSL files. I haven't been able to find any documentation on how to do this, though. What build action do I set for the FBX files?
Also, what function or functions should I look up on MSDN / Google that relate to loading the compiled FBX file? A tutorial or stackoverflow link, etc, will work. I just have nothing to go on at the moment, so I don't even know what to Google for. My searches haven't turned up anything.
I'm trying to transition from rendering my manually defined cube to rendering a cube, or any model, loaded from an external model file.
You can add build customizations to read FBX files into the asset pipeline, but if you want to load them at runtime, need to build the vertex and index buffers yourself. Here is the relevant MSDN page on loading and using 3D models, and it reads:
Direct3D 11 does not provide functions for creating resources from 3-D
models. Instead, you have to write code that reads the 3-D model file
and creates vertex and index buffers that represent the 3-D model and
any resources that the model requires—for example, textures or
shaders.
Does anybody know of a library or a piece of code that can read EMF (Enhanced Metafiles). Ideally it would convert an EMF to a list of drawing commands and objects?
The Apache Image Loader Framework (Java) can read EMF file and convert then to SVG, it can also read WMF using 3rd party plugin.
What language are you working in ?
You might look at our MetaDraw ( available as OCX or .NET Winforms component )
This will load EMF files and allow you to cycle through the elements ( lines, shapes, text ). You can then identify the parameters ( coordinates, line thickness, colors, etc) More details at www.MetaDraw.com
LibreOffice can do it. There is also a python utility called unoconv which will do it (using installed LibreOffice libraries). You could look at those for some hints on how it's done, since they're open source.
Wikipedia article on Windows Metafile has a lot of relevant information on EMF. Check external links for libraries and format specification.