I'm now reading this example. I see there is one FBX file and a few texture files in the content project, and that in the code you can choose which "take" to play. In the code it is "Take_001". Please tell me: When I create and animate my own 3D model in 3DS Max, how can I define those takes? plus, are any configurations need to be made when exporting FBX from 3DS Max to XNA?
You don't. The model artist does. In his modeling software he can name every bone or animation sequence, and then you can activate it from code.
The built-in FBX pipeline in XNA supports animation only partially, but it doesn't need any pre-configuration. So does the pipeline you linked to.
Related
I have the following problem:
I have a 3D engine that has their scenes, but they are not compatible with Unity.
But I have the metadata of this another 3D engine about everything on the scene, like: position, lights, models, light probes, physics, cameras etc...
I'd like to recreate this scene on Unity, but programmatically doing a parser onto this metadata I have, but not using the Unity Editor. (In the end I would have a .scene file and some created prefabs)
But in the same time I'd like to be able to load this created scene (from the metadata) inside the the Unity Editor (since I created it for Unity now)
I would like to have all the models and things created as prefabs to be able to use addressable in the future.
Is this feasible?
Maybe is there a way to create UnityYAML scene files?
It looks like this would sort of be a 2 step process:
Parse your existing data structure and create them as GameObjects/Components in a scene. You should be able to do this with a regular ol' script attached to a regular GameObject. For me, I would call it something like "CustomSceneLoader". On start, read your data file, parse it, and instantiate GameObjects with that data.
From there, it looks like you can use the PrefabUtility to create new Prefabs based on the GameObjects in the scene. Maybe as part of step 1 you attach a custom Component that adds a button to the inspector that would create a Prefab from the GameObject.
For example:
PrefabUtility.SaveAsPrefabAssetAndConnect(gameObject, localPath, InteractionMode.UserAction, out prefabSuccess);
As Retired Ninja mentions in the comments
UnityYAML is just based on YAML which is a raw text file format (similar to JSON)
=> Of course in theory you can generate such a file and all your content prefab and .meta files and GUIDs from scratch completely without Unity.
Which basically would mean you have to replicate this entire part of the Unity Editor.
Is this feasible?
In theory yes, but the question is, is this really worth the time and struggle? I would doubt that.
Instead depending on your exact file formats I would rather
Search for any plugins / external libraries that maybe already exist for this file format
If really non exists you again have multiple options
From your other engine which already understands your existing file formats export the content into a format Unity understands built-in
For example
Export all meshes as FBX (-> already supports embedded materials, textures and hierarchy)
Export the hierarchy e.g. as a JSON or whatever text file
Then in Unity reconstruct the scene according to those
Implement your own custom Scripted Importer which can directly parse your original file(s) and convert it(them) into a scene directly within Unity.
Currently, I'm trying to load an IFC file using an AR toolkit from Autodesk forge. Small files like 10-20MB are loading without any issues, But large files like Above 50 MB are not loading.
In the console, it is showing that it's loaded but in the scene, it's not loaded.
For larger scenes, I recommend switching to a glTF pipeline, as a way of getting BIM models from Forge into Unity.
First, use https://github.com/petrbroz/forge-convert-utils command line tool, to pull your SVF file, and convert it a glTF file.
Then, use glTFast to load that glTF file into Unity. https://github.com/atteneder/glTFast
For extreme performance, use 'gltfpack' to compress and optimize your glTF's (2 draw calls, 6:1 compression ratio )... using gltf's new ext_MeshOpt extension. https://github.com/zeux/meshoptimizer/blob/master/gltf/README.md
I've seen pretty amazing results. (in the order of 40Million triangle scene's, with a simple progressive rendering technique)
ext_MeshOpt reference: https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Vendor/EXT_meshopt_compression/README.md
I need to do a 3d project in WPF in my school, I wanted to do a very complex animation. So I checked out the ab3d software, where you can export animation to 3ds file and convert them. But I try again and again to export 3ds file from blender with animation, I keyframed it, and it doesn't work. but their example files are working, and when I import them to blender, no animation exits.
Can someone help me understand how I export 3d animation to 3ds file?
here are some pics for with animation and without.
links to the files: Without With
(I want to mention that when I import the file back to blender, no animation)
without:
with:
I know a long time has passed but I had figured it out.
It appears to be that blender 3ds exporter for some reason can't export animation in 3ds format.
Therefore to solve it you need to transfer your model to other programs, like 3ds,
and only their animate, then export your model as a 3ds file.
Works like a charm:)
Using Model derivative API I am able to get geometric properties of 3d dwg file but for 2d dwg I am facing the issue(Unrecoverable exit code from extractor: -1073741831) on extracting geometric properties.
I also understand that model derivative API doesn't provide a support for extracting 2d geometries.
Is any other way to extract geometry of 2d file using programming API(c#)?
EDIT
I have added ObjectTree JSON file and POST URL of "Extract Geometry for Selected Objects into an OBJ File" in the following GitHub link.
https://github.com/Jothipandiyan-jp1/Autodesk
From the error, it seems that your 2D drawing is somehow broken, or not uploaded right. Or is it a vertical file, like Plant 3D or Map 3D?
The Model Derivative should extract the 2D View, you can try the file on A360 Viewer or via API at this sample (C# source).
EDIT
From the comments, it seems you are trying to extract the .obj from a single objectId in the 2D DWG. This should not trigger errors, but it may return empty file as the OBJ format is intended for 3D shapes. Can you update your question with the full POST job used on your code? Make sure the modelGuid and objectIds parameters are correct.
Using Unity3D and C# I am attempting to display a 3d version of a real world location. Inside my Unity3D app, the user will specify the GPS coordinates of a location, then my app will have to generate a 3d plane(anything doesn't have to be a plane) of that location. The plane will show a 500 metre by 500 metre 3d snapshot of that location.
How would you suggest I achieve this in Unity3D? What methodology would you use to achieve this?
NOTE: I understand that this is a very difficult endevour(to render real world locations dynamically in Unity3d) so I expect to perform many actions to achieve this. I just don't know of all the technologies out there and which would be best for my needs
For example:
Suggested methodology 1:
Prompt user to specify GPS coords
Use Google earth API and HTTP to programmatically obtain a .khm file
describing that location(Not sure if
google earth provides that capability
does it?)
Unzip the .khm so I have the .dae file
Convert that file to a .3ds file using ??? third party converter(is
there a converter that exists?)
Import .3ds into Unity3D at runtime as a plane(is this possible)?
Suggested methodology 2:
Prompt user to specify GPS coords
Use Google earth API and HTTP to programmatically obtain a .khm file
describing that location(Not sure if
google earth provides that capability
does it?)
Unzip the .khm so I have the .dae file
Parse .dae file using my own C# parser I will write(do you think its
possible to write a .dae parser that
can parse the .dae into an array of
Vector3 that describe the height map
of that location?)
Dynamically create a plane in Unity3D and populate it with my
array/list of Vector3 points(is it
possible to create a plane this way?)
Maybe I am meant to create a mesh
instead of a plane?
Can you think of any other ways I could render a real world 3d environment in Unity3D?
No service available has a detailed 3d map of an area given gps coordinates. Google has a super simple height map that they draw and then map their aerial pictures onto, but even if you could get programmatic access to that it would look terrible if you were at street level. If you're okay with a horrid level of detail (like you're going to be viewing this from high up or something) maybe it would be feasible, but not as any kind of first person street level experience.