Three.js - FBX Import or Online Conversion - sdk

I know the sites studio.verold.com and sketchfab.com and p3d.in they have found a way to import .fbx.
Have anyone a hint how they did this ?
I thought 1st it must todo with the autodesk fbx sdk and python.
https://github.com/mrdoob/three.js/tree/master/utils/converters/fbx
But i ended up in a offline conversion .
I am thankful for any help

You can always use http://Clara.io to do your conversion from FBX to ThreeJS format. :)
-ben

You can also try the Assimp commandline converter. Three.js now has a parser for the binary Assimp format. This is how we do it at Virtulous, and it's working pretty well for us. If you're interested in efficiency, you can create your own Assimp exporter module, and only export the data channels you need.

Related

Load glTF model into RealityKit scene?

I'd like to load a glTF file generated by another program into RealityKit. I get the impression that the only way to load models into RealityKit is via USD or Reality files.
Anyone know a way to get some other model into RealityKit? Not necessarily as a file -- I'd be happy to be able to generate a MeshResource and array of Materials myself and load them in that way.
Reality Converter
Apple discussed this in the WWDC20 video "The artist’s AR toolkit".(link)
They show how to convert FBX, OBJ, USD and GLTF files to USDZs for use in Reality Composer.
Reality Converter is still in beta and needs to be downloaded from the Apple Developer website. I used it and it is quite nice.
There is also other tools you can use on the command line if this is more your thing. At WWDC 2019, Apple announced the USDZ Tools or also called USD Python Tools.
USDZ Tools is a pre-compiled Python library containing binaries of Pixar’s USD library for macOS. This is the link. You will need to download and install the library.
I would give a try to the Reality Converter first. I think it is here to stay since probably Apple has no intention to add support for glTF files in Reality Composer in the future, since they love USBZ!
I ended up using GLTFKit, an open source library by Warren Moore. It does exactly what I want -- lets me load a glTF file into SceneKit/RealityKit.
https://github.com/warrenm/GLTFKit
Alas, as you said, at the moment the only way to load your .gltf model in RealityKit scene – is firstly to convert it into .usdz model via Xcode command line tools. Also in RealityKit you can use .reality format (use it for a much faster uploading time) and .rcproject format that can be exported from Reality Composer app. These two file formats allow you store not only PBR shaders and animation but also a dynamics.
Please, read this post for further details.

Render collada [.dae] file in iOS

I need to render 3D model which is of type .dae [collada] in iOS,
I have searched and found couple of links
Wavefront
Molecules
openscenegraph
iSGL3D
but I am not sure whether they will support .dae files.
Is there any framework which Collada is giving for iOS developer?
so that it can be very reliable.
Could anyone please help me with this.
Please note : I am new to 3D rendering,can we render .dae files directly in iOS or do we need to convert to any other format ?
As I was searching in S.O I got this link but that question is not answered.
Thank you,
Try to check out this engine NinevehGL is in beta, but it has awesome capabilities and it supports a lot of formats.
Unfortunately Apple didn't released Scenekit for iOS.
You can also render using Mitsuba
http://www.mitsuba-renderer.org/download.html

jpeg2000 on ios app

Has anyone had luck converting and using jpeg2000 on the ios? I am writing and inventory app and would love to go with a jpeg2000 file type if I can figure out how to get the phone to support it.
I have seen that there is a nice project for webp - https://github.com/carsonmcdonald/WebP-iOS-example - which seems like it would also work but I think the jpeg2000 results are even better.
Just trying to eval options. Thx in advance
We used JPEG 2000 for my last project (Spot.app)
I downloaded the official open-source JPEG 2000 codec source from here: http://www.openjpeg.org/index.php?menu=download
Build it into a static library and voila.
Here's some sample code I created: https://gist.github.com/1861465
Image IO has nice image conversion functions that eliminate the need for 3rd party code. See more here: How do I convert UIImage to J2K (JPEG2000) in iOS?
No need to bring in the JPEG 2000 project.

How to Export SolidWorks file to use in WebGL?

Is there a way to export or convert a SolidWorks file to be used in any way for WebGL?
Not sure where you want to go with this, but http://showwebgl.com/ (see http://plopbyte.net/2011/04/showwebgl/ for a brief description) will upload and display models in a variety of formats, and uses a WebGL framework called ogs.js. So you just need to convert your SolidWorks file to one of those.
A lot of WebGL frameworks accept Collada format. If you can't track these down, let me know.
Here is a Solidworks plugin which can export Solidworks models to a lightweight visualization format .pyd. This site has a webgl based pyd viewer to view published pyd file.
You can use the Collada export from the SolidWorks labs page. But you should consider simplifying your models before exporting them to Collada with a tool like Swap3D. This will decrease filesize dramatically. Export to Collada works much better when exporting a part instead of an assembly. So you should always consider saving an assembly as part.

Import DirectX .X into Blender

I spent some time now to find "tools" to work and make 3D applications with. For some reason I will use XNA 4.0. This can import .X or .FBX files for models - perhaps many more, but I do not know of this yet. Both format I want to use as text-based, not binary. I found .X making less trash text so I tried to look for free, but useful tool to edit .X files. After many downloaded trash software I found Blender to be "just fine" for my needs.
My problem was that even if Blender can export to .X and even .FBX, it can not import from these formats. I was looking for plugin for this goal, but none I have found so far, and after too many "visited links" I just lost the line, so I thought I will ask around here, if anyone knows a good way to import .X into Blender...
or
make XNA work with other formats.
suggest a good 3d editing program, that can edit models imported from .X or .FBX (text) and can export into one of these formats.
I used search, and am not retarded - just tried of looking-and-looking.. so.. any good idea or link is welcome. Thanks in advance.
Edit: to make it clear: my goal is to have a 3d modell editor, that can be used to edit .X (or .FBX) in text format, so I can work with XNA without converting from or into anything else.
here is an importer for Blender 2.67 :
https://github.com/littleneo/directX_blender
it currently supports x in ascii format, imports verts, faces, uv and vertices weights (multimesh support)
there's a bit of support for parenting and armatures but it's still pending/messy.
goals of the author, which is me, are to import anything from x, and supports binary format*.
[* but I need feedback, hughs, spare time, and complex testfiles to do so ;) ]
Use this program to convert .X files to a format that Blender can import, modify it and export as a .X file.
Ok, so found out that Blender 2.49 just does the trick: can import .X and export into .X too; uses text only. Newest Blender (2.57 or so) is unable to import .X - but will export into.
So when you go for using Blender download the "older versions".
Edit: you can get previous versions here:
http://download.blender.org/release/
Edit: you can find usefull info from .X file format here: http://paulbourke.net/dataformats/directx/
Best solution found so far is UU3D (Ultimate Unwrap 3D), downside is that it is not free, but does the trick. For more info see this:
https://gamedev.stackexchange.com/questions/13399/tool-for-editing-x
Edit: Blender can Import .X.. not animations tho' and only one mesh. Up to version 2.49b it can export with animations. So better to write an own plugin, because the shipped one is crap.
Ok, so found out that Blender 2.49 just does the trick: can import .X and export into .X too; uses text only. Newest Blender (2.57 or so) is unable to import .X - but will export into.
So when you go for using Blender download the "older versions".
Edit: you can get previous versions here: http://download.blender.org/release/
Edit: you can find usefull info from .X file format here: http://paulbourke.net/dataformats/directx/
You can use Alin's DirectX Exporter for 3ds Max, It supports standard and DirectX shader materials, use it to export your scene data as DirectX (.x) file, then import it into Blender.
download it's free version

Resources