General tips to help move “fake” 3D Flash game to Away3D goodness?

Software: Away3D 4.x

Avatar
owntheweb, Jr. Member
Posted: 12 February 2013 02:51 PM   Total Posts: 32

Hello gurus,
Could I trouble you to help fill in the Q and A below? I’ll also fill in answers myself as I find them for future lookers (just typing the questions somewhere often helps me find and answer them quickly). :D

I made a working Flash mahjong concept in “fake” 3D some time back:
http://www.flickr.com/photos/8139783@N08/5740502326/in/photostream (snapshot)

Now I’m considering making it more engaging using Away3D! I love the skybox background opportunities combined with additional movement options (among many other great things to love).

So far I created a beveled tile in Blender and imported into Prefab using a Blender Collada export (interesting rotation added, but no big deal):
http://www.flickr.com/photos/8139783@N08/8467257849/in/photostream

Thanks in advance!

Chris


Q: In my “fake” 3D game, tiles glowed when selected, changing materials, hiding a shadow layer and revealing a glow layer underneath (will try to upload a screenshot or working concept later). Is it possible to change materials on the fly?
A: Guessing yes?

Q: Can materials emit light, or do I add lights separately?
A: Guessing separate - will look into tutorials

Q: Can my bottom half of my tile have a different material than the top half of my tile?
A: Guessing that I need to further split faces in Blender and re-import into Prefab.

Q: Can I overlay or specify a material to just the top face of the tile to show different artwork per tile?
A: ?

Q: In my “fake” 3D game, I had a single movieclip that contained all the artwork on separate frames. For best performance, is it better to specify a movieclip as a material, or export all the artwork as individual .png files and apply as a material that way? Vector vs bitmap? Vector movieclip vs vector sprite?
A: ?

Q: Should games take place in a peaceful timeless nebula, or hurl players into madness while burning up in an atmosphere?
A: AhhhhHhhgh!

xD

   

Avatar
Fabrice Closier, Administrator
Posted: 12 February 2013 04:14 PM   Total Posts: 1265   [ # 1 ]

the model is rotated because of different coordinates systems.
You can within Prefab rotate the object back and hit the applyRotation button.

yes you can change materials props

There is no material that emits light. But question is more, what exactly is the expected result? for instance updating surrounding meshes materials to simulate a light source from a given tile is possible at low efforts.

Yes you need to split. you can also import each parts in Prefab and merge as one. Keep in mind that only the as3 export supports multiple materials per mesh. awd spec 2.0 would require “collapse” to be on, which results in a split again. If not collapsed, only first encountered material is set for entire mesh.
The very basic mesh edit within prefab, will at some point allow this kind of manipulations.

yes you can swap, remove, replace, declare materials as you please. In this case, you could export geometries with no materials and define the material outside. And apply different ones based on whatever config/logic that you use.

You can use swf as “skin”, you simply need some asset manager that will retreive the mc and return you a bitmapData of it when required.

   

Avatar
owntheweb, Jr. Member
Posted: 12 February 2013 05:46 PM   Total Posts: 32   [ # 2 ]

Thanks Fabrice Closier for the super fast and helpful response!

I figured out the rotation apply. Today is my first experience with Prefab and has been very smooth so far. No worries on not applying multiple split materials (or really any materials for this project) in Prefab as ActionScript may be more preferable for that control anyway (super thankful I can import Blender work in general!).

The expected lighting result of a tile is to “light up” (change color) when selected, with a surrounding glow effect of some kind like the whole tile was emitting light on surrounding tiles. Your tip about making surrounding meshes simulate something like that is exciting. I look forward to learning more about this.

I think I follow your “skin” advise. In general though minus the logistic stuff, a material with artwork will need to be bitmap data before thrown on a surface, correct?

Thanks again,

   

Avatar
Fabrice Closier, Administrator
Posted: 12 February 2013 07:08 PM   Total Posts: 1265   [ # 3 ]

Glad you like the app and that its useful to you.

You have methods that you can use as well, such as ColorTransformMethod for your highlight, you can use Projector to alter secondary uv sets in combo with lightmaps etc… even the good old semi transparent sphere may help highlight at low costs depending on camera distance and or detailing…

yes that’s correct.

   

Avatar
owntheweb, Jr. Member
Posted: 13 February 2013 03:54 AM   Total Posts: 32   [ # 4 ]

Today was a great day and I learned a LOT. Here’s the bounty to show that your assistance was not wasted!:
http://www.flickr.com/photos/8139783@N08/8469049205/in/photostream

I’d show a working example, but it seems to fail when exporting as a swf from Flash CS6 (works great as AIR Desktop preview). Edit: looks like I need to sift through this post after debugging in browser:
http://away3d.com/forum/viewthread/1163/

The dark gray submesh will change colors the most with rollovers and clicks. I look forward to adding additional tiles with new artwork.

Additional tips are welcome. In general though I’d consider this topic “solved” and will post new, more specific inquiries.

Thanks much for the assist.

   

Avatar
owntheweb, Jr. Member
Posted: 13 February 2013 03:28 PM   Total Posts: 32   [ # 5 ]

Yay working demo!
http://www.christopherstevens.cc/away3d/tile1

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X