Phlogios 10 Posted August 8, 2011 You guys at BIS, I like your games and you seem like nice guys, but after having spent some 7 hours trying to get your virtually undocumented mod tools to work, I get the feeling that you hate me personally. I have made a model of a missile in Blender. I plan to make a mod with this missile and release it to the ArmA 2 community so they can do what they want with it. I paid for the game to thank BIS for my hours of fun in the game, and in a similar gesture, I make a mod because I want to give something back to the community. I'm not done with the missile, but halfway into the unwrapping procedure I got bored and wanted to check it out in the ArmA 2 engine. So I sailed to OFPEC to get instructions on how to do that, and I found a link to download the BI Tools. The installer kept telling me that I didn't have enough space to install the programs, so I uninstalled 20 GB's worth of games, and still got the message. I chose to ignore it and installed. After some hours of cryptic error messages and crashes, I found information about a version, 2.5.1, that supposedly doesn't crash. Well what version did I have? Couldn't find what version it was. :confused: After some digging I found a download link to the 2.5.1 version, and it worked. I could start Buldozer/Bulldozer/Bulldoze (I have seriously found 3 spellings of the same name inside Oxygen 2 PE). Here comes the tricky part: In blender, I applied my edge split modifier, made sure the model was clean, and exported to OBJ. I imported it in Oxygen, and found that: 1. The model was inside out (not a big problem, but took me a while to find the solution: invert Z axis because Oxygen uses the DirectX coordinate system, where positive Z is forward) 2. My model was completely smooth shaded, even though I had made sure my sharp edges were split. So when I import the model, Oxygen automatically removes doubles to rejoin my split edges :eek: The biggest problem is the Detect Edges "feature", which forces me to use Oxygen's automatic edge detection. :( I set it to 180 degrees, thinking that would leave my edges intact, but instead it just joined them all. I am yet to find a solution to this problem. Leave my geometry alone and let me define my own sharp edges, thank you. To make sure it wasn't just the OBJ import feature that was broken, I tried importing the same model in 3DS format, and I got an error message about missing KFDATA. You only have 1 parameter when you export to 3DS in blender, and it has nothing to do with KFDATA, so that leaves Oxygen with 0 support for Blender. To add insult to injury, this happened: Please Bohemia Interactive, I respect what you have done for us. The game is extremely ambitious and complex. It is awesome. But your modding tools are extremely buggy and have insufficient documentation for even the simplest use. I'm sure it works great if you are a company insider and you have insight into the content pipeline, but I am just a humble blender modeler with a small missile model. I'd like this to work but in the current situation I am not able to. Some instructions on how to disable the edge detection and edge joining would be greatly appreciated. Thank you :) Best regards, An amateur game programmer. ---------- Post added at 02:50 AM ---------- Previous post was at 02:43 AM ---------- This is what happened to my edges: This is the same view in Blender: Share this post Link to post Share on other sites
STALKERGB 6 Posted August 8, 2011 First things first I have no experience with blender but when I export OBJ files from modo into O2 I find there isn't a need to modify the edges in an attempt to make them stay sharp after import. Once they hit a certain angle they become sharp in modo and that is pretty much all I do to my edges. I don't use the split function very often (if at all). Do you need to split edges in blender to make them sharp? If you don't it might be worth importing without the split edges and seeing what happens. normally there will still be the odd edge that needs sorting though. Sorry I can't be more helpful. As for the KFDATA, if you can't add key frame data in blender you might be able to find a 3rd party program and add dummy KFDATA but I'm not too sure. Share this post Link to post Share on other sites
Phlogios 10 Posted August 8, 2011 Yes, I find that automatic edge detection doesn't work, and I want full control over which edge is rendered sharp. For example, I might have a model that has one 30° edge that is smooth, and another edge in a different part of the same model that is 30° but is sharp. I cannot do this with automatic edge detection. Blender lets you disable automatic edge detection and lets you mark edges as sharp. They will then be split once the edge split modifier is applied. If I rely on the automatic edge detection, I will have artifacts :( Share this post Link to post Share on other sites
STALKERGB 6 Posted August 8, 2011 (edited) Yeah, know what you mean about the extra control. Hmm, I just tried edge splitting in modo and imported it into O2 and had the same kind of issue when I recalculated normals (F5). I'd imagine it's caused by the fact there are only 2 verts connecting the split edges in O2 so merges them but that's just a guess. As for trying in 3DS, if you import into anim8tor you can add KFDATA then export as 3DS if I remember correctly. Might be worth a try. Anyway, there are a couple people on here who know much more about the way in which O2 works who might know ways round the problem, hopefully they will chip in when they are around :) EDIT: Although not really what you want but if there are only a few edges wrong you can use U and I to make a hard/soft edge in O2, if you select two (or more) verts then the edge(s) between them will change. Not an answer but can be useful at times. Edited August 8, 2011 by STALKERGB Share this post Link to post Share on other sites
soul_assassin 1750 Posted August 8, 2011 a simple search for blender would have brought this up: http://forums.bistudio.com/showthread.php?t=105516 oh and you shouldn't need to split edges (if it is what I think it is). You can always also make sharp edges in O2 by simply selecting the verts that define the edge (or selecting whole polies) and pressing U. The O2 screen with all the messed up lines looks like a graphics card glitch. Share this post Link to post Share on other sites
Phlogios 10 Posted August 8, 2011 a simple search for blender would have brought this up:http://forums.bistudio.com/showthread.php?t=105516 I will give it a try. oh and you shouldn't need to split edges (if it is what I think it is). You can always also make sharp edges in O2 by simply selecting the verts that define the edge (or selecting whole polies) and pressing U. When I have thousands of edges to be split, I'd rather do that in the streamlined blender interface that has edge loop selection, edge ring selection, similar data edge selection etc. Oxygen 2 doesn't even have single selection. It will take hours to split the edges in Oxygen 2, and the only reason it's feasible at all is that the model only has a couple of thousand edges. If it was a chopper with some hundred thousand edges, it would certainly require a different solution. The O2 screen with all the messed up lines looks like a graphics card glitch. It is 100% repeatable. I start the program, disable normals, enable normals, switch to direct3d and switch back. Voila! Frozen interface ;) Share this post Link to post Share on other sites
soul_assassin 1750 Posted August 8, 2011 I will give it a try.When I have thousands of edges to be split, I'd rather do that in the streamlined blender interface that has edge loop selection, edge ring selection, similar data edge selection etc. Oxygen 2 doesn't even have single selection. It will take hours to split the edges in Oxygen 2, and the only reason it's feasible at all is that the model only has a couple of thousand edges. If it was a chopper with some hundred thousand edges, it would certainly require a different solution. It is 100% repeatable. I start the program, disable normals, enable normals, switch to direct3d and switch back. Voila! Frozen interface ;) If you have a 100,000 edges forget about having it ingame :P but I know what you mean about the limited tools, thats y me and others spend alot of time building plugins and tools for other software. OBJ file format is very simplistic, only saves vertex normals when it comes to smooth/sharp edges. Just make sure that when you export it, the vertex normals are set up right. Share this post Link to post Share on other sites
Phlogios 10 Posted August 8, 2011 (edited) I managed to import the model with correct normals now. I think it might actually be blender's fault, but I'm not convinced. I've had very varied results after playing around with functions in Oxygen 2, and I'm sure I've seen it join edges. The reverse function was especially dodgy. What ultimately solved it was disabling high-quality normal export in Blender. OBJ file format is very simplistic, only saves vertex normals when it comes to smooth/sharp edges. Oh my. What do you think edge splitting is for? And about the interface freezing, it seems to have something to do with my model. If I just create a - what Bohemia Interactive calls a "spehere" - it doesn't freeze, but if I import my model, disable/enable normals and enable/disable Direct3D, it freezes. However, if I enable filled faces first, it doesn't freeze. Edited August 8, 2011 by Phlogios Share this post Link to post Share on other sites
soul_assassin 1750 Posted August 8, 2011 Sounds like edge splitting is for splitting edges i.e. making 2 edges out of one. Share this post Link to post Share on other sites
Phlogios 10 Posted August 8, 2011 ...and the result of such a split is multiple vertex normals for one vertex. Share this post Link to post Share on other sites
soul_assassin 1750 Posted August 8, 2011 it sounds more like making 4 vertices out of 2 per edge Share this post Link to post Share on other sites
Phlogios 10 Posted August 8, 2011 it sounds more like making 4 vertices out of 2 per edge Yes. That is what it does. I doubt the ArmA 2 engine has multiple normals per vertex in a vertex buffer. In order to have multiple normals for a vertex, you must split it into multiple vertices. In a typical 3D game, a vertex can look like this in a vertex buffer: struct vertex { vec4 position; vec3 normal; vec2 texCoord; }; So for each vertex, you only get 1 normal. In 3D editors, you can have face normals, but normally these are split into vertex normals on export to the game's geometry format. Share this post Link to post Share on other sites
soul_assassin 1750 Posted August 8, 2011 in p3d vertex and normal are two seperate structs. Share this post Link to post Share on other sites
Phlogios 10 Posted August 8, 2011 (edited) What's P3D? Edit: nevermind, googled it. Right, they are different structs in the model file format, and that makes sense for editing purposes, but it doesn't make sense when you render your vertex buffer, unless there is something I missed. You'll have to pass a normal for each vertex to the GPU at draw time anyway. Face normals do not generally exist in a vertex shader (again, unless Bohemia Interactive have made advances in the field) so each vertex must have a normal. The equivalent of a face normal on the GPU is 3 normals pointing the same direction. Now, I'm sure the content creation pipeline with 3DSmax has awesome modifiers and functions and whatnot to calculate vertex normals from smoothing groups and whatever, but I'm using Blender and what I have is the edge split modifier. :) Almost done with the texturing btw :D Edited August 8, 2011 by Phlogios Share this post Link to post Share on other sites
Phlogios 10 Posted August 8, 2011 Here is a video of the missile rendered in Blender Wish me luck! :D Share this post Link to post Share on other sites
Leopotam 10 Posted August 10, 2011 Phlogios, just use export plugin, open model in O2 and press ctrl+S (save) - smoothing will be recalculated. Share this post Link to post Share on other sites