Sponsored Adverts

Author Topic: [ASE] Blender 2.57 ASE Export WITH Multi-Material  (Read 19661 times)

0 Members and 1 Guest are viewing this topic.

Offline MCampagnini

  • Newbie
  • Posts: 8
[ASE] Blender 2.57 ASE Export WITH Multi-Material
« on: April 15, 2011, 05:58:06 PM »
Please note: the ASE export script linked to below is provided by an offsite third party. Issues with the script itself (it not running in 'x' version of Blender for example) will require contacting the author directly.



ASE Export for Blender 2.6+
MCampagnini's ASE export script - supports ASE output with single or multiple materials and objects.
http://code.google.com/p/ase-export-vmc/

Download latest version (currently 2.5) for Blender 2.63
http://code.google.com/p/ase-export-vmc/downloads/detail?name=ASE250.zip


MC


Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2187
Re: Blender 2.57 ASE Export WITH Multi-Material
« Reply #1 on: April 15, 2011, 06:55:11 PM »
Yes, that's correct. The current version of the script isn't saving out a properly formatted ASE file where "Material > Sub-Material" relationships are concerned for UDK/UT; it's basically exporting everything out as a 'parent' Material regardless as to wither that's on an object with single or multiple mesh elements.

So to correct the script, the way it *used* to be done was that the material/sub-material relationship was determined by the object relationships and material assignments - for UDK/UT you'd join individual meshes together into a single unit and export that out; the material assignments applied to that then determine the sub-material relationships.

In rich_'s defense, that script was written originally for idtech and his update was similarly tasked which is why it outputs correctly for Material/Sub-Goemobjects but not the other way around. Bear in mind also that it currently doesn't save mesh-smoothing/smooth-group info (properly formatted mesh/vertex splits).

[EDIT] forgot to add, that I'll see about hosting any 'fixed' versions on KatsBits.. I've never been keen on using those 'free' (*cough*) hosting sites

Neither of these will work properly in UDK because it can't read sub-objects or independent materials, both end up with one material applied to everything.




Offline MCampagnini

  • Newbie
  • Posts: 8
Re: Blender 2.57 ASE Export WITH Multi-Material
« Reply #2 on: April 18, 2011, 11:21:29 PM »
Bumping since I edited original post and added a download link.

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2187
Re: Blender 2.57 ASE Export WITH Multi-Material
« Reply #3 on: April 19, 2011, 12:27:37 AM »
Shaping up nicely. Will test this when I get a chance.

A couple of comments. Max saves data pertaining to smooth groups at the "face" (polygon) level instead of the vertex where Blender (and other 3D apps) store it iirc. It tends to cause problems because UDK is effectively looking for Max formatting (face data) typically ignoring/merging vertex splits - it's been a real PITA over the years this one.

If you export based on what you're doing right now, 'complex' models will export every material even if they reference the same texture image (which is what you showed in the vid funny enough). Ideally you want it the other way around so you guarantee only material/texture data used gets exported. That or preface everything with "collapse and remove" unwanted and/or duplicate materials (which people will always forget to do).

Offline MCampagnini

  • Newbie
  • Posts: 8
Re: Blender 2.57 ASE Export WITH Multi-Material
« Reply #4 on: April 19, 2011, 05:25:19 AM »
Thanks for the comments - it was an adventure.  I updated the script with your recommendations. 

With the current version a material will not be exported if
  • It is not applied to any faces on the mesh
  • the texture image slot is not unique

Getting there...

MC

Offline MCampagnini

  • Newbie
  • Posts: 8
Re: [ASE] Blender 2.57 ASE Export WITH Multi-Material
« Reply #5 on: April 21, 2011, 05:05:57 AM »
ASE Exporter vMC 1.04
http://campagnini.net/2011/04/16/ase-export-for-blender-2-57/

  • Multiple Materials
  • Multiple UVs
  • Quality of Life updates

