Blog Site
www.joestormgameexpo.wordpress.com
Forum Site: http://jsleveldesigns.freeforums.org/index.php
You need to have a Material with a texture with an image file assigned to it. There are other "requirements" for other things as well. Check out this first page of this post, the link that goes to Campagnini's site and my page as well for more info.
I get the following error when trying to do your export tutorial from your site (the most recent one):
AFAIK I'm following your tutorial exactly. I am using 2.58, is that the reason?Code:Traceback (most recent call last): File "C:\Program Files\Blender\blender-2.58-windows64\2.58\scripts\addons\ASE_Export_vMC-1-1.py", line 1357, in execute model = gatherData(self) File "C:\Program Files\Blender\blender-2.58-windows64\2.58\scripts\addons\ASE_Export_vMC-1-1.py", line 1281, in gatherData bpy.ops.object.location_apply() File "C:\Program Files\Blender\blender-2.58-windows64\2.58\scripts\modules\bpy\ops.py", line 179, in __call__ ret = op_call(self.idname_py(), None, kw) AttributeError: Calling operator "bpy.ops.object.location_apply" error, could not be found location:<unknown location>:-1 Traceback (most recent call last): File "C:\Program Files\Blender\blender-2.58-windows64\2.58\scripts\addons\ASE_Export_vMC-1-1.py", line 115, in draw if bpy.context.scene['settings'] == 1: KeyError: 'bpy_struct[key]: key "settings" not found'
Last edited by danimal'; 07-02-2011 at 03:01 PM.
Danimal
Space Flight Dev Thread/Video [Aug 2011] http://forums.epicgames.com/showthread.php?t=807107
Grapple Gun Playable Demo/Video [Nov 2010] http://forums.epicgames.com/showthread.php?t=752450
Blog Site
www.joestormgameexpo.wordpress.com
Forum Site: http://jsleveldesigns.freeforums.org/index.php
same thing here !
As far as the thread title says, this script is for Blender 2.57 ...I think 2.58 may has some decent changes which affect the script...
/ninjapirates/
---Roccy Laboratories//#1 Crossmedia 2010[Multimedia]
I hate reference images...I never find good ones
havoc is correct, this error is due to the 2.58 blender release. im 1200 miles away from my home right now, when i'm back i will be updating the script.
good to know !
I skimmed through the 20 something pages so far and haven't seen someone mention the problem I get. Basically, I follow the tutorial on how to export... and that works fine up until I click export.
In the video, a menu pops up with buttons and then it exports flawlessly. For me, I click export and the window exits back to Blender as if I clicked the cancel button. Is that it's way of saying I'm not doing something right? I guess I was just expecting an error message or "Export Failed" or something if I were making a mistake.
With that issue I was using 2.57. When I export with 2.49, my models import with some vertex error and it makes some edges solid and others smooth, instead of all smooth. Older versions of UDK didn't mess up my models this way. I figured the 2.57 export would help with that, because there is a lot more talk about the smoothing groups... I just can't get the 2.57 one to work =/ Any ideas?
MCampagnini's ASE Export vMC (1.1.0) script works with blender 2.58x if you comment with # every line that looks like this:
bpy.ops.object.location_apply()
bpy.ops.object.scale_apply()
bpy.ops.object.rotation_apply()
Stabz, if you enable your console you will probably be able to see the error. right click the shortcut icon, under target add in -con. The whole line should look something like "C:\Program Files (x86)\Blender Foundation\blender-2.57b-windows64\blender.exe" -con. Contact me through my site if you need to.
Thanks raz. Should be back to work on it really soon.
Ok, should be updating the script soon ... start posting any bugs you run in to. There are some known UI issues (example: Auto Assign By Seams, Error: key "clear existing not found", Solution: click clear existing in the Edit Smoothing Groups menu on and then off again to fix). I did remove the couple of lines causing the issues, new download is available on my site. Thanks!
Last edited by MCampagnini; 07-09-2011 at 10:12 AM.
I'll add it to the list. But the solution would be to make sure you follow the material requirements - 1 unique material and 1 named texture image per material used. You obviously have (or mean to have) two materials, check if they have image texture slots with separate names. Another related error would be if you had a collision model with shared materials - this could be why too.
I am thinking about getting rid of some of the exporters fluff. What are everyones thoughts on making it so smoothing groups are determined by uv islands. I am not a udk pro, but someone mentioned earlier that this was a requirement to have the mesh look correct anyway. let me know.
thanks for the suggestions
i will check this tonight
and the model is not from me ,i have downloaded it from http://archive3d.net
Hi,
to make the script run in 2.58, you can replace
withCode:bpy.ops.object.location_apply() bpy.ops.object.scale_apply() bpy.ops.object.rotation_apply()
However I have spotted another problem. When I try to export a mesh with a lot of faces (e.g. 14k), the programm crahses:Code:bpy.ops.object.transform_apply(location=True,scale=True,rotation=True)
I have not exactly determined the amount of faces "necessary" for the crash, but I think it has something to do with finding the smoothing groups, because when I set Angle to 0 it sometimes works.[... i think there are errors before, but the console does not display them...]
File "C:\Program Files (x86)\Blender Foundation\Blender\2.58\scripts\addons\ASE_Export_ vMC.py", line 431, in sgCalculate
self.sgCalculate(data, face2)
File "C:\Program Files (x86)\Blender Foundation\Blender\2.58\scripts\addons\ASE_Export_ vMC.py", line 431, in sgCalculate
self.sgCalculate(data, face2)
File "C:\Program Files (x86)\Blender Foundation\Blender\2.58\scripts\addons\ASE_Export_ vMC.py", line 431, in sgCalculate
self.sgCalculate(data, face2)
[... and so on for a while ...]
File "C:\Program Files (x86)\Blender Foundation\Blender\2.58\scripts\addons\ASE_Export_ vMC.py", line 400, in sgCalculate
if face1 == face2:
RuntimeError: maximum recursion depth exceeded in comparison
location:<unknown location>:-1
location:<unknown location>:-1
BLI_dynstr_append text too long or format error.
greetings
FTC
FTC, your using the old 1.05 version, you need to upgrade to 1.1.
DamnI downloaded the older version (that red color of the link said "do not click" to me xD) And after quickly looking over the last few posts in this thread I thought it was still a problem.
I already started trying to figure out what caused the problem. The new version took care of that
greetings
Hi,
on the risk that I might have missed something again: When I export a mesh that does not have a (0,0,0)-rotation or -location or (1,1,1)-scale the exported ase looks accordingly wrong transformed.
That can be fixed by usingin the __init__ of cMesh at line 815.Code:bpy.ops.object.transform_apply(location=True,scale=True,rotation=True)
greetings
FTC
Bump? I was just wondering what the status for the 2.58 version of the script? Do you still have plans to finish it?
I haven't upgraded to 2.58 because the meshes I am currently working on will go into my map and I didn't want to have any technical issue with them. I presume the 1.1.0 version only works with 2.57x?
To my knowledge it should be working with 2.58...i have updated the script, but have not done thorough testing. Unless noone is telling me bugs, it should be all set lol. If there are bugs, let me know.
Compatibility question: When I open my meshes that I created with 2.57b and export them with 2.58a (using the latest 1.1.0 version??? since it's the same version number as the 2.57b compatible version)... my collision boxes get jacked up.
I created a basic cube and collision model just in 2.58a and it worked fine. I would hate to have to redo all of the collision boxes.
EDIT: I created new collision models and they are still messed up, unless I am forgetting to do something?
I named them "UCX_L1" and "UCX_L2". They don't have a material assigned to them. They are convexed shaped (6 faces each).
Last edited by Odedge; 08-06-2011 at 01:19 AM.
Material only? Material and image texture them (unique mat/tex for both), hopefully that should work. I coded it so that it doesnt check for UCX mats, but it bugs out sometimes when they share materials with the actual mesh your trying to export.
Here's the gameplan...I want to remove some of the functionality I put into the script and have it just do what it's meant to do. This last version of the export script was my first time programming a UI for blender, and it was an awful experience. You go to check online for reference material and you get it for all the 100 previous versions of blender - all different in syntax and application. So, here is what I have in mind...
1) remove all the fluff (smooth edge from angle, smooth edge from blah blah...)
2) create smooth groups from UV Islands by default, which is how it should be anyway
3) Export and win
All the extra stuff leaves room for bugs, i'd rather just cut my losses. Thoughts?
#2 is not a good idea, you need to be able to control them to get proper shading/normal maps. It's not your fault Blender doesn't support this stuff very well, your work is very much appreciatedFrankly what Blender needs is a proper FBX exporter, working with FBX in the major autodesk packages and UE is a dream, it just works.
Danimal
Space Flight Dev Thread/Video [Aug 2011] http://forums.epicgames.com/showthread.php?t=807107
Grapple Gun Playable Demo/Video [Nov 2010] http://forums.epicgames.com/showthread.php?t=752450
All that is really needed is having the option of creating smoothing groups from UV Islands or from sharp edgesTriangulation is something I always do before exporting.
my understanding was that normal maps get goofy if smooth groups dont match up with the uv islands. i'm just a lowly web developer who wanted to export something for my udk / blender hobbyist giggles. regardless, the way it does it now makes me cringe...i was forced to do it this way for performance, but it takes the uv's, saves what edges were marked as uv's, clears them, takes sharp edges, converts them to uv's, assigns smoothing groups, the restores the previous uv's. if i keep user control over the smoothing groups, i'll have to find another way to do it...unless blender finally updates the api with the functionality that was promised for 2.58!
I'll put some thought into it...the export "panel" has to go...
and i will be working on an fbx exporter in the future, when things slow down...some time in 2013...
@ MCampagnini
I will add materials to the UCX models later and report back.
As for the smooth groups, I am not experienced enough in that field to really comment. Though I wonder if the UV layout for texturing won't always match it for the smoothing groups?
Yah no, that's not how smoothing groups work. The short answer is, you *really* do need to be able to manually control them to get the best normal maps out, it isn't as simple as UV islands. Some of the more accessible reading on the issue is over at polycount, but for what it's worth, even industry vets struggle with this stuff. There's many a confused thread on the subject over at polycount. I personally prefer how Maya thinks of it (soft/hard edges) rather than "smoothing groups" but whatever you care to implement.
Simple overview of the issues that arise:
http://wiki.polycount.com/NormalMap#....26_Hard_Edges
I'd recommend reading the full article, but regarding smoothing groups you'll note that the article says "there are no hard rules, you must experiment", and this is precisely because of the different methods for calculating tangent based normals (this is the bigger issue). Summary, you gotta be able to define 'em due to different tangent basis renderers, simple rules don't give good visual results. Autodesk just put out a pretty good summary of the tangent basis issue as well, I can dig it up if you want.
Last edited by danimal'; 08-07-2011 at 07:23 AM.
Danimal
Space Flight Dev Thread/Video [Aug 2011] http://forums.epicgames.com/showthread.php?t=807107
Grapple Gun Playable Demo/Video [Nov 2010] http://forums.epicgames.com/showthread.php?t=752450
Hey,
I tried using the exporter and made sure that I did any changes needed to the script for 2.58a. But when I press export nothing appears in any directory folder....
I saw someone else had this problem on your site, but they didn't post the exact solution.
Does anyone know the fix for this?
Thanks
I believe i posted the solution in a comment above. The folder did not allow write privileges by default (somehow). My suggestion is to enable your blender console through the help window and get more details about what's going on with the export. Let me know how it turns out.
Ack! My post never posted.
Anyways, I did some more testing on my issue. I added materials to my UCX models and got the following error messages. I removed them and it exported, but the collision boxes aren't properly lined up in the editor
These are meshes that were originally created in 2.57b. Opened in 2.58a and exported with the 1.1.0 exporter (updated on July 9th).
I then did a little test and created a simple cube with 2 collision boxes in 2.58a with the same exporter mentioned before.
The blue box is the mesh and there are 2 collision boxes (named UCX_1 and UCX_2). All of them were selected when I exported, which went "fine".
In the UT 3 editor, I get this.
It only shows 2 primitives and the 1 collision primitive isn't set up correctly.
The material cannot be removed when it shares a material and texture image with the model itself. Change the name of the texture image on the collision model and it should work...if not, change the material name as well. Be sure that your collision models do not overlap at all...it may be better to keep a small space in between them. Let me know how this turns out.
Regarding the blue box example above...
- I made sure everyone object (mesh + 2 collision boxes) had a unique material name, texture name and image assigned to the texture.
- I made sure the 2 collision boxes were not touching.
I get the same error message as I posted before. To my understanding, the collision boxes shouldn't require a material/texture/image. Didn't you remove that requirement (which is a good thing).
So the issue should be that the collision boxes aren't staying in place when you export (for the most part).
This exporter is great, and I have figured out a few things though that are fixable without code, but can be a little bit of a bother.
I cannot export an object without a material and a texture applied to an object.
(It doesn't show up in the directory, but like I said there's a work around by just making the material and texture.)
And when I make a cylinder it scales it non-uniform on a random axis once imported into UDK, this I found no work around.
Updated to version 1.3 for Blender 2.59
Download at http://campagnini.net/
Traffic Barrel model is also available for download.
Last edited by MCampagnini; 09-06-2011 at 05:18 PM.
Are you using "Apply" on the objects before exporting? Based on the shots you posted above it looks like Blender (script) is reseting the objects to use their *original* POO and not repositioning them on export relative to the 0,0,0, grid. Shouldn't really rely on any scripts ability to do that if it's a feature.
The collision objects were not having l/r/s applied, the issue was resolved. I did have the script apply the transformations automatically in 1.3.
there was a problem with the 1.3 script, it is fixed and should be working now - if you had a forced compression error, download the script again.
Bookmarks