How to import mdl to blender

How to import mdl to blender

khalv/mdl-exporter

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Warcraft MDL exporter for Blender By Kalle Halvarsson

Now also supports importing!

This plugin tries to approximate the functionality of the Wc3 Art Tools exporter for 3ds Max. The ambition has been to support multiple ways of achieving the same result, so that users can set up their scene in whatever way feels most intuitive. There are, however, some implementation details you might need to know before using this plugin.

This exporter comes with a custom material editor which will attach extra MDL properties to the materials in your file. A material consists of multiple material layers, which will be rendered from top to bottom, and blended together using the specified filter mode. Some filter modes support an additional alpha multiplier, which can be animated. To add a texture animation, create a mapping node in the node graph with the same name as your layer, and animate its properties.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

Previously, there was a fallback solution which would attempt to create a material based on your node setup. This has now been deprecated.

A «geoset» in an MDL file refers to a patch of geometry sharing the same material, vertex colors, and visibility (the latter two are stored in data blocks known as «geoset animations»). As such, assigning multiple materials onto the same object will cause it to be split into as many geosets. Geoset animations are generated by animating the render visibility of an object (see below) or by changing or animating its object color, which translates into vertex colors (vertex colors are treated as a global tint for the geoset). You can also add vertex colors to a material by adding an RGB input node anywhere in the node graph and naming it «VertexColor». This is convenient when have many small objects with the same material which should share tint.

A current issue is that auto-created root bones will not be combined even if they share the same geosets/geoset anims, to solve this it’s good practice to always parent all your geosets to a manually created root bone. This will help reduce the amount of geosets and hence improve render performance (in GPU terms, each geoset generates a draw call).

⚠️ IMPORTANT: When exporting animations, the bone transforms at frame 0 will be used as the reference pose and all animations will be converted to be relative to this. For this reason, make sure to add keyframes for all of your animation curves on the first frame of your animation timeline.

To mark sequences, create timeline markers (using the M key while hovering over the timeline) and rename them (using CTRL+M) to the name of your animation. Each sequence requires both a start and an end key with the same name. This approach was chosen over using acitons because it was deemed to be more intuitive and similar to how the process works in Wc3 Art Tools. If no sequence exists, a default one will be added on export.

There is also a button below the sequence list where you can more conveniently create sequences. This operator will generate timeline markers at the specified keyframes, and you are also able to specify the looping and rarity properties.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

Adding a «Cycles» modifier to an f-curve will create a global sequence around it. Global sequences always start from frame 0. It is enough that one of the f-curves in a group has a modifier for a global sequence to be created.

At the moment, IK controllers are only supported through resampling the entire animation into keyframes. This produces very dense data, so for these cases there is the option of applying a keyframe reduction algorithm to your animations based on a tolerance value. Three things to note about this feature:

Bones, lights and attachment points all support billboarding. A billboarding settings panel will automatically appear in the «object» properties tab when a relevant object is selected. You can constrain billboarding to a certain axis by checking the «Billboard Lock X/Y/Z» checkboxes respectively.

To create an attachment point, simply create an empty object and give it a name which ends with the word «Ref». For example, «Overhead Ref» will produce an attachment point called «Overhead». «Sprite First», «Sprite Second», etc. specify where flames will appear when a mechanical unit/structure is damaged.

There is a helper operator for creating event objects which you can find by pressing the spacebar and searching for «Add MDL event track». These will give you fields where you can select the exact type and ID name from a list of names. There is also an option to search through the list.

Collision shapes in Warcraft are used primarily to define the selectable area of a unit, or the walkable area of a destructable. You can create theese by adding any geometric shape and naming it «CollisionBox» or «CollisionSphere». The exporter will use the bounds to calculate a radius or min/max points automatically. Note that collision boxes are always saved as axis aligned. There is a helper operator for quickly creating collision shapes named «Add MDL Collison Shape».

Cameras are exported as-is.

Create a light and go to the data tab where you will find a panel called «MDL Light Settings». «Attenuation Start» and «Attenuation End» control the falloff of the light’s intensity. Most properties can be animated, including color.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

NEW! MDL Importer

This plugin is now also capable of importing MDL files. A major benefit of this is that it effectively works as reference for how to replicate the behaviour of native models when making your own.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

Geosets with more than one matrix group will be imported as a skinned mesh, and all bones that are parents of a skinned bone will be added to an armature. There will only ever be one armature created. Bones will be oriented towards their child, unless there is more than one child, in which case it will orient towards their average position. It’s very hard to replicate the original bone structure, but this provides good results in most cases.

