Medieval4D - Collada Export
by 6 · in Artist Corner · 06/24/2011 (9:20 pm) · 39 replies
Hi,
I'd like to introduce everyone to some software I'm writing called Medieval4D. It's being written in Blitz3D and is a tool and art set used for the quick creation of Medieval type structures. To build your models you simply select an object such as a wall, window, door etc and add it to the 3D scene. Each object also has a number of specific pre-built textures you can then apply to it.
Medieval4D is still a work in progress with quite a few fixes and changes to implement, but I've just added in a collada export function so finished models can now be imported in Torque3D. Once a finished model is imported to T3D you can then add Normal and Spec maps, ( included with Medieval4D), in the Material window as you see fit. Below are some pics of some test scenes I've been working on.




An early adopter licence for Medieval4D is available for purchase for just US$30, ( although this price will increase from the 1st July), and with this you will get access to free upgrades to later versions when they are available. You also get access to the structures catalog, so even if you don't have time to create models from scratch you can copy/paste existing models from there.
For more details on Medieval4D, please visit my website at www.modbox4d.com
For specific details, see these links:
Overview of Medieval4D
Export disabled demo version
View the structures catalogue
Change/bug list
Buy now
Let me know if you have questions.
Thanks
6
I'd like to introduce everyone to some software I'm writing called Medieval4D. It's being written in Blitz3D and is a tool and art set used for the quick creation of Medieval type structures. To build your models you simply select an object such as a wall, window, door etc and add it to the 3D scene. Each object also has a number of specific pre-built textures you can then apply to it.
Medieval4D is still a work in progress with quite a few fixes and changes to implement, but I've just added in a collada export function so finished models can now be imported in Torque3D. Once a finished model is imported to T3D you can then add Normal and Spec maps, ( included with Medieval4D), in the Material window as you see fit. Below are some pics of some test scenes I've been working on.




