PreFab

7 views
Skip to first unread message

colouredfunk

unread,
Jan 13, 2010, 5:32:19 AM1/13/10
to Away3D.dev
Hiya

I’m want to use PreFab to weld the vertices of my 3ds file before
loading it into the Away3D project. The 3ds model is textured baked,
with all the textures merged into one external file, relative to the
root of the 3ds.

I import it into prefab – looks OK
Weld the object – loads of vertices weld – sweet!

Now when it comes to exporting I have a few probs; not too sure which
one is the best option, I’ve tried all of them and can’t get any of
them to work. Awd; my big merged texture map gets dupped for each
object in the scene, not ideal. When I import it back into prefab, no
textures load. Obj; doesn’t import back into prefab at all. AS; when
loading in flash, nothing shows....


So based on the above I’m a bit list where I’m going wrong. What
target is best, AWD? My scene is a basic room with no animations...

Thanks in advance!

Fabrice3D

unread,
Jan 13, 2010, 6:33:16 AM1/13/10
to away3...@googlegroups.com
I'm in middle of import exports for a project atm, and I'm exporting to awd reloading back in Prefab without any problems..

Are you sure you run the latest Prefab? (check update btn) I recall fixing a bug similar to this in earlyer versions...
If this is the case, it would be extremly handy for me to get a model + your flow to try reproduce if indeed the
export/reimport fails (offline)

For your project awd or as3 would do just fine

Fabrice

Dave

unread,
Jan 14, 2010, 9:11:26 AM1/14/10
to Away3D.dev
And don't forget to use PreFab's awesome normal map generator!
POSSIBLY my favourite feature about this awesome Air app. Great work
Fabrice!!!

Fabrice3D

unread,
Jan 14, 2010, 9:25:30 AM1/14/10
to away3...@googlegroups.com
thx Dave!
Looking at the new features I have running on my dev version on my screen
I hope your POSSIBLY will become a SURELY :))

Just a few more days till next update...

Fabrice

Dave

unread,
Jan 15, 2010, 7:15:57 AM1/15/10
to Away3D.dev
Awesome. Look forward to it!
One question I have is about the parser you're using in Prefab...

I have a model with some textures and when I use my code in Flash
(Away FP 10), it can't find some textures etc/things are a little
messed up.
However, when I drag and drop it into PreFab, it looks great. Is
there any way you can show us the code PreFab is using to import DAEs
please as I think your code is looking to be the best.

Obviously there's a few different ways to parse DAE but I'd be
interested to know the difference between my code and yours and where
I may be going wrong.

Thanks again,
Dave

Fabrice3D

unread,
Jan 15, 2010, 3:47:34 PM1/15/10
to away3...@googlegroups.com
Actually there is no extra magic, Prefab uses the trunk. So its pure Away magic :)
The only custom diff being overriding the filemateriallib in abstractparser to fit internal requirements of the app and unique (re)naming of each meshes.
Few checks are also done during the parsing, but if you do not get any warning, then the result should be identical
once loaded into your project.

If the file doesn't hold animation, why not trade it for a lightweight .awd or .as3 export from Prefab?

Fabrice

colouredfunk

unread,
Jan 16, 2010, 6:56:41 AM1/16/10
to Away3D.dev
Hey Fabrice, Thanks for your reply!!! Yeah I'm using the latest
version...Is it cool to email the files over? What's your email
address?

colour...@gmail.com

> >>>> Thanks in advance!- Hide quoted text -
>
> - Show quoted text -

Fabrice3D

unread,
Jan 16, 2010, 9:25:41 AM1/16/10
to away3...@googlegroups.com
> Is it cool to email the files over?
All the files you need are in trunk. How cool is that?? :))
if you want do same as Prefab, just rename meshes so that they are unique and not null, ensure meshes materials are applied at mesh level instead
of faces.