How to import mdl to blender

You use Crowbar ro decompile the model to its Valve model source format (SMD) and use the Blender Plugin called Blender Source tools to import the SMD files into Blender.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

You use Crowbar ro decompile the model to its Valve model source format (SMD) and use the Blender Plugin called Blender Source tools to import the SMD files into Blender.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

You use Crowbar ro decompile the model to its Valve model source format (SMD) and use the Blender Plugin called Blender Source tools to import the SMD files into Blender.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

VTX is a model file not a Material file, you’re looking in the wrong folder path if you are looking for VTFs.

First, Fuse doesn’t support it..

The way you would get those files into Fuse is by decompiling the model to SMD source format, importing it into a 3D editor like Blender, Maya or 3DSMax. THEN exporting that to an OBJ file. You would also have to ensure that the UV Maps for the model you want to get into FUSE meet the FUSE UV requirements.

If you don’t, it ain’t going into FUSE.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

VTX is a model file not a Material file, you’re looking in the wrong folder path if you are looking for VTFs.

First, Fuse doesn’t support it..

The way you would get those files into Fuse is by decompiling the model to SMD source format, importing it into a 3D editor like Blender, Maya or 3DSMax. THEN exporting that to an OBJ file. You would also have to ensure that the UV Maps for the model you want to get into FUSE meet the FUSE UV requirements.

If you don’t, it ain’t going into FUSE.

Blender FSX MDL

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

Marginal

Here are some scripts to import and export FSX MDL models to and from Blender. Basic documentation is included.

Please let me know if you have any questions, problems or if you’re missing a feature
(or if you can help me understand how animations are encoded in an MDL file )

Attachments

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

n4gix

While I’m certain that some will applaud the export capabilities, be prepared for some possible grief over the importer.

I cannot for the life of me imagine why any modeler would need to «import» their compiled model back into Blender (or any other 3d modeling program for that matter).

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

empeck

I’m keeping fingers crossed for progress on the exporter. We do need a new freeware solution to make FSX compatible aircrafts and sceneries.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

Administrator

Thanks, very interesting. I just started to read more about Blender with the idea of looking for some exporting tools later.

May I ask why you decided to go for direct MDL export? I think the preferred way is to write the X file and let XtoMDL make the MDL file. This is also easier as XtoMDL can do a lot of optimizations for you.

And I agree with Bill on the MDL import functionality. That is something we should be really careful with (especially in loading it into a modelling tool), as it would allow people to steal and modify other peoples work a lot easier.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

n4gix

Not to mention that by doing so, one could not use MakeMDL.parts.xml file (for FS9), or the modeldef.xml file (for FSX).

. without which NO animations would be possible for FSX models.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

jdberg

A blender exporter for FSX and FS9 would be great, because we actually also convert the sceneries for X-Plane and this would no longer be necessary. Blender is THE prefered tool for X-Plane.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

empeck

It would be easier to make custom animations.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

Marginal

If you’re a modeller interested in using Blender you need some way of getting your existing models out of gamx and into Blender. You’re unlikely to want to junk all your existing models and re-create them from scratch in Blender [*].

*: As an aside, I learned about the importance of providing users with ways to migrate their content from existing apps from reading an account of how Jeff Raikes, who ran the Microsoft Applications team in I think the early 90s, took on WordPerfect. In short, if you want to supplant an existing product then you have to provide ways for users to get their content out of the existing product and into your product. Ideally, and perhaps non-obviously, you should also provide users with a way of getting their content out of your product and into the existing product so that they feel that they can safely try your product without getting locked in.

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

n4gix

Many animations in FS9 and ALL animations in FSX are defined in XML scripts, which is then parsed by MakeMDL.exe for FS9, and XtoMDL.exe for FSX.

Complicating matters is that the XML Schema used for FS9 is very different to the XML Schema developed for FSX, so you would have to branch your script depending on which platform the user is exporting for.

. or have two different scripts at a minimum. How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

Max/GMax simply exports animation tracks; i.e., a key-frame matrix. The conditions and all other driving information comes from the XML scripts.

For example, here is an nnn.xanim for an object with a «rudder» animation file. This file would have to be generated by your Python script (or whatever handler you pass control to). It combines data from the model’s animation matrix with data from the modeldef.xml file:

Here is the associated code from the modeldef.xml file for the named animation:

José Bourgoignie

In the file Blender2FSX I read for the requirements:

