Jump to content
Sign in to follow this  
Leopotam

Blender import / export plugins

Recommended Posts

Discontinued.

Edited by Leopotam
Arma3 is crap. Sorry, but its true.

Share this post


Link to post
Share on other sites

Thats just awesome!

GJ Leopotam! Thanks for the contribution.

I don't use Blender, but now I'm wishing I did ;)

Share this post


Link to post
Share on other sites

Leopotam,

I seem to have a problem with the script(s), it doesnt seem to want to activate.

blender1.jpg

I also "Install Addon" from the menu (in Add-Ons), but that didnt seem to help

I now have 2 files in the 2.53/Scripts/Addons/ directory

Your file with .py, and a new one with .pyc

Sorry, new to Blender, and I cant see the problem.

Edited by [APS]Gnat

Share this post


Link to post
Share on other sites

[APS]Gnat, very strange. Both plugins activated? Are you sure, that checkboxes marked? If there are any errors - blender dont allow marking. Try enable import plugin only. If checkbox marked - new exporter will be installed in "File > Import".

UPD: Delete all copies of my plugins (search your profile too) and copy (NOT INSTALL through button on prefs panel!!!) again in scripts/addons.

deltaGHost, http://tinyurl.com/25utno9

Edited by Leopotam

Share this post


Link to post
Share on other sites

OMFG OMFG

Going to do some immediate testing with this!

REALLY hoping this works! :) :yay:

Edit:

Holy shitake mushroom, Batman! I was on 2.49(stable) and just grabbed 2.53. What a helluva difference in the GUI!

Edited by TRexian

Share this post


Link to post
Share on other sites

Thanks Leopotam, works now. Maybe because I loaded the lastest x64 version per your link.

I assume theres no texture mapping with your plugin ..... or is it I don't know how to use Blender yet?

Share this post


Link to post
Share on other sites

I can get the scripts to show in the addons (this is with the zipped x32 2.53) but when trying to import/export, they are not accessible. They do show up as "enabled" though in the addons screen.

Addons_p3d.jpg

The DOS window suggests there's at least one error that looks consistent:

AttributeError: 'NoneType' object has no attribute 'filepath'

Share this post


Link to post
Share on other sites

Bingo! Alpha builds FTW! :) Tested the import and seems to work well!

And... wow... UV mapping from .p3d to Blender appears saved, too.

Out-f'n-standing so far. Will need to wait and test the .blend -> .p3d workflow, but this is... REALLY exciting....

Share this post


Link to post
Share on other sites

Thanks Leopotam, but seems I still cant find any references to mapped texture files, or get any of the views or renders to show textures. Again, could be just me, new to Blender.

My models arent mapped with O2's UV map. I just "flat" map my models. I dont know if that makes a difference.

Share this post


Link to post
Share on other sites

Gnat-

I'm working up a quick how-to on this (since I wanted to know myself, too). Will have pics, but here's what I think you need to do:

- split the main screen into to parts, by grabbing the little diagonal bit in the upper right hand corner

- on the right side, in the lower left of the pane, there will be a button tha tpulls up all sorts of views, select the UV/Image Editor

- you should see UV mapping projected onto an empty space basically (first right click object on left side, then go to editor mode instead of object mode)

- in that right side pane, there is a button for Image, hit that and navigate to where the texture is

---- keep in mind, I don't think Blender recognizes paa, so I used png, but I think tga will also work

---- the texture should show up in that pane

- at the bottom left, there should be a button to change the bottom pane, select Properties

- more buttons should appear alongside, including a red/white checked one for Texture, hit that

- You should be able to select Type -> Image or Movie and from there navigate to the texture you selected above

- Then, up in the center pane, on the right next to the Object Mode button, there should be button that lets you select Textured/Solid/Wireframe/etc. Select Textured.

That should make the textured model show up in the main pane. It sounds more complicated than it really is. Like I said, I'll try to post some pics. Oh, and this is for importing a p3d into Blender. Haven't tested exporting to p3d yet.