An early adopter licence for Medieval4D is available for purchase for just US$30, ( although this price will increase from the 1st July), and with this you will get access to free upgrades to later versions when they are available. You also get access to the structures catalog, so even if you don't have time to create models from scratch you can copy/paste existing models from there.
For more details on Medieval4D, please visit my website at www.modbox4d.com
For specific details, see these links:
Overview of Medieval4D
Export disabled demo version
View the structures catalogue
Change/bug list
Buy now
Let me know if you have questions.
Thanks
6
#22
01/15/2012 (1:51 pm)
Then if i were to export them .dae and then put them into Torque, how is it that i could have the entire export textured?
#23
Well using the example I mentioned above, the export just creates 1 single .dae file. In that file will be all the polygon data grouped together for each separate texture. So when you export to .dae the entire model will be textured. The only difference between the model in Medieval4D and the Collada file is that data is store more efficiently.
If this doesn't answer your query, just let me know. I'm not sure if I've really understood what your asking.
Thanks
6
01/15/2012 (9:06 pm)
Well using the example I mentioned above, the export just creates 1 single .dae file. In that file will be all the polygon data grouped together for each separate texture. So when you export to .dae the entire model will be textured. The only difference between the model in Medieval4D and the Collada file is that data is store more efficiently.
If this doesn't answer your query, just let me know. I'm not sure if I've really understood what your asking.
Thanks
6
#24
From my understanding of what you are saying, is that the export will have say three objects, and it will have three different uv maps layed over those three different objects.
However when it is put the .dae into torque, it is considered one material. And only one uv map can be given per material. So how would i be able to apply the three different uv maps to the one material?
I hope i explained it well. sorry for being difficult.
01/16/2012 (3:03 pm)
sorry i wasnt clear, i am confused on how to explain what i am confused about.From my understanding of what you are saying, is that the export will have say three objects, and it will have three different uv maps layed over those three different objects.
However when it is put the .dae into torque, it is considered one material. And only one uv map can be given per material. So how would i be able to apply the three different uv maps to the one material?
I hope i explained it well. sorry for being difficult.
#25
No problem Joshua, you're not being difficult at all.
Torque will actually create a separate material for each texture found in the .dae file. So if the .dae file has 3 objects, each object will have a separate texture and also a separate uv map.
Lets take a simple example of a shed. The shed in Medieval4D will be built from 5 objects ( 4 walls and 1 roof). The walls all use the same 'Wood1.png' texture and the roof uses the 'roof2.png' texture. When we export the model, Medieval4D will group objects using the same texture in to 1 single poly/uv mapped object. So now if we look at the exported .dae file we will have 1 wall object which uses the Wood texture and 1 roof object that uses the Roof texture. When imported, Torque creates a Material for the Wood and Roof textures and these are applied to the respective UV maps for the two objects.
The only thing I haven't got around to yet is including the Normal and Spec maps in the Collada file itself. So after Torque creates the material, you'll need to manually add those other textures. Once the Material is created though, it will be reused for any subsequent models that are imported which use that same Material name, so you'll only need to create the material once.
I say all this, but I have actually got around to downloading the new version of Torque yet to make sure it still all works. I'll have a quick test this weekend to make sure. If you like I could create a little youtube video of the import process this weekend?
Thanks.
6
01/16/2012 (5:41 pm)
No problem Joshua, you're not being difficult at all.
Torque will actually create a separate material for each texture found in the .dae file. So if the .dae file has 3 objects, each object will have a separate texture and also a separate uv map.
Lets take a simple example of a shed. The shed in Medieval4D will be built from 5 objects ( 4 walls and 1 roof). The walls all use the same 'Wood1.png' texture and the roof uses the 'roof2.png' texture. When we export the model, Medieval4D will group objects using the same texture in to 1 single poly/uv mapped object. So now if we look at the exported .dae file we will have 1 wall object which uses the Wood texture and 1 roof object that uses the Roof texture. When imported, Torque creates a Material for the Wood and Roof textures and these are applied to the respective UV maps for the two objects.
The only thing I haven't got around to yet is including the Normal and Spec maps in the Collada file itself. So after Torque creates the material, you'll need to manually add those other textures. Once the Material is created though, it will be reused for any subsequent models that are imported which use that same Material name, so you'll only need to create the material once.
I say all this, but I have actually got around to downloading the new version of Torque yet to make sure it still all works. I'll have a quick test this weekend to make sure. If you like I could create a little youtube video of the import process this weekend?
Thanks.
6
#26
01/16/2012 (5:59 pm)
Hello 6, I purchased your product today and it is wonderful I am still learning it's in and outs but I also had trouble with the .dea exporting. If you were to put together a quick video I would trully appreciate it also. Thank you
#27
That clears it up completely. That is exactly what i was hoping it did. I will probably purchase in the next few days. I need to make sure i have the funds.
And a short video would be helpful too.
But one more question, if i purchase this, would i be able to give it to anyone else that is working on my project, or would they need to buy another download?
01/16/2012 (6:46 pm)
Thanks 6. That clears it up completely. That is exactly what i was hoping it did. I will probably purchase in the next few days. I need to make sure i have the funds.
And a short video would be helpful too.
But one more question, if i purchase this, would i be able to give it to anyone else that is working on my project, or would they need to buy another download?
#28
I'll try to get something up as soon as I can. I'm not going to be at home for a few days, but I'll try to get something up by this weekend.
In the meantime, what seems to the problem as I might be able to help even though I don't have access to either tool yet.
6
01/16/2012 (6:46 pm)
Hi Shane,I'll try to get something up as soon as I can. I'm not going to be at home for a few days, but I'll try to get something up by this weekend.
In the meantime, what seems to the problem as I might be able to help even though I don't have access to either tool yet.
6
#29
Glad it all makes sense now :)
For another person to use the Medieval4D application they will need to purchase a separate licence. But if that person is on your dev team and they just need to use the finalised models, then they don't need a licence. You can just send them the final .dae file.
Thanks
6
01/16/2012 (6:52 pm)
Hi Joshua,Glad it all makes sense now :)
For another person to use the Medieval4D application they will need to purchase a separate licence. But if that person is on your dev team and they just need to use the finalised models, then they don't need a licence. You can just send them the final .dae file.
Thanks
6
#30
01/17/2012 (12:11 am)
Thankyou 6 for your help. Look forward to using your product!
#31
No problem.
I managed to download Torque last night to my laptop from an internet cafe, and I'm pleased to say that the .dae files made by Medieval4D still work, so all is good there.
The first step to take, (if you having issues with dae), is to copy the 'm4d_textures' and 'm4d_export folders' from Medieval4D over to somehwere in your shapes folder in your Torque project.
When you create a model in M4D, just hit the export collada button and leave the settings as they are. The exported file will appear in the m4d_export folder in M4D, so just copy this file over to the 'm4d_export' folder in Torque. Now when you add the model to Torque from the GUI, the model and textures all should show up correctly because the relative files paths are the same in Torque as they are in Medieval4D.
There are couple of extra things I'll mention on the video this weekend such as applying the normal and spec maps, but for most Torque users, this should be a pretty obvious. Although just be aware that the Material names begin with the name of your model, then the texture name.
If you add another model which uses the same material as a previously loaded model, a new material isn't created and the other material is shared across both models. This is great, but it does mean it can be a bit confusing locating the materials once a model is loaded. To help with this I created a new material folder called m4d and added the necessary textures to that folder. I'll mention this on the video too.
Thanks
6
01/17/2012 (12:35 pm)
No problem.
I managed to download Torque last night to my laptop from an internet cafe, and I'm pleased to say that the .dae files made by Medieval4D still work, so all is good there.
The first step to take, (if you having issues with dae), is to copy the 'm4d_textures' and 'm4d_export folders' from Medieval4D over to somehwere in your shapes folder in your Torque project.
When you create a model in M4D, just hit the export collada button and leave the settings as they are. The exported file will appear in the m4d_export folder in M4D, so just copy this file over to the 'm4d_export' folder in Torque. Now when you add the model to Torque from the GUI, the model and textures all should show up correctly because the relative files paths are the same in Torque as they are in Medieval4D.
There are couple of extra things I'll mention on the video this weekend such as applying the normal and spec maps, but for most Torque users, this should be a pretty obvious. Although just be aware that the Material names begin with the name of your model, then the texture name.
If you add another model which uses the same material as a previously loaded model, a new material isn't created and the other material is shared across both models. This is great, but it does mean it can be a bit confusing locating the materials once a model is loaded. To help with this I created a new material folder called m4d and added the necessary textures to that folder. I'll mention this on the video too.
Thanks
6
#32
01/19/2012 (6:49 pm)
Thanks alot 6, i was able to get the textures working from your help above. This is a great tool that no indie gamer should be with out. i will definitly be spreading the word about this A+ tool. Thank you
#33
I've been importing the structures into torque the way you said to. And when i first put them in, it is fine, but when ever i load the world editor back up a piece of the structure has the "no material" texture. Like the doors and roofs. The Main walls are fine however.
01/22/2012 (7:46 am)
Hey 6. I've been importing the structures into torque the way you said to. And when i first put them in, it is fine, but when ever i load the world editor back up a piece of the structure has the "no material" texture. Like the doors and roofs. The Main walls are fine however.
#34
I've seen this happen too, and it can be frustrating, but it appears to be an issue with the Torque Materials.cs not being written/updated properly.
If I get this issue there are two possible reasons, each with a fix:
1) Check the Material editor to see if the missing texture is in there. If it is, then check the Materials.cs file in the m4d_textures folder to make sure the texture path is the same for this texture as all the others, for example material block might look like this:
singleton Material(stilt_house_m4d_door9_png)
{
mapTo = "m4d_door9_png";
diffuseMap[0] = "m4d_textures/door9";
translucentBlendOp = "None";
};
but it should be:
singleton Material(stilt_house_m4d_door9_png)
{
mapTo = "m4d_door9_png";
diffuseMap[0] = "core/art/shapes/m4d_textures/door9";
translucentBlendOp = "None";
};
2) If the material doesn't show in the Materials Editor, then close your project down and go into the m4d_export folder. Delete the .dts files you see there and then restart your project. This will recreate the .dts files and reassign materials.
Try those and let me know how you get on.
6
01/22/2012 (12:26 pm)
I've seen this happen too, and it can be frustrating, but it appears to be an issue with the Torque Materials.cs not being written/updated properly.
If I get this issue there are two possible reasons, each with a fix:
1) Check the Material editor to see if the missing texture is in there. If it is, then check the Materials.cs file in the m4d_textures folder to make sure the texture path is the same for this texture as all the others, for example material block might look like this:
singleton Material(stilt_house_m4d_door9_png)
{
mapTo = "m4d_door9_png";
diffuseMap[0] = "m4d_textures/door9";
translucentBlendOp = "None";
};
but it should be:
singleton Material(stilt_house_m4d_door9_png)
{
mapTo = "m4d_door9_png";
diffuseMap[0] = "core/art/shapes/m4d_textures/door9";
translucentBlendOp = "None";
};
2) If the material doesn't show in the Materials Editor, then close your project down and go into the m4d_export folder. Delete the .dts files you see there and then restart your project. This will recreate the .dts files and reassign materials.
Try those and let me know how you get on.
6
#35
P.s I'm pretty sure not its not the export because every new model i import does the same thing.
01/25/2012 (6:11 pm)
The materials script is fine. And the textures aren't actually missing. All i have to do is go under the material editor and click on all the different materials and they will pop back up. However, they will not save. So whenever i go to play the game or to reload the mission editor i can not see them and have to recheck the materials. Do you know a way to fix this. Or what i may be doing wrong.P.s I'm pretty sure not its not the export because every new model i import does the same thing.
#36
Then I dumped all the raw materials files from M4D into that directory, and wrote a materials file there. An alias of myoutputdirectory into the sidebar of the Windows export dialog and it was made easy to target my non-default directory when exporting.
It's not very organized, but it did clear up this issue for me.
01/25/2012 (8:45 pm)
What I did to get around it was to create game/myoutputdirectory, then on export remember to change the export path in the M4D dialog which appears prior the Windows directory dialog when you export to .dae to ../myoutputdirectory/ instead of the default.Then I dumped all the raw materials files from M4D into that directory, and wrote a materials file there. An alias of myoutputdirectory into the sidebar of the Windows export dialog and it was made easy to target my non-default directory when exporting.
It's not very organized, but it did clear up this issue for me.
#37
From what I've been seeing is that the material.cs file sometimes doesn't get updated properly when a new model is added. For instance when I load a model all the textures are fine. I close the project and reopen it and still the textures are all ok. I take a backup of the materials file and then I then add another model, save the project, close and open and there is a texture not displaying. When I compare the two material files I do find that a whole material is missing.
After I delete the dts files, I reload the project and the textures come back. So I'm not sure what is going on, but as you can see all the models and textures do load fine, but the materials.cs file can sometimes have parts missing.
01/27/2012 (11:22 am)
Well I had a little experiment which just involved loading models, saving the project, closing the project and then reopening it, and I seemed to get random textures missing at various places.From what I've been seeing is that the material.cs file sometimes doesn't get updated properly when a new model is added. For instance when I load a model all the textures are fine. I close the project and reopen it and still the textures are all ok. I take a backup of the materials file and then I then add another model, save the project, close and open and there is a texture not displaying. When I compare the two material files I do find that a whole material is missing.
After I delete the dts files, I reload the project and the textures come back. So I'm not sure what is going on, but as you can see all the models and textures do load fine, but the materials.cs file can sometimes have parts missing.
#38
03/04/2012 (6:30 am)
Been waiting to a while to finally try this baby out. I see you added the ability to bring in our own textures, excellent :) Any other updates planned?
#39
The feature to add your own textures and model objects has been written in my development code, but it isn't ready in the purchase version yet. I've re-written the whole thing from scratch so apart from this new, ( and very important ), feature I've added other important things such as, better/stable 3D gizmo's, ability to change the screen resolution and a TreeView control. I'm working on a fully implemented 'Undo' at the moment.
The treeview was the most work, but it's pretty much done now and allows drag/drop, multiselect and grouping of objects. You can also 'merge' models together which will hopefully make it easier for users to make finished structures, but I'll talk about and demonstrate that later on.
As I said, all this isn't ready for use yet, as there are a few bugs/issues to fix. But once it is I'll pass it on to my current users for them to try/test out and give feedback.
After that is released, which I expect to call version 0.9 then there is one other feature I want to implement. I won't mention what it is yet as I haven't tried coding it yet, so can't guarantee it'll work as I expect it to.
Then, once all that is done I'll be able to do what I originally wanted to do in the first place, which is make models and textures! They'll then be available to download as separate 'Catalogue' packs. The current Catalogue is the 'House' pack, but I'm also working on a Castle and a Bridge pack whenever I get a few spare minutes.
Cheers
6
03/04/2012 (9:57 am)
The feature to add your own textures and model objects has been written in my development code, but it isn't ready in the purchase version yet. I've re-written the whole thing from scratch so apart from this new, ( and very important ), feature I've added other important things such as, better/stable 3D gizmo's, ability to change the screen resolution and a TreeView control. I'm working on a fully implemented 'Undo' at the moment.
The treeview was the most work, but it's pretty much done now and allows drag/drop, multiselect and grouping of objects. You can also 'merge' models together which will hopefully make it easier for users to make finished structures, but I'll talk about and demonstrate that later on.
As I said, all this isn't ready for use yet, as there are a few bugs/issues to fix. But once it is I'll pass it on to my current users for them to try/test out and give feedback.
After that is released, which I expect to call version 0.9 then there is one other feature I want to implement. I won't mention what it is yet as I haven't tried coding it yet, so can't guarantee it'll work as I expect it to.
Then, once all that is done I'll be able to do what I originally wanted to do in the first place, which is make models and textures! They'll then be available to download as separate 'Catalogue' packs. The current Catalogue is the 'House' pack, but I'm also working on a Castle and a Bridge pack whenever I get a few spare minutes.
Cheers
6
Torque 3D Owner 6
The collada export will export a separate UV map for each texure on the model. This is done to improve performance on the game engine side. So if you create a large house model of say 200 objects but you only use 6 textures, then the collada file will have 6 objects and 6 textures. It basically just binds all objects of 1 texture into 1 single object.
Cheers
6