Considering the fact that this override do fix your issues, this means that you have probably meshes with muliple materials
or that you have meshes/materials in your file using same id's. So looking/fixing your file xml should resolve your issue without writing a single line of code.

Fabrice

colouredfunk

unread,
Jan 18, 2010, 3:17:37 AM1/18/10
to Away3D.dev
"Are you sure you run the latest Prefab? (check update btn) I recall
fixing a bug similar to this in earlyer versions...
If this is the case, it would be extremly handy for me to get a model
+ your flow to try reproduce if indeed the
export/reimport fails (offline) " - Shall I email the files over?

On Jan 16, 2:25 pm, Fabrice3D <fabric...@gmail.com> wrote:
> > Is it cool to email the files over?
>
> All the files you need are in trunk. How cool is that?? :))
> if you want do same as Prefab, just rename meshes so that they are unique and not null, ensure meshes materials are applied at mesh level instead
> of faces.
>
> Considering the fact that this override do fix your issues, this means that you have probably meshes with muliple materials
> or that you have meshes/materials in your file using same id's. So looking/fixing your file xml should resolve your issue without writing a single line of code.
>
> Fabrice
>
> On Jan 16, 2010, at 12:56 PM, colouredfunk wrote:
>
>
>
> > Hey Fabrice, Thanks for your reply!!! Yeah I'm using the latest
> > version...Is it cool to email the files over? What's your email
> > address?
>

> > colouredF...@gmail.com

> >> - Show quoted text -- Hide quoted text -

colouredfunk

unread,
Jan 18, 2010, 4:35:32 AM1/18/10
to Away3D.dev
Hey Fabric,

Sorry just doubed checked again and I wasn't using the latest
version, I've upgraded now and it imports back into PreFab Ok.

But I'm still having duplicated images after export or none at all :

"Now when it comes to exporting I have a few probs; not too sure
which
one is the best option, I’ve tried all of them and can’t get any of
them to work. Awd; my big merged texture map gets dupped for each
object in the scene, not ideal. When I import it back into prefab, no
textures load. Obj; doesn’t import back into prefab at all. AS; when
loading in flash, nothing shows.... "

Fabrice3D

unread,
Jan 18, 2010, 5:12:09 AM1/18/10
to away3...@googlegroups.com
Yes, if you send me your files over, I can try figure out what is going wrong
note that I have loads of work, so do not expect a respons in the hour. :)

Also I found out thx to a user, that when Prefab runs on windows that the menus are not same as on mac, therefor the update option
may not be available depending on version. This issue has been fixed for next release.
The latest available is 1.109, if the version is not this one, go to www.closier.nl/prefab and download/install again.

Which brings me to the following:
For Windows, I do have a tmp solution (an extra layer using movieclip is added to the interface) in order to mimic the system os menu like on the mac version.
Does someone knows how to fill the 0S menu on windows using AIR 1.5?
So far I've failed at finding doc/info on this. So if one of you has a hint, please drop me a mail. thx.

Fabrice

Fabrice3D

unread,
Jan 18, 2010, 5:18:39 AM1/18/10
to away3...@googlegroups.com
Prefab works for now as "one material per mesh", if it finds multiple material, one is kept per mesh.
I hope be able add support for muliple materials in upcomming releases.

Fabrice

Joshua Granick

unread,
Jan 18, 2010, 5:19:44 AM1/18/10
to away3...@googlegroups.com
Hey Fabrice,

Is this similar to what you are currently using for your menus?

http://help.adobe.com/en_US/FlashPlatform/develop/actionscript/3/WS5b3ccc516d4fbf351e63e3d118666ade46-7de7.html


The documentation says that this should apply to both Windows and OS X. Perhaps Windows needs the default system chrome in order to display the menus correctly?

Fabrice3D

unread,
Jan 18, 2010, 5:51:32 AM1/18/10
to away3...@googlegroups.com
I'm gonna try that thx a lot!
Reading at info and doc, it seams that what I want doesn't work on Windows anyway.
According to this code, the menus are added to a floating Window, not the menubar as on the mac.