Also - I guess this is a request - is there some way to hard-set the path to the texture? For instance, I typically dev in a folder different than the one I make into the pbo. I use the O2 mass texture rename tool when I'm done to set the pboprefix path that will be used in the final build. I'd like that same ability - to type in/navigate to the path where the folder will be, using a relative path, if that makes sense.

Thanks!

Edit:

Ok, it is actually a bit easier than I first described.

Open Blender and delete the box (that's kinda an old-school Blender thing):

deleteBox.jpg

Import your p3d, in this case, a desk that I made.

importedDesk.jpg

Split the pane into 2, with that little diagonal corner thingie:

diagGrab01.jpg

diagGrab02s.jpg

Until it looks something like this:

2paneS.jpg

(Split into 2 posts.)

Edited by TRexian

Share this post


Link to post
Share on other sites

(continued from previous)

Change the right side to the UV/Image editor:

selectUVEditor.jpg

Select the object on the left side by right clicking (it should turn orange):

uvEditorSelectObj.jpg

Change to edit mode:

uvEditorSelectObjEdit.jpg

Load the texture in the Image button:

UVimageOpen.jpg

uvImageLoaded.jpg

(still too many)

Share this post


Link to post
Share on other sites

(and finally...)

Then select to view the Textured mode:

viewTexturedS.jpg

Hope that helps. I'm still learning stuff about 2.53 - it is quite a departure from the previous versions.

And some smilies because I have some extra img tags to use up for this post.

:) :) :) :)

Share this post


Link to post
Share on other sites
Gnat;1721697']I still cant find any references to mapped texture files

I dont want to export material textures, because no importer in O2 for them (Or I dont know about it).

UPD: reuploaded exporter - forgot remove debug testing :(

Edited by Leopotam

Share this post


Link to post
Share on other sites

Exporter v0.3:

* Export material name (or 'EmptyMaterial' if not set)

* Export texture name for faces (or 'EmptyTexture' if not set). For example, texture from uv editor, saved or not.

Same link in first post.

Edited by Leopotam

Share this post


Link to post
Share on other sites

Excellent! Thanks!

Was playing with this more, and found that in the object properties, there is the ability to set LOD distance? Does that work? :) And, can you explain how to achieve the named selections, also? So, for instance, if I created a fireGeometry in Blender, how to make that export, or is that possible? :)

Share this post


Link to post
Share on other sites
found that in the object properties, there is the ability to set LOD distance? Does that work?

All custom object properties can be viewed and changed in 'Properties' roll-panel. 'Lod Distance' one of them. Just doubles.

And, can you explain how to achieve the named selections

Select vertices or faces, add vertex group with your name (user selection name, without '#') and link selected parts through press button 'assign'.

And look at example export video (attached to first post): I created custom selection with name 'LeftEye' and assign vertices and faces.

if I created a fireGeometry in Blender, how to make that export, or is that possible?

Find your correct distance here: http://community.bistudio.com/wiki/P3D_Model_Info#Resolution_Values

And insert in lod distance param.

Edited by Leopotam

Share this post


Link to post
Share on other sites

OMG - all these years in ArmA, and I'd never found that wiki page! :)

Outstanding.

And yes, in my excitement, I forgot to watch the vids. :doh: Sorry!

Share this post


Link to post
Share on other sites

Exporter v0.3.1:

* Add exception wrapper for situation without UV-data.

Same link in first post.

Share this post


Link to post
Share on other sites

Whoah! awesome.

You guys are workin far to quick for me lol ...

Thanks Leopotam

And thanks TRexian, great tutorial

Share this post


Link to post
Share on other sites

hehe

Well, don't thank me until you get it to work. ;)

Also, Leopotam, I've played with this a bit, and have a problem with a model. It seems like in converting it to p3d, it gets rotated VERY awkwardly. However, this is Blender model I started about 3 years ago and recently came back to. There could be any number of issues with it. I'll play with it a bit more, and if I can't make any sense of it, I'll zip it up and upload it someplace for you. Still loving what you're doing though! :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×