apply baked material maps workflow

Software: Prefab3D

hfeist, Jr. Member
Posted: 15 January 2013 01:16 AM   Total Posts: 37

can anyone advise how i might apply “baked” materials to the model in the attached image. i have been unable to find clues to how cubic maps, methods, et al actually work in practice.



hfeist, Jr. Member
Posted: 15 January 2013 11:56 PM   Total Posts: 37   [ # 1 ]

I should mention that the model has been exported as a class so I’m not able to use the soldierAnt method in the Basic_Load3DS example.

what i’d really like to do is work with shadows, reflections, etc inside Prefab and have it show up in the finished class.

any examples or tutorials out there?


Fabrice Closier, Administrator
Posted: 16 January 2013 09:18 AM   Total Posts: 1265   [ # 2 ]

I will no go in details but all I can say is watch the upcomming updates.
The next update will bring something that should change the way you worked in Prefab until now.
This new capability enables me to build in propperly a new breed of features. Lightmaps support/edit/generation/export is just one of them… They will be gradually added now that the big underlaying work is finally up&running;.


hfeist, Jr. Member
Posted: 16 January 2013 06:22 PM   Total Posts: 37   [ # 3 ]

that will be music to many ears!


hfeist, Jr. Member
Posted: 02 December 2013 07:01 PM   Total Posts: 37   [ # 4 ]

Here I am many months later revisiting the same question. Now that Prefab has all these powerful new features I’m hoping someone might care to lay out the steps necessary to take the rendered method and apply it within an as3 file that loads the exported AS3 class.


Fabrice Closier, Administrator
Posted: 03 December 2013 01:18 PM   Total Posts: 1265   [ # 5 ]

The export to AS3, for lightmaps is already working in current release. The next update will only allow you to render the maps and automate the method generation.


hfeist, Jr. Member
Posted: 03 December 2013 03:16 PM   Total Posts: 37   [ # 6 ]

The next update is what I’m after I suppose.
I have managed to learn how to copy PointLight code from the generated file and paste it into my main class—the one that loads the exported AS3 class. It works well but performance is very sluggish in IOS. Baked lights seem the way to go but I can’t grasp how to make use of the code in though.


Fabrice Closier, Administrator
Posted: 03 December 2013 03:59 PM   Total Posts: 1265   [ # 7 ]

The code of ASBase is ready to be used as is. You do not need do anything, when you do new MyExportedClass() its automatically used to generate the content by the classes that were exported next to your main class. If you cannot run the project class or the exported class, check your packages and the one you typed into Prefab export field.

The demo project class works out of the box (if package is set accordingly) and it would restore what you did in Prefab. If you run only the exported class, (the one you gave a name to), you need to import it in your project and simply addChild it or parse its meshes array and addChild them at will if you use it as storage object.
For both, exported class/demo Project, you must keep the exported data files untouched (unless you are familiar with their structure), the asbase is one of them.

Another note for next update, the asd files generated with the as3 will be even faster on mobile for 4.1 projects. Both new and older asd files can be imported in Prefab (next update) for eventual edit or port to newer version. If you would update a project with the new one, you would also need to reexport the parser than comes with the as3 exports. New options were also added to asd exporter panel, where you will be able to choose the version that matches your project.


hfeist, Jr. Member
Posted: 03 December 2013 10:41 PM   Total Posts: 37   [ # 8 ]

I’m sorry for not being clear. I’ve no trouble loading the exported class into my main script at all. The steps you mention (thank you very much for verifying my guesswork) are essentially how I have done it.
When I compile the project in FB the materials are all in place on the correct meshes but without baked lighting. That’s what I’m trying to understand—how to bake the lighting and make it appear in the scene.



Away3D Forum

Member Login