But since the mainscene stays on screen, looks like this gonna be way better on Windows than the actual tmp solution.

Its gonna be added next release,
thx again for the tip Joshua!

Fabrice

Joshua Granick

unread,
Jan 18, 2010, 6:01:01 AM1/18/10
to away3...@googlegroups.com
Yeah, I think it will be great! The temp MovieClip solution would stack underneath other windows sometimes, making it hard to get to the menu. I think it would be fine if it attached to the scene window.

Thanks Fabrice :)

Fabrice3D

unread,
Jan 18, 2010, 6:13:57 AM1/18/10
to away3...@googlegroups.com
Already busy implementing...

> think it would be fine if it attached to the scene window.

The idea is to make the app as good/seamless as possible on both platform.

Fabrice

colouredfunk

unread,
Jan 20, 2010, 5:24:09 AM1/20/10
to Away3D.dev
Great thanks Fabrice!!

http://www.funkyjunk.me.uk/ImagesForExternals/roomD.zip

On Jan 18, 11:13 am, Fabrice3D <fabric...@gmail.com> wrote:
> Already busy implementing...
>
> >  think it would be fine if it attached to the scene window.
>
> The idea is to make the app as good/seamless as possible on both platform.
>
> Fabrice
> On Jan 18, 2010, at 12:01 PM, Joshua Granick wrote:
>
>
>
> > Yeah, I think it will be great! The temp MovieClip solution would stack underneath other windows sometimes, making it hard to get to the menu. I think it would be fine if it attached to the scene window.
>
> > Thanks Fabrice :)
>

> > On Mon, 18 Jan 2010 02:51:32 -0800, Fabrice3D <fabric...@gmail.com> wrote:
>
> >> I'm gonna try that thx a lot!
> >> Reading at info and doc, it seams that what I want doesn't work on Windows anyway.
> >> According to this code, the menus are added to a floating Window, not the menubar as on the mac.
>
> >> But since the mainscene stays on screen, looks like this gonna be way better on Windows than the actual tmp solution.
>
> >> Its gonna be added next release,
> >> thx again for the tip Joshua!
>
> >> Fabrice
>
> >> On Jan 18, 2010, at 11:19 AM, Joshua Granick wrote:
>
> >>> Hey Fabrice,
>
> >>> Is this similar to what you are currently using for your menus?
>

> >>>http://help.adobe.com/en_US/FlashPlatform/develop/actionscript/3/WS5b...


>
> >>> The documentation says that this should apply to both Windows and OS X. Perhaps Windows needs the default system chrome in order to display the menus correctly?
>

> >>> On Mon, 18 Jan 2010 02:12:09 -0800, Fabrice3D <fabric...@gmail.com> wrote:
>
> >>>> Yes, if you send me your files over, I can try figure out what is going wrong
> >>>> note that I have loads of work, so do not expect a respons in the hour. :)
>

> >>>> Also I found out thx to a user, that whenPrefabruns on windows that the menus are not same as on mac, therefor the update option


> >>>> may not be available depending on version. This issue has been fixed for next release.

> >>>> The latest available is 1.109, if the version is not this one, go towww.closier.nl/prefaband download/install again.


>
> >>>> Which brings me to the following:
> >>>> For Windows, I do have a tmp solution (an extra layer using movieclip is added to the interface) in order to mimic the system os menu like on the mac version.
> >>>> Does someone knows how to fill the 0S menu on windows using AIR 1.5?
> >>>> So far I've failed at finding doc/info on this. So if one of you has a hint, please drop me a mail. thx.
>
> >>>> Fabrice
>
> >>>> On Jan 18, 2010, at 9:17 AM, colouredfunk wrote:
>

> >>>>> "Are you sure you run the latestPrefab? (check update btn) I recall


