Materials & Interiors... an Adventure
by Ty Christopher · in Torque Game Engine Advanced · 03/06/2007 (2:53 pm) · 17 replies
I am tryin to set up an art pipeline for my artists and have run into a bit of a problem.
How do I make an interior with QuArK, and get it into the engine with it's materials intact?
I have explored the forums... I have searched the TDN [URL] http://tdn.garagegames.com/wiki/TSE/TroubleShooting[/URL]... I have found all sorts of posts that say "did you read @#$%"... and I have found all sorts of outdated "Documentation" www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5802
I have QuArK running, and exporting with no errors. I even have a new material in the materials.cs
The file that I export is called "newmap", in its directory, I have the following files:
+ newmap.png
+ newmap.dif
+ material.cs
material.cs:
I have tried every permutation of naming and organization I can think of to get this working, but I am getting no luck.
Hints?
How do I make an interior with QuArK, and get it into the engine with it's materials intact?
I have explored the forums... I have searched the TDN [URL] http://tdn.garagegames.com/wiki/TSE/TroubleShooting[/URL]... I have found all sorts of posts that say "did you read @#$%"... and I have found all sorts of outdated "Documentation" www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5802
I have QuArK running, and exporting with no errors. I even have a new material in the materials.cs
The file that I export is called "newmap", in its directory, I have the following files:
+ newmap.png
+ newmap.dif
+ material.cs
material.cs:
new Material(newmap)
{
mapTo = "newmap";
basetex[0] = "newmap";
};I have tried every permutation of naming and organization I can think of to get this working, but I am getting no luck.
Hints?
#2
03/06/2007 (3:02 pm)
Make sure all your files are in the same folder. Try changing your "mapTo" to "newmap.png". Also, I have to ask the dumb question: is your material.cs file being executed?
#3
1 interiors
2 - testfolder
3 - - materials.cs
3 - - texture.png
3 - - testDIFFolder
4 - - - testDIF
material.cs:
new Material(m_test)
{
mapTo = test; // name of object in the DIF file
baseTex[0] = "texture";
}
addikt
03/06/2007 (3:24 pm)
We have our DIFs setup like this:1 interiors
2 - testfolder
3 - - materials.cs
3 - - texture.png
3 - - testDIFFolder
4 - - - testDIF
material.cs:
new Material(m_test)
{
mapTo = test; // name of object in the DIF file
baseTex[0] = "texture";
}
addikt
#4
03/06/2007 (3:24 pm)
Yep, material.cs is executing, init.cs makes sure of that. function loadMaterials()
{
for( %file = findFirstFile( "*/materials.cs" ); %file !$= ""; %file = findNextFile( "*/materials.cs" ))
{
exec( %file );
}
}
#5
{
mapTo = "newmap";
basetex[0] = "newmap";
};
should be:
new Material(newmap)
{
mapTo = newmap; // Remove the quotes
basetex[0] = "newmap";
};
and follow the folder structure I posted above.. :).. should work if the mapto name is right..
addikt
03/06/2007 (3:26 pm)
New Material(newmap){
mapTo = "newmap";
basetex[0] = "newmap";
};
should be:
new Material(newmap)
{
mapTo = newmap; // Remove the quotes
basetex[0] = "newmap";
};
and follow the folder structure I posted above.. :).. should work if the mapto name is right..
addikt
#6
Thanks thanks for the replies, but I am still getting no joy. I followed addiktive's post to the letter, so that leads me to belelieve that I am not naming something correctly in the QuArK file. I will keep digging and put up a post, when I figure it out. And will most definetly make a wiki page when I work this out.
03/06/2007 (4:02 pm)
Everyone- Thanks thanks for the replies, but I am still getting no joy. I followed addiktive's post to the letter, so that leads me to belelieve that I am not naming something correctly in the QuArK file. I will keep digging and put up a post, when I figure it out. And will most definetly make a wiki page when I work this out.
#7
{
mapTo = newmap; // Remove the quotes
basetex[0] = "newmap";
};
newmap in this case must be the name of the texture you applied to the model in Quark.... that's probably not correct.
03/06/2007 (4:07 pm)
New Material(newmap){
mapTo = newmap; // Remove the quotes
basetex[0] = "newmap";
};
newmap in this case must be the name of the texture you applied to the model in Quark.... that's probably not correct.
#8
In Quark, if you applied a texture name "rock", I think you're supposed to do something like this.
03/06/2007 (4:08 pm)
More info:In Quark, if you applied a texture name "rock", I think you're supposed to do something like this.
New Material(newmap)
{
mapTo = rock; // Remove the quotes
basetex[0] = "newmap";
};
#9
Thanks thanks for the replies, but I am still getting no joy. I followed addiktive's post to the letter, so that leads me to belelieve that I am not naming something correctly in the QuArK file. I will keep digging and put up a post, when I figure it out. And will most definetly make a wiki page when I work this out.
03/06/2007 (4:14 pm)
Everyone- Thanks thanks for the replies, but I am still getting no joy. I followed addiktive's post to the letter, so that leads me to belelieve that I am not naming something correctly in the QuArK file. I will keep digging and put up a post, when I figure it out. And will most definetly make a wiki page when I work this out.
#10
I checked the console log and found this:
BTW I confirmed that they are sized correctly, proper bit depth, etc.
03/06/2007 (4:30 pm)
A New ClueI checked the console log and found this:
material unmapped: concrete material unmapped: adminmarkerIronicly these are the 2 materials I am missing.
BTW I confirmed that they are sized correctly, proper bit depth, etc.
#11
There is a program called Wally that is free, this is for putting Textures into A WAD file...this is the texture collection file that Worldcraft uses for all you textures:) There is also a file I think it called fdg or something close to that but its in the TDN, as well as instruction of how to implement it, it just make it so you can export things to DIF with less buttons to push, but i dont use it. Lighting tricks are nice, but there is cleaner ways to use the sytem then getting the lighting done is the export...I would stay away from it, its problem matic...for now anyway:)
As far as getting the materials to work copy and paste the material script form one of the demo's, open it and remove anything but one of the material entrees then change them to match your file names... you also might want to make sure that all of your textures are in the same folder as you object, and the material script in case you didnt know....
03/06/2007 (4:47 pm)
I would download a copy of WorldCraft 3....And yes Valve says that All Toque user may use it:) For me Ive never had any problems converting their .MAP files uing the MAP2DIF GUI found in the resources section of this web site(I think their is 2..one runs on Python or something )There is a program called Wally that is free, this is for putting Textures into A WAD file...this is the texture collection file that Worldcraft uses for all you textures:) There is also a file I think it called fdg or something close to that but its in the TDN, as well as instruction of how to implement it, it just make it so you can export things to DIF with less buttons to push, but i dont use it. Lighting tricks are nice, but there is cleaner ways to use the sytem then getting the lighting done is the export...I would stay away from it, its problem matic...for now anyway:)
As far as getting the materials to work copy and paste the material script form one of the demo's, open it and remove anything but one of the material entrees then change them to match your file names... you also might want to make sure that all of your textures are in the same folder as you object, and the material script in case you didnt know....
#12
I checked the console log and found this:
BTW I confirmed that they are sized correctly, proper bit depth, etc.
03/06/2007 (4:56 pm)
A New ClueI checked the console log and found this:
material unmapped: concrete material unmapped: adminmarkerIronicly these are the 2 materials I am missing.
BTW I confirmed that they are sized correctly, proper bit depth, etc.
#13
03/06/2007 (5:09 pm)
Thanks Bobby, yeah the folders, are set up and named correctly. With regards to World Craft 3 / WorldHammer, I thought about that, but read the EULA and emailed Jeff Tunnell to double check. He said Valve never came through with the permission on that, and not to use it. So I would double check if I were you.
#14
03/06/2007 (9:06 pm)
Oh yeah...get rid of the map to function you dont need it in this case:)
#15
03/07/2007 (6:53 am)
Right, you shouldn't need the "mapTo" parameter. In fact I'm not really sure what happens when you specify a texture in "baseTex" and something completely different in "mapTo." The key point is that "baseTex" must be the name of the texture assigned in the DIF file.
#16
This was the final code:
The objest I created in QuArK was named "pink"
What is really annoying is that I copied a new Material function straight from one of the demo files, and it had the mapTo function in it. I guess because the interior I was referring to also had custom Materials (shaders) applied to it, the shaders were stopming on the material.
03/07/2007 (8:30 am)
Eureka! Getting rid of the mapTo did the trick. Big thanks to everyone that contributed to the solution!This was the final code:
new Material(pink)
{
baseTex[0] = "adminmarker";
};The objest I created in QuArK was named "pink"
What is really annoying is that I copied a new Material function straight from one of the demo files, and it had the mapTo function in it. I guess because the interior I was referring to also had custom Materials (shaders) applied to it, the shaders were stopming on the material.
addiktive
Just some ideas :)
We use Deled instead of quark, its far superior in regard to ease of use and the ability to UV map... and comes with a exporter for $70 ;)
addikt