Select a mesh in the 3D View. Then go to the Materials Tab of the Properties Editor. It is the red sphere you can see at the top of this screenshot. There you find a "M3 Material Selections" panel. Make sure the current mesh has a m3 material assigned in the "M3 Material Selection" tab. If not click on the "+" icon in the panel to add a "Mesh Standard Material".
Then you should be able to see a list of layers in the "M3 Material Layers" panel. If you don't know that the the "Diffuse" layer is propably the layer you want to edit. Below the layer list you can specify the image path of the currently selected layer. IMPORTANT: The image path you specify here must match the name you see in the Starcraft 2 Importer. Alternatifly you can also reference textures made by blizzard like "Assets/Textures/Hellion_Diffuse.dds".
How can I make a material use the alpha channel as team color?
In a "M3 Material Layers" panel there is a property called "Color Channels". Select Diffuse in the layer list and then select RGBA as "color channels" to make the model use the alpha channel as team color. For glowign team colors, select RGBA as color channels for the Emissive layer (and set thetexture path for the emissive layer).
Is it possible to mix materials?
Yes. When you add a material you can choose "composite". You can use it to layer multiple materials over each other. I recommend not using it since only high quality campaign models seem to use that technique. I recommend using standard materials which have multiple material layers too(Diffuse, Emissive ect.).
How to assign multiple m3 materials to a mesh?
Split the mesh up and assign each part a different m3 material. To split up a mesh, select it and got to edit mode (see hotkey question above). Then select the faces you want to make a separate mesh and press [P]. In the menu select to separte by selection"
The m3 panels are empty, what is wrong?
You are propably using an incompatible blender version (e.g. 2.63). Currently (as I write this) the m3addon works with Blender 2.69.
Is it possible to have 2 animations running at the same time? e.g. one animates the legs one the upper body?
Yes. To make an animation you need to go to the "M3 Animation STCs" panel and add a STC to that animation. Important is, that the STC has the "Runs Concurrent" flag checked. Note that if you want a differnt name then "full" you need to explictly assign fcurves to it. Why someone should ever have multiple STCs for an animation is unknown till now. Some units like the archon have multiple STCs.
How do I let a model be influenced by physics?
Firstly you need to use the "M3 Rigid Bodies" to make a bone represent a rigid body. Via the "M3 Physics Shapes" panel you can determine which shape the bone should have. Afterwards check the "Use physis" checkbox in the "M3 Animation Panel" to have an animation use physics to animate the bones. It is not yet possible with the m3addon to connect multiple rigged bodies so that they stick together but can bend at certain angles. No one needed that feature so far.
How do I make something partly transparent?
Assuming that you have already created an m3 standard material and selected it: Select the "Alpha Mask" layer in the "M3 Material Layers" panel and give it a valid image path. Via the "Color Channels" property you can then determine which color channel of the image is used to determine the transparency for the final material. Please note: The values color channel values RGB and RGBA do not work for the alpha layer!
How do I make an attachment point move with an antother animated bone?
It is done similiar to like I make hit tests move with a bone in the 5th part of my coin tutorial. Click on the attachment point in the "M3 Attachment Point" panel, which can be found in the scene tab of the properties editor. The m3addon will select the correct bone for you and switch to pose mode. In pose mode it is not possible to edit the parent bone, so you need to switch to Edit Mode (e.g. via hotkey TAB). If you use the newest m3addon version then the correct bone should still be selected. In the Bone tab of the properties editor you can then change the parent bone of the attachment point. Any movement or rotation which happens to the parent will also be applied to the attachment point. Note: You can use the Outline Editor in "All Scenes" mode to view the relationship of the bones in a tree view.
I got a question. How would I replicate say the marine's cover animation which hides the shield? In my case I want to move an object but I would imagine it's a similar thing.
The cover animation hides the shield and can run concurrent with the other animations. So have a look at the answer of the following question: "Is it possible to have 2 animations running at the same time? e.g. one animates the legs one the upper body? "
Isn't that what you wanted? To hide the shield permanently? You could try what happens if you make another animation which reverts the effect. Or what happens if you cancel the animation (via actor events).
I exported ShapeCube.m3 from the editor, imported it into Blender, changed the texture and all of the file names that I could find (including under "M3 Material Layers"), exported it and imported it into the editor and it always says "Diffuse = XelNagaGlass.dds" in the Cutscene Editor.
The model is correct but it's still using the old texture. I've tried to fix it about a dozen times now, please help me.
Have you read the answer to "Where can I change a model's texture path? "
i would guess that you changed the wrong material or the wrong layer of the right material. By selecting the mesh and having a look at the M3 material selection panel you can make sure that you edit the correct material.
It seems I was having some caching problems before. I have to quit and restart the editor to see the changes take effect.
However, I'm still really struggling to get my texture to show up. I've tried everything* and most of the time the same thing happens: the model is completely team-colored in the editor.
everything except the actual solution
All I'm trying to do now is to stop the team-color from dominating the entire model, before I even try to change anything else.
The model I'm starting with is ShapeCube.m3 (used by the "Cube" unit). Here's the model data shown in the Cutscene Editor.
So the first thing I do is open the console and export the model and the two textures and change the file name capitalization to match what the model data window says. I put them in a folder structure like this.
Then I open Blender (with m3addon already enabled in the startup file), import ShapeCube.m3 and change the viewport shading to rendered to confirm that it shows up correctly.
Now I open XelNagaGlass.dds with a graphic converter, remove the alpha channel and add it again to get an opaque texture, and save it in the same folder as XelNagaGlass_Opaque.dds with DXT5 compression.
Next I go to the material textures panel in Blender and change the source to //Assets/Textures/XelNagaGlass_Opaque.dds. As a result the rendered cube changes color to green/teal. That's how I would expect it to appear in-game.
At this point I've tried many other things, such as changing the Emissive Blend Type under M3 Material Properties and changing the color/alpha options under M3 Material Layers.
So now I export the model as GoldBlock.m3 (after updating the Image Path of the Diffuse M3 Material Layer, of course), import it into the map, along with the new texture, and change the Shape Cube model file in the Data Module.
Restart the editor and the result is, as you saw, just a red (team-colored) cube. Looking at the model data, it confirms that it's using the right texture.
I'm out of ideas.
Can you help me? I attached everything to this post as a ZIP archive if you want to take a look at it.
P.S. How did you reply so quickly? I don't get any email notifications for replies. Is there a way to enable that (I can't find it)?
Would it be possible to give a demo of ribbons and using their endpoints? I'm assuming these match up to the Spline Ribbons mentioned in the SC2 documentation. Or just a heads up if they're not working and I should stop trying haha.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Below a list of FAQ (Frequently Asked Questions) about my m3addon. Feel free to ask questions in the comments.
I added two more questions and their answer to the list:
@println: Go
I like this thread a lot! It will definitely be of use. I love how much you support your blender community tools.
I got a question. How would I replicate say the marine's cover animation which hides the shield? In my case I want to move an object but I would imagine it's a similar thing.
@JacktheArcher: Go
The cover animation hides the shield and can run concurrent with the other animations. So have a look at the answer of the following question: "Is it possible to have 2 animations running at the same time? e.g. one animates the legs one the upper body? "
@println: Go
I tried that it didn't help. Once I make the animation that changes the meshs position no matter what I do it's permanently in that place.
@JacktheArcher: Go
Isn't that what you wanted? To hide the shield permanently? You could try what happens if you make another animation which reverts the effect. Or what happens if you cancel the animation (via actor events).
@println: Go
Ok well I managed to get it all to work finally. Not sure exactly what I did but now it works. Thanks
I added one more question:
I got another request. How do you make an attachment point move with animated bones?
@JacktheArcher: Go
I added your question to the FAQ. Where you able to get the transparency working for you?
How do you replace a model's texture?
I exported ShapeCube.m3 from the editor, imported it into Blender, changed the texture and all of the file names that I could find (including under "M3 Material Layers"), exported it and imported it into the editor and it always says "Diffuse = XelNagaGlass.dds" in the Cutscene Editor.
The model is correct but it's still using the old texture. I've tried to fix it about a dozen times now, please help me.
My custom texture does show up in Blender.
@temhawk: Go
Have you read the answer to "Where can I change a model's texture path? "
i would guess that you changed the wrong material or the wrong layer of the right material. By selecting the mesh and having a look at the M3 material selection panel you can make sure that you edit the correct material.
@println:
Hey, thanks for your reply.
It seems I was having some caching problems before. I have to quit and restart the editor to see the changes take effect.
However, I'm still really struggling to get my texture to show up. I've tried everything* and most of the time the same thing happens: the model is completely team-colored in the editor.
All I'm trying to do now is to stop the team-color from dominating the entire model, before I even try to change anything else.
I'm out of ideas.
Can you help me? I attached everything to this post as a ZIP archive if you want to take a look at it.
P.S. How did you reply so quickly? I don't get any email notifications for replies. Is there a way to enable that (I can't find it)?
Would it be possible to give a demo of ribbons and using their endpoints? I'm assuming these match up to the Spline Ribbons mentioned in the SC2 documentation. Or just a heads up if they're not working and I should stop trying haha.