> >>>>> fixing a bug similar to this in earlyer versions...
> >>>>> If this is the case, it would be extremly handy for me to get a model
> >>>>> + your flow to try reproduce if indeed the
> >>>>> export/reimport fails (offline) " - Shall I email the files over?
>
> >>>>> On Jan 16, 2:25 pm, Fabrice3D <fabric...@gmail.com> wrote:
> >>>>>>> Is it cool to email the files over?
>
> >>>>>> All the files you need are in trunk. How cool is that?? :))

> >>>>>> if you want do same asPrefab, just rename meshes so that they are unique and not null, ensure meshes materials are applied at mesh level instead


> >>>>>> of faces.
>
> >>>>>> Considering the fact that this override do fix your issues, this means that you have probably meshes with muliple materials
> >>>>>> or that you have meshes/materials in your file using same id's. So looking/fixing your file xml should resolve your issue without writing a single line of code.
>
> >>>>>> Fabrice
>
> >>>>>> On Jan 16, 2010, at 12:56 PM, colouredfunk wrote:
>
> >>>>>>> Hey Fabrice, Thanks for your reply!!! Yeah I'm using the latest
> >>>>>>> version...Is it cool to email the files over? What's your email
> >>>>>>> address?
>
> >>>>>>> colouredF...@gmail.com
>
> >>>>>>> On Jan 15, 8:47 pm, Fabrice3D <fabric...@gmail.com> wrote:

> >>>>>>>> Actually there is no extra magic,Prefabuses the trunk. So its pure Away magic :)


> >>>>>>>> The only custom diff being overriding the filemateriallib in abstractparser to fit internal requirements of the app and unique (re)naming of each meshes.
> >>>>>>>> Few checks are also done during the parsing, but if you do not get any warning, then the result should be identical
> >>>>>>>> once loaded into your project.
>
> >>>>>>>> If the file doesn't hold animation, why not trade it for a lightweight .awd or .as3 export fromPrefab?
>
> >>>>>>>> Fabrice
>
> >>>>>>>> On Jan 15, 2010, at 1:15 PM, Dave wrote:
>
> >>>>>>>>> Awesome.  Look forward to it!
> >>>>>>>>> One question I have is about the parser you're using inPrefab...
>
> >>>>>>>>> I have a model with some textures and when I use my code in Flash
> >>>>>>>>> (Away FP 10), it can't find some textures etc/things are a little
> >>>>>>>>> messed up.

> >>>>>>>>> However, when I drag and drop it intoPreFab, it looks great.  Is
> >>>>>>>>> there any way you can show us the codePreFabis using to import DAEs


> >>>>>>>>> please as I think your code is looking to be the best.
>
> >>>>>>>>> Obviously there's a few different ways to parse DAE but I'd be
> >>>>>>>>> interested to know the difference between my code and yours and where
> >>>>>>>>> I may be going wrong.
>
> >>>>>>>>> Thanks again,
> >>>>>>>>> Dave
>
> >>>>>>>>> On Jan 14, 2:25 pm, Fabrice3D <fabric...@gmail.com> wrote:
> >>>>>>>>>> thx Dave!
> >>>>>>>>>> Looking at the new features I have running on my dev version on my screen
> >>>>>>>>>> I hope your POSSIBLY will become a SURELY  :))
>
> >>>>>>>>>> Just a few more days till next update...
>
> >>>>>>>>>> Fabrice
>

> >>>>>>>>>> On Jan 14, 2010, at 3:11 PM, Dave wrote:> And don't forget to usePreFab'sawesome normal map generator!


> >>>>>>>>>>> POSSIBLY my favourite feature about this awesome Air app.  Great work
> >>>>>>>>>>> Fabrice!!!
>
> >>>>>>>>>>> On Jan 13, 10:32 am, colouredfunk <colouredf...@googlemail.com> wrote:
> >>>>>>>>>>>> Hiya
>

> >>>>>>>>>>>> I’m want to usePreFabto weld the vertices of my 3ds file before