How to import mdl to blender. Смотреть фото How to import mdl to blender. Смотреть картинку How to import mdl to blender. Картинка про How to import mdl to blender. Фото How to import mdl to blender

Administrator

That is great to hear. I agree that most users will be happy that they don’t have to compile the X file manual, so that is a good feature.

If you’re a modeller interested in using Blender you need some way of getting your existing models out of gamx and into Blender. You’re unlikely to want to junk all your existing models and re-create them from scratch in Blender [*].

I agree that in the future we would need an upgrade path to be able to edit our own work. But personally I am not sure if importing the MDL files directly is the best way. For my ModelConverterX tool I have also worked on a MDL importer, but I have not released it (yet) for these reasons.

In my opinion the copyright trouble when somebody can actually edit my model, is a lot bigger than when they just use the texture or MDL file as is.

But this is indeed a tricky point, maybe it would be a good idea to start a separate discussion about this topic.

I have been thinking about other import option that would «prove» the user actually has the source. For FS2004 MDL files you can think of importing the ASM files (I haven’t seen MDL decompilers yet). Unfortunately for FSX I did not find something that could be imported and only made if you have the sources.

How to import Source models in Blender tutorial

A tutorial on how to import Source models such as Half-Life 2, Counter-Strike: Source, and Team Fortress 2 into Blender.

First, get the SMD importer for Blender here.

If you are using version 2.49 and below, download Jon Moen Drange’s importer, and then download Dvondrake’s exporter. If you are using 2.56, download the «Blender SMD Tools»

Then do the following:

1. Put the files somewhere you won’t forget. For example: «X:\Program Files\Blender Foundation\Blender»
2. In Blender, open File > User Preferences, move to the Add-Ons tab and click Install Add-On in the bottom of the window
3. Check the SMD Tools’ box to enable them
4. Click Save as Default to enable the tools in all Blend files

1. Put the script files (import_static_smd.py, etc) in the scripts directory where Blender is installed.

Next, download Cannonfodder’s MDLDecompiler.

Now download Crafty.

After you install Crafty, open the «File System Browser» and click File> Open> Package, then locate your Steam apps folder (X:\Program Files\Steam\steamapps). Look for «counter-strike source shared.gcf» and open it. Proceed to cstrike> models> weapons (or the «player» folder if you wish).

Now, if you wish to animate a weapon, you must extract the 5 files that are needed for that weapon. For example, the Deagle:

— v_pist_deagle.mdl
— v_pist_deagle.dx90.vtx
— v_pist_deagle.dx80.vtx
— v_pist_deagle.sw.vtx
— v_pist_deagle.vvd

Create a folder on your desktop, and name it «CSS Blender’, or whatever you want to name it. Take the five weapon files and extract them to the folder you created.

You also need the textures for the hands. So download and install VTFEdit.

Now start up Blender, click File> Import> Studiomdl Data. Locate the CSS Blender folder, or what you named it, and look for a file that might say «hands_reference.SMD», and open the file. Now this time, you need to import the gun reference model. So go to File> Import> Studiomdl Data, and look for something like «gun_reference», and open it.

Done! You should now have loaded the files so you can animate them. Now to get the textures on the models.

vncastanheira / Blender-MDL-Exporter Goto Github PK

Blender 2.7x addon for exporting and importing models to Quake’s MDL format

Blender-MDL-Exporter’s Introduction

Blender-MDL-Exporter’s People

Contributors

Stargazers

Watchers

Forkers

Blender-MDL-Exporter’s Issues

Ok, its pretty obvious that this isnt frequently updated 😉 buuuut it would be super useful if this worked with Blender 2.8/9

Textures are coming out black

Not sure what could be the problem.

I tried debugging the script a bit but also couldn’t figure out how to get it to print 🙁

Any ideas?
Thank you!

Recommend Projects

A declarative, efficient, and flexible JavaScript library for building user interfaces.

Vue.js

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

TensorFlow

An Open Source Machine Learning Framework for Everyone

Django

The Web framework for perfectionists with deadlines.

A PHP framework for web artisans

Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

javascript

JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

Some thing interesting about web. New door for the world.

server

A server is a program made to process requests and deliver data to clients.

Machine learning

Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

Visualization

Some thing interesting about visualization, use data art

Some thing interesting about game, make everyone happy.

Recommend Org

Facebook

We are working to build community through open source technology. NB: members must have two-factor auth.

Microsoft

Open source projects and samples from Microsoft.

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *