I want to import a blender file using Assimp (in c#), all classic format like .obj works.
I saw here that the better way to do it is to convert the blender file in one more usual, like obj.
You need to open your file .blend and export it to .3ds, .obj etc.
How do you load Blender files using Assimp?
But my question is how can I convert it, I searched in Assimp Documentation, there's nothing for convert and I can't import blender file so I can't export it in another kind.
I search for another library but I also find nothing.
You can run Blender via command line, allowing it to run a python script, to open .blend, then export to another format, then run that through a custom assimp process you were trying to do. Not sure your target format, but you could also just have blender go right to that instead of assimp.
This is something semi-similar, but you will need to connect the dots.
http://indygamedev.com/blender/automating-fbx-model-export-process/
Use Blender 2.79 (not 8.x).
Pack all textures, then save the *.blend to your data directory.
Then unpack all images which will put them in "textures*.*".
Resave the file after the Unpack -
Assimp should now see your textures.
Related
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:)
I would like to import a file ".step" to use it with unity 2018.3.1f1 but I don't know how to do it
I didn't found any topic.
Any one could help me please ?
.step is a cad file, right? This isn't supported by unity out of the box. You may need to buy an asset store plugin to open cad files, or roll your own importer. You would need to read up on the file format and build a new mesh based on interpretation of the file format.
Documentation on building a mesh from scratch: https://docs.unity3d.com/Manual/GeneratingMeshGeometryProcedurally.html
I am quite new in game development with Unity and was wondering how the "export game" function of unity works. I not yet used this function in unity, but I've read that it will generate some .exe file from your complete game. I also read that it will create a "data" folder or something like that.
My question is: What exactly is stored in this "data" folder? And how can I write logic to save my own files (e.g. files which contain save states, settings, configurations, etc.) in some file inside this directory (which is then shipped with the complete game / created in the local game directory after the user e.g. saved his game the first time? Can i e.g. save those files in a relative path (e.g. ./MyGame/data/savegames)?
And which types of files can I create? Text / Binary? Or can I even use some relational Database (some small one like HSQLDB)?
And how are things like models, sounds, animations and other assets treated? Are they all packaged within the .exe file which is my complete game? Or do i have some seperate folders with the shipped game for them?
Thank you!
The data folder (named the same as the exe file, but _Data on the end instead of .exe, which can be safely renamed to just Data) contains all of the dlls that actually run the game (even a blank Unity project will have them! The unity engine itself compiles to several dlls) as well as any Resources you might have (tip: stop using resources and use Asset Bundles instead).
Omitting this folder would be very bad indeed!
As for reading/writing other data from the hard disk (which is not possible on all platforms--looking at you web deployment) I would recommend using your own folder, eg. RuntimeData which could contain external audio, image, or video files as well as mutable data such as save games or screenshots. Pretty much anything you'd be ok with your users modifying without seriously breaking stuff (modding is "in" these days).
As for the types of file: well, that's up to you, really! Creating text files (of any extension: xml, html, dat, qqq...) is very easy. Images tend to be done through a 3rd party script (do you really want to write your own JPG converter? Video, same thing). You can also create binary files following a format of your own choosing. The only difficulty is writing the serializer and deserializer for the data, which would scale in difficulty as the complexity of the data scales.
You have full file system access* so you can realistically read or write anywhere. This is C# we're talking about. But with great power comes great responsibility.
*Note: Mobile devices heavily frown on that sort of thing and will deny access to folders outside the one explicitly given to that application.
I asked a similair question earilier, but it was not generic enough, so here's another attempt.
I currently have a whole bunch of 3d .obj and .jpg files which I want to display in my WPF application. However, I want to do this at runtime, so converting them using Blend is not an option.
I don't mind having to convert to other types of 3d files, as long as this can be done at runtime (either programmaticly or by using a command line tool).
So I guess my question is: Is there any way to import a 3d file in WPF at runtime?
Thanks!
I don't think there's a built in way. You'll most likely have to write an importer for your own specific needs. You can find some file format information here> http://en.wikipedia.org/wiki/Wavefront_.obj_file
Thanks to #MattDavey
I managed to get The HelixToolkit (http://helixtoolkit.codeplex.com/) to work and got what I wanted using the ModelImporter.Load method.
I am planning on building a 2D game library for XNA, and one of the components I want to include is a simple text drawer for debug purposes. Now, to draw text with SpriteBatch you need a .spritefont file, which is an xml format file, and these seem to need to compile into a separate folder. I would prefer not to have to copy that around with the dll, so here is my question:
can i build some sort of text renderer for XNA that
A: does not require me to carry around external files with the dll (if you can embed the sprite font into a dll then that works) and
B: does not force me to rewrite a fair amount of underlying (is it managed directx? a different part of xna?) code that makes the SpriteBatch.DrawString code work.
Could you not just require that a SpriteFont be passed into your library, so that whoever is using the library has to supply that component? That would seem to be the best solution, since then they could use whatever font they wanted. Or you could write in a component that generates the spritefont xml file based on a given font name, because it's not all that complicated of a file. Disregard. I forgot that XNA compiles its resources.
You can precompile the project and then grab the xnb file for the spritefont. Then add the file to the project Content folder as a content file. It should then be deployed together with the library. However u will need to build a separate xnb file for each platform you wish to support (xbox360, windows, zune) and deploy the correct file.
Or why don't u just create a XNA Content Library project?