> >>>>>>>>>>>> loading it into the Away3D project. The 3ds model is textured baked,
> >>>>>>>>>>>> with all the textures merged into one external file, relative to the
> >>>>>>>>>>>> root of the 3ds.
>

> >>>>>>>>>>>> I import it intoprefab– looks OK


> >>>>>>>>>>>> Weld the object – loads of vertices weld – sweet!
>
> >>>>>>>>>>>> Now when it comes to exporting I have a few probs; not too sure which
> >>>>>>>>>>>> one is the best option, I’ve tried all of them and can’t get any of
> >>>>>>>>>>>> them to work. Awd; my big merged texture map gets dupped for each

> >>>>>>>>>>>> object in the scene, not ideal. When I import it back intoprefab, no
> >>>>>>>>>>>> textures load. Obj; doesn’t import back intoprefabat all. AS; when

Fabrice3D

unread,
Jan 20, 2010, 6:32:10 AM1/20/10
to away3...@googlegroups.com
as you can see, the menu works now in Windows, thx to joshua's tip :)

http://www.closier.nl/playground/prefab/prefab_vista.jpg
http://www.closier.nl/playground/prefab/prefab_xp.jpg

Fabrice

Joshua Granick

unread,
Jan 20, 2010, 3:52:58 PM1/20/10
to away3...@googlegroups.com
Does PreFab check for new versions automatically?

Is there any way to update to this newer version? :)

Fabrice3D

unread,
Jan 20, 2010, 4:07:38 PM1/20/10
to away3...@googlegroups.com
I'm busy right now... some new features are generating nice "neurones burners" :))
but an update should be available very soon, I'll mail here when so far.

Fabrice

Joshua Granick

unread,
Jan 20, 2010, 4:12:02 PM1/20/10
to away3...@googlegroups.com
Thank you. Take your time :)

colouredfunk

unread,
Jan 31, 2010, 1:29:19 AM1/31/10
to Away3D.dev
Hey Fabrice, Just wondering if you have had a chance to look into why
my model is exporting mutliple maps of the same image? Thanks again!!

On Jan 20, 9:12 pm, "Joshua Granick" <jos...@joshuagranick.com> wrote:
> Thank you. Take your time :)
>

> On Wed, 20 Jan 2010 13:07:38 -0800, Fabrice3D <fabric...@gmail.com> wrote:
> > I'm busy right now... some new features are generating nice "neurones burners" :))
> > but an update should be available very soon, I'll mail here when so far.
>
> > Fabrice
>
> > On Jan 20, 2010, at 9:52 PM, Joshua Granick wrote:
>

> >> DoesPreFabcheck for new versions automatically?


>
> >> Is there any way to update to this newer version? :)
>

> >>>>>>>>> The latest available is 1.109, if the version is not this one, go towww.closier.nl/prefabanddownload/install again.

Fabrice3D

unread,
Jan 31, 2010, 3:26:22 PM1/31/10
to away3...@googlegroups.com
Hi coloured funk
Just tried, and it looks like you have many doubled faces. Most of them being single meshes
Prefab makes sure that each mesh gets its own map, so if you pass more meshes you get more maps.
The weld, doesn't "group" meshes, it ensures no double vertexes and uv's are set on a mesh.
Not in Prefab yet, but in Away, you have Merge. This class makes one Mesh of 2
so if you loop over your model and pass the pieces to the class, it will in the end result in one single mesh.

What you need to do, if you want to keep the multiple meshes as 3ds or awd/as3, you need to export another mesh, Merged
prebake, then export as as3 or awd.
If you want to get one map yet applied to multiple meshes, just import this model (once you have deleted the double faces)
then correct by hand the outputs so that it uses only this map.

Indeed the more Prefab does, the more you want. And Merge, multiple selection of objects types are some of the features
that I hope be able implement in future updates...

Fabrice

Reply all
Reply to author
Forward
0 new messages