Enrique Posted August 29, 2013 Report Share Posted August 29, 2013 IntroductionThis is a guide covering how to import assets from the game to blender, create a second UV coordinates, bake the AO maps and export again.The game's buildings are usually divided in different .dae files (one per diffuse texture used)Usually, they consist in one main ".dae" file located in "meshes/structural" and one or more ".dae" children (props) that are attached to the main file, this "prop" daes are located in "meshes/props". (this is not always the case)In this example, we're going to bake the AO map for the celtic civil centre.1.- Import the mesh into blender3DInside blender, remove the starting cube, camera and point light. Go to file->import-> Collada (.dae) and select the .dae file to import.This building consists on three files: celt_civic3.dae, celt_civic3_props_1.dae and celt_civic3_props_new.daeIf blender shows an error importing:Open the .dae file that is throwing the error with notepad or another text editor and erase everything between </asset> and <library_geometries> (do not remove those labels, just the text in between) and try to import again*Note: The file may be imported rotated -90º in the X axis. To solve this, simply center the pivot point at the origin with SHIFT+C, select the cursor for your pivot point, select the asset and hit "R" for rotate, "X" for the axis, and then type "90" on the numpad and hit enter.Each time you import an asset, it is important that you create a new material with the name of the .dae or the texture that is going to use if you know it. This will let us separate the object again after we join all the meshes together.2.- Set up a new UV coordinates.Select all your meshes and join them with CTRL+JGo to "object data" panel, scroll down to UV Maps menu and click the "+" sign to create a new UV coordinates.--Select the building, enter in edit mode with TAB.--Open a window with the UV/Image editor. Click in "new image" and "ok" in the pop-up menu. This creates a new 1024*1024 black image where we will bake the Ambient occlusion.--Now let's unwrap the model automatically. Go to object mode, select the model, use "CTRL+A" and select "apply scale" this will recalculate the scale of our building, so the polygons could be unwrapped nicely.--Enter "edit mode" with TAB. select all with "A" and hit "U" and select "Smart UV Project" in the pop-up menu.--In the next menu select the following settings:3.- Baking the AO into our new generated black image.Preparing the AO settings: go to the "world" tab in the settings panel, mark the checkbox of Ambient occlusion and set it to "multiply".Scroll down to the "Gather" pannel and change the samples to something between 20-25--We have the model ready to bake the AO map. Go to the render tab, scroll down to the "bake" panel (click on the "bake" pannel if it is closed) and use the following settings:--Then click "bake" and wait until the baking process is completed (this will take a while depending on your machine)--Once finished, you can hit "N" in the viewport to open a toolbar, go to the "display" menu, and click in the "texture solid" checkbox. This way you can see the AO map we have just generated on the model and check if it has been correctly generated.------If you see black strange black faces where it shouldn't, the polygon normals are probably facing the wrong direction. This could be fixed selecting the black faces and then hit "W" and select in the pop-up menu "flip normals".------If you find the problem where there are dotted black parts, it's probably because there are two or more polygons overlapping each other. You'll have to tweak the model sightly to fix this issue.--Once the bake is finished and you're happy with it, remember to save the image generated so it doesn't get lost. In the UV editor select Image->save image As...4.- Separating the mesh by materialsNow that we have our AO map, and the model has a second UV coordinates for the AO, we have to separate it's pieces again and export the parts one by one.To separate by materials, enter "edit mode". Make sure you don't have anything selected hitting "A" twice.Go to the materials tab, select the first material on the list, and click "select" button. This will select all the faces that have that material assigned. Once selected hit "P" and select "selection" in the pop-up menu.Repeat this step for each material (prop) you have imported.NOTE: Now that you only need to export the objects into .daes again, is a VERY NICE moment to save the .blend file in case the export process goes wrong.5.- Exporting the meshes back to .dae files.This is the last part. You have to export the objects one by one. Make sure the following requirements are met:- There's nothing else on the scene except the mesh you want to export (even hid objects breaks the export)- You have to remove every material applied on the mesh.- There are no lights, armatures or other objects in the scene.- You have your object selected.Then you simply go to File->export-> Collada (.dae) and select the file to export or overwrite the old one.After that, reload the .blend file and repeat this step with the rest of the objects (or hit CTRL+Z a few times until you get back the other meshes and repeat the process with the next one)I hope it's somewhat understandable and useful . 7 Quote Link to comment Share on other sites More sharing options...
wraitii Posted August 29, 2013 Report Share Posted August 29, 2013 Very good tutorial, you should also put in on the Wiki, we might have some proper resources there for artists at last 1 Quote Link to comment Share on other sites More sharing options...
leper Posted August 29, 2013 Report Share Posted August 29, 2013 Pinned this, as it shouldn't get lost on a later page where nobody will read it. 1 Quote Link to comment Share on other sites More sharing options...
Pureon Posted September 19, 2013 Report Share Posted September 19, 2013 Only just spotted this tutorial (I never look at pinned topics )! Really nicely done Enrique, very helpful. You helped me when I was struggling to understand AO, so it's good to see you're now helping others too. It's such a shame AO isn't compatible with prop variations. Quote Link to comment Share on other sites More sharing options...
LordGood Posted September 28, 2013 Report Share Posted September 28, 2013 Thank ya Enrique! This was a godsend ;p Quote Link to comment Share on other sites More sharing options...
dajayalol Posted November 18, 2013 Report Share Posted November 18, 2013 This is a good instruction page to follow! Quote Link to comment Share on other sites More sharing options...
ivanzu Posted November 21, 2013 Report Share Posted November 21, 2013 (edited) Where do I find the files since,every time i find them they cant be opened since they are called :building.dae.cached.pmdPSUsed to the converter cant get it to extract files... Edited November 21, 2013 by ivanzu Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted November 21, 2013 Report Share Posted November 21, 2013 That is a compressed version and as you said will not open you can find the uncompressed files in the svn repo BTW there is no converter Enjoy the Choice Quote Link to comment Share on other sites More sharing options...
ivanzu Posted November 22, 2013 Report Share Posted November 22, 2013 Can I get the link to svn repo?Cheers! Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted November 22, 2013 Report Share Posted November 22, 2013 Check this wiki page http://trac.wildfiregames.com/wiki/Finding_Your_Way_Around It will give you all the details.Enjoy the Choice Quote Link to comment Share on other sites More sharing options...
okegima Posted July 23, 2014 Report Share Posted July 23, 2014 (edited) Greeting,did follow this tutorial, but have some questions.I did a try with a simple cube on blender and the alpine_cliff.dds applyed texture. Since here all is working well. I did follow this tutorial to export proprely the dae file.I have also follow this tutorial to make the xml file.So, now i have :block_1.daeblock_1.xmlalpine_cliff.dds<?xml version="1.0" encoding="utf-8"?><actor version="1"> <castshadow/> <group> <variant frequency="100" name="Base"> <mesh>props/block_1.dae</mesh> <textures><texture file="types/alpine_cliff.dds" name="baseTex"/></textures> </variant> </group></actor><textures><texture file="types/alpine_cliff.dds" name="baseTex"/></textures>For this one am not quiet sure about the right path. As am using a .dds from the game, i think there no need to copy and past this .dds. So i hope am using the good patch who is normaly there :binaries\data\mods\public\public.zip\art\textures\terrain\typesOr, am i forced to copy and past the alpine_cliff.dds into this folder : binaries\data\mods\public\art\textures\skins\propsAlso, am quiet sure about this, but just look for a confirmation, the dae file is supposed to be past here : binaries\data\mods\public\art\meshes\props. However, files are named like cc.dae.cached.pmd. So, do i have to rename my block_1.dae by block_1.dae.cached.pmd ?Same thing for the texture name. is have to be : alpine_cliff.dds or alpine_cliff.dds.cached.dds ?In advance, thank you for the help. Edited July 23, 2014 by okegima Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 23, 2014 Report Share Posted July 23, 2014 Try with this line for the texture path :terrain/types/alpine_cliff.dds Quote Link to comment Share on other sites More sharing options...
okegima Posted July 23, 2014 Report Share Posted July 23, 2014 (edited) did try, but not working. when i left the .dds in : binaries\data\mods\public\art\textures\skins\props it's working Edited July 23, 2014 by okegima Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 23, 2014 Report Share Posted July 23, 2014 Normally the path doesn't matter as long as it exists. You may have to restart atlas to take your changes in account. Could you upload the files here ? Quote Link to comment Share on other sites More sharing options...
okegima Posted July 30, 2014 Report Share Posted July 30, 2014 Am trying to import a dae file following the tutorial witn blender 2.70, but am having an error into the blender consol : Schema validation error : Critical error : Start tag expected, '<' not found. Made some search and read, but found no solution. any Idea ? Quote Link to comment Share on other sites More sharing options...
Enrique Posted July 30, 2014 Author Report Share Posted July 30, 2014 Am trying to import a dae file following the tutorial witn blender 2.70, but am having an error into the blender consol : Schema validation error : Critical error : Start tag expected, '<' not found. Made some search and read, but found no solution. any Idea ?Did you edit the .dae file in any way with a text editor?What mesh are you trying to import?It seems that there's a missing "<" sign on a label in the .dae code. Quote Link to comment Share on other sites More sharing options...
okegima Posted July 30, 2014 Report Share Posted July 30, 2014 i made no edite with any text editor. I saw the over tutorial, but when using note++, or not pad there nothing to edite.well, it's happen on every .dae. i made everal try on different files but having the same consol error message. Quote Link to comment Share on other sites More sharing options...
Enrique Posted July 31, 2014 Author Report Share Posted July 31, 2014 i made no edite with any text editor. I saw the over tutorial, but when using note++, or not pad there nothing to edite.well, it's happen on every .dae. i made everal try on different files but having the same consol error message.Which files are you trying to import into blender? Quote Link to comment Share on other sites More sharing options...
feneur Posted August 1, 2014 Report Share Posted August 1, 2014 i made no edite with any text editor. I saw the over tutorial, but when using note++, or not pad there nothing to edite.well, it's happen on every .dae. i made everal try on different files but having the same consol error message.Have you checked Blender to see that the export works? If there's nothing in the file perhaps there's an error which prevents the file from being saved properly Quote Link to comment Share on other sites More sharing options...
ubik Posted November 22, 2014 Report Share Posted November 22, 2014 Go to file->import-> Collada (.dae) and select the .dae file to import.I'm confused. I have version 2.69 of Blender on Ubuntu 14.04 and Under, file, import, there is no Collada option. The first option on the list is Motion Capture. Has something changed?Aslo, I can't find any .dae files, where are they?So, I'd love to get started, but I can't seem to figure out the basic first step :-( Quote Link to comment Share on other sites More sharing options...
niektb Posted November 22, 2014 Report Share Posted November 22, 2014 (edited) Check if there is an add-on in the preferences menu that enables importing Collada.If there isn't, would you mind posting a screenshot?For the .dae files you need to download the source files as outlined here:http://trac.wildfiregames.com/wiki/BuildInstructions(Scroll a bit down) Edited November 22, 2014 by niektb Quote Link to comment Share on other sites More sharing options...
feneur Posted November 22, 2014 Report Share Posted November 22, 2014 I'm confused. I have version 2.69 of Blender on Ubuntu 14.04 and Under, file, import, there is no Collada option. The first option on the list is Motion Capture. Has something changed?Aslo, I can't find any .dae files, where are they?So, I'd love to get started, but I can't seem to figure out the basic first step :-(Apparently the Blender version that Ubuntu provides doesn't include Collada import/export due to a missing package, you should be able to install it directly from Blender.org though ( http://www.blender.org/download/ ).The .dae files can be found in data\mods\public\public.zip\art\meshes (which should be in ~/.local/share/0ad/ on Ubuntu), or rather in the sub-folders found in there. 1 Quote Link to comment Share on other sites More sharing options...
ubik Posted November 24, 2014 Report Share Posted November 24, 2014 Thanks for the info. I have Blender on my macbook too, and it has the Collada import option, so I'm using that comp for the moment. I also found this page on the wiki which answers a lot of the questions I had:http://trac.wildfiregames.com/wiki/Basic3DImplementationThanks again! This is a really beautiful game and I've been playing it more and more the past weeks. What I love most about it is its openness and the fact that you can improve it and benefit from other peoples' improvements. Seeing this grow is a treat. 1 Quote Link to comment Share on other sites More sharing options...
Trinketos Posted August 4, 2018 Report Share Posted August 4, 2018 Cuando exporto algun modelo del juego a blender me aparecen con una escala muy pequeña (uso metros en blender por si se lo preguntan) Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted August 4, 2018 Report Share Posted August 4, 2018 2 minutes ago, Trinketos said: Cuando exporto algun modelo del juego a blender me aparecen con una escala muy pequeña (uso metros en blender por si se lo preguntan) Los modelos del juego son microscópicos. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.