Material Problems
by Tim Robinette · in Torque 3D Professional · 09/26/2012 (3:09 pm) · 10 replies
I've looked over the documentation on the editor, and I've watched a video on it as well, but I'm still getting errors. I'm not sure what I've overlooked, and thought you could point me in the right direction.
For example, if I apply random textures to a model in SketchUp and export to DAE, when I import into Torque3D, a material.cs file is generated, all the materials with the textures are imported correctly. It automatically places a folder in the same directory as the mesh, and textures are created in that folder. The CS file is located in the same directory as the mesh.
If I do this from Blender, I just get colors, no textures. I place the textures in similar location, and even manually edit the materials.cs file to use the correct texture and make sure the textures are mapped to the correct materials. I've used the material editor as well, to apply my textures, but they won't show up except as a color.
I can apply other textures if I want to my model (Chinatown materials for exampe), ones that already exist and they work fine. My textures won't though.
Obviously, I'm overlooking something when setting up my materials, but I don't know what. Also, why doesn't materials brought in from Blender auto generate a material.cs file correctly? Thanks for any help.
For example, if I apply random textures to a model in SketchUp and export to DAE, when I import into Torque3D, a material.cs file is generated, all the materials with the textures are imported correctly. It automatically places a folder in the same directory as the mesh, and textures are created in that folder. The CS file is located in the same directory as the mesh.
If I do this from Blender, I just get colors, no textures. I place the textures in similar location, and even manually edit the materials.cs file to use the correct texture and make sure the textures are mapped to the correct materials. I've used the material editor as well, to apply my textures, but they won't show up except as a color.
I can apply other textures if I want to my model (Chinatown materials for exampe), ones that already exist and they work fine. My textures won't though.
Obviously, I'm overlooking something when setting up my materials, but I don't know what. Also, why doesn't materials brought in from Blender auto generate a material.cs file correctly? Thanks for any help.
#2
09/26/2012 (8:16 pm)
So I must use UV Mapping opposed to other methods of texturing? I also use 2.63 of Blender.
#3
The issue could also be that SketchUp MAY not export dae files properly.
About Blender and textures, I believe that should work. Are you sure you are assigning them correctly?
Can you post your material.cs file and the names of your materials in Blender?
09/26/2012 (11:01 pm)
Not afaik. I believe when you color something in Blender atleast it will get exported properly. But that may just be because Blender creates some sort of UV map.The issue could also be that SketchUp MAY not export dae files properly.
About Blender and textures, I believe that should work. Are you sure you are assigning them correctly?
Can you post your material.cs file and the names of your materials in Blender?
#4
09/27/2012 (8:27 am)
Granted, this was created from the Material Editor. When I imported from Blender there is no DiffuseMap, despite having textures, just a DiffuseColor, so I had to reopen the object in the Material Editor and add textures. All my material names are listed correctly in the mapTo variables of all the objects. I only have 5.singleton Material(building_window)
{
mapTo = "window";
diffuseColor[0] = "0.64 0.64 0.64 1";
diffuseMap[0] = "art/shapes/!home!/textures/windowpane.jpg";
specularPower[0] = "50";
translucentBlendOp = "None";
};
singleton Material(building_ceiling)
{
mapTo = "ceiling";
diffuseColor[0] = "0.64 0.64 0.64 1";
translucentBlendOp = "None";
diffuseMap[0] = "art/shapes/!home!/textures/ConcreteStucco0131_2_S.jpg";
materialTag0 = "Miscellaneous";
};
singleton Material(building_walls)
{
mapTo = "walls";
diffuseColor[0] = "0.144 0.2 0.24 1";
translucentBlendOp = "None";
};
singleton Material(building_floors)
{
mapTo = "floors";
diffuseColor[0] = "0.64 0.64 0.64 1";
translucentBlendOp = "None";
diffuseMap[0] = "art/shapes/!home!/textures/Carpet0006_2_S.jpg";
materialTag0 = "Miscellaneous";
};
singleton Material(building_molding)
{
mapTo = "molding";
diffuseColor[0] = "0.64 0.64 0.64 1";
translucentBlendOp = "None";
};
#5
10/05/2012 (3:37 pm)
Still was looking for some help on this.
#6
Personally I avoid using non-alphanumeric characters in folder names ...
10/05/2012 (3:44 pm)
Make sure that the mesh has a material in Blender as well as UV mapping to the texture.Personally I avoid using non-alphanumeric characters in folder names ...
#7
I see UV Mapping mentioned quite a bit. Under my texture in Blender (For ones that are using Blender), I change Mapping from "Generated" to "UV", and if I use another method it won't work?
Anyone who actually uses Blender?
Edit: I've had little time to actually dive much into Blender, so maybe my whole problem is just not understanding texturing/uv mapping in general. My apologies if I'm going over stuff that is covered in other topic posts. I'm going to watch more videos.
10/07/2012 (2:28 pm)
Normally, I don't either. I just do that to keep my working folder at the top of directory. Mainly because of trying to test textures. I see UV Mapping mentioned quite a bit. Under my texture in Blender (For ones that are using Blender), I change Mapping from "Generated" to "UV", and if I use another method it won't work?
Anyone who actually uses Blender?
Edit: I've had little time to actually dive much into Blender, so maybe my whole problem is just not understanding texturing/uv mapping in general. My apologies if I'm going over stuff that is covered in other topic posts. I'm going to watch more videos.
#8
10/11/2012 (11:00 am)
Thanks for the help everyone. I looked at a couple extra videos on Youtube and found a forum post on here that show similar problems, and I finally got everything working. I appreciate the advice.
#9
Or the videos/posts you referenced?
10/11/2012 (1:15 pm)
Hey Tim, think you could post what you did in the end to fix it, in case other people have the same problem and come across this thread? Or the videos/posts you referenced?
#10
10/12/2012 (8:43 am)
Sure, it's what everyone was posting above this whole time, its only that I didn't know where the option was located in Blender. I thought by default it was mapping by UV, and being new to Blender, I'm still fumbling through the options, shortcut keys, and features. When you apply a material to an object, and then assign a texture to that material, Blender's default mapping coordinates, under Mapping, is "Generated", and when you export the model, you have to actually set the Mapping to "UV". So I was unwrapping the texture this whole time, but still never got anything to work, because I didn't change that one option. Didn't find that out until a few days ago. Heh, who knew.
CreativeOcclusion