The info and video on the site will be updated tomorrow(4/21)...too late to do it now.

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2187
Re: [ASE] Blender 2.57 ASE Export WITH Multi-Material
« Reply #6 on: April 21, 2011, 05:17:13 PM »
Just testing export and then checking the ASE is a text editor so I've not yet opened either 'type' of output into the model viewer or UDK yet. So, multimaterial export seems to work properly relative to UDK type structure, there's a single mesh with single multmaterial (containing several sub-materials) as expected.

I'm finding that exporting the same model out composed of several sub-objects creates the expected separate "geom_objects" but not the associated individual material assignments; it looks like Blender is reading the first material it finds and assigning that as the primary and only material exported (a single material is being applied over everything).

For reference, this is how the ASE files are set up, as per the ASE export tutorial, the version on the left causes the above problem, the one on the right exports fine (which is what you'd do for multimaterialed objects [UDK]).

This is using the latest version you got uploaded as of me posting this.

PS. I'll update this once I've looked at the meshes in the model viewer.

Offline MCampagnini

  • Newbie
  • Posts: 8
Re: [ASE] Blender 2.57 ASE Export WITH Multi-Material
« Reply #7 on: May 04, 2011, 04:20:40 PM »
update -

export script handles multiple uv maps and calculates out smoothing groups based on an angle set by the user during export.  future plans will add an ability to manually set smooth groups instead of automatically generating them.  The more faces you have in your mesh, the longer it will take to calculate smoothing groups.

official forum:  http://forums.epicgames.com/showthread.php?t=776986

download: http://campagnini.net/2011/04/16/ase-export-for-blender-2-57/

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2187
Re: [ASE] Blender 2.57 ASE Export WITH Multi-Material
« Reply #8 on: May 04, 2011, 07:13:46 PM »
Thanks for the update, was wondering how things were progressing. Two points to consider;

1) not entirely sure why you've set the script up so it's calculating smoothing instead of just reading vertex split data in the file and 'format parsing' that (that's the only significant difference between Blender ASE and Max ASE where smoothing is concerned), much less costly and much quicker to do.

2) related to the above, I'm not sure why you've chosen to focus on angle based smoothing (to be set as default later?), it's practically useless for game content because it's arbitrary in implementation; the only reason people use it is because it's easier to do and more broadly, because they don't understand what smoothing is or how to properly set it up on a mesh. Both reasons result in incorrectly mesh smoothed models and encourage lazy/bad technique.

So, I'd suggest/recommend ditching the use of angle based smoothing and/or switching focus so it's an option rather than a default. I'd also find a way to parse scene data rather than have the script pull in a file and then do all the calculations (which it appears the script is doing right now?) - as an aside here, you may not know this but Goofos' very first ASE scripts for Blender did exactly what you're doing now with disastrous results, some files took tens of minutes, and very large files (terrains), hours, to output instead of seconds, it wasn't until he switched to simply parsing scene data that vast improvements were made. All you need to do is make sure the users applies any modifiers or force that on export.

Sometimes in trying to make thing easy one ends up making things more difficult  ;)

Other than the above, excellent work! ;D

[EDIT]I just read your smoothing tutorial and realised you're trying to replicate the limited mechanism that Max uses for it's smoothing systems, that's not going to work with Blender because there are two general problems with this approach.

1) as you noted in the tute, Max is limited to 32 groups so you have to be 'creative' with your application on more complex models (terrain again being a classic example) otherwise in trying to replicate Max output exactly, you're going to 'mush' (compress) groups together... that again means an arbitrary distribution based on what the script thinks is best, not the artist (the script doesn't know what the object is). If ASE is hard limited to using actual groups rather then just maintaining vertex splits (see below), then it's probably a better approach to output a warning to the user saying an object has more than the recommended groups and should be optimised better or some such... you've always got to keep control in the hands of the artist.

2) a smooth group in a game engine is ultimately nothing more than an area defined by a vertex split, so all you need to do is find a way to maintain that at output (easier sad than done I know); using Max as a reference is going to be problematic because it formats the same vertex split data as (face) 'groups', if those don't exist UDK et-al merges the very same vert splits that would otherwise be 'valid' groups were it not for their (incorrect) formatting.

Offline MCampagnini

  • Newbie
  • Posts: 8
Re: [ASE] Blender 2.57 ASE Export WITH Multi-Material
« Reply #9 on: May 06, 2011, 09:56:58 AM »
Great info, thanks for the feedback.  I have been working on a second way to define smooth groups, it is just not implemented live yet.  I am aware of performance issues when dealing with complex meshes, an 11k model took about 3 minutes to push out with angle based sg's. 

I'm working on a toolbar panel inside of blender to allow you to create user defined smoothing groups a little cleaner than going through your mesh and applying the sharp seams.  For simple meshes, it is still faster to let the script calculate out the smoothing groups automatically (assuming, as you have stated, there is not a section that breaks the angle limit and requires an "artist controlled" smoothing group).

I'll go through your list when im back home in the us. I believe having a panel to control how the export will function will provide a solution to most of the current limitations you have mentioned.  Thanks again,

MC

Offline motorsep

  • Jr. Member
  • *
  • Posts: 75
Re: [ASE] Blender 2.57 ASE Export WITH Multi-Material
« Reply #10 on: October 14, 2011, 08:45:16 PM »
The exporter is almost awesome. The reason for "almost" is that it doesn't export vertex color, which is needed for terrain textures blending in iD Tech 4+.
Is there any way that feature could be added in the next build?
Thank you.

Offline motorsep

  • Jr. Member
  • *
  • Posts: 75
Re: [ASE] Blender 2.57 ASE Export WITH Multi-Material
« Reply #11 on: October 22, 2011, 04:39:58 AM »
Hmm.. I though it's been actively developed :/

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2187
Re: [ASE] Blender 2.57 ASE Export WITH Multi-Material
« Reply #12 on: October 22, 2011, 04:50:29 AM »
It is, just not here. There's a greater call for ASE over on the UT/UDK forums (see the link a bit further up the page), I don't know if the author drops by here any more as the folks over there keep him pretty busy with requests and trouble-shooting.

Offline MCampagnini

  • Newbie
  • Posts: 8
Re: [ASE] Blender 2.57 ASE Export WITH Multi-Material
« Reply #13 on: December 15, 2011, 01:20:21 PM »
Kat is correct.    I try to drop by here every now and then, but it has been a while since my last visit.  I have already talked to motorsep on the UDK forums, but for for those viewing this post, the script has been updated since its' original release with the following features:

  • Smoothing Groups
  • Collision Objects
  • Vertex Painting
  • Multiple Materials
  • Multiple UV's
  • Blender 2.6 compatibility (should work with 2.61 as well, have not seen any python changes that would make the script fail)
  • More stuff that I cannot remember

If anyone needs to get in touch with me for support, contact me through my site (www.campagnini.net [dead link]) or the udk ase export thread - http://forums.epicgames.com/threads/776986-Blender-2.57-ASE-export.  Thanks!

Offline salamanderrake

  • Newbie
  • Posts: 9
Re: [ASE] Blender 2.57 ASE Export WITH Multi-Material
« Reply #14 on: May 21, 2012, 07:39:39 PM »
MCampagnini's new location for his ase exporter:
    http://code.google.com/p/ase-export-vmc/

Link to the  download for the updated version ( currently 2.0 ) that works with blender 2.63:
      http://code.google.com/p/ase-export-vmc/downloads/detail?name=ASE_Export_v2.zip

 

Sponsored Adverts
RSS Content is copyright © KatsBits™ 2017 unless otherwise stated. All Rights Reserved.
No part of this web site may be reproduced (except for personal use, or otherwise stated) without prior written permission from KatsBits.com. For more infomation on copyright click here.
Web design cpdtAdvertisePrivacy PolicyDMCA (about DMCA) Home Store Workshops Blog Jobs Support About Katsbits Contact Site Search KatsBits Help Site Map RSS feed Forum YouTube FaceBook LinkedIn Twitter IMVU