Need Help with the Basics in Away3d 4.x(Loading Mesh, Mesh w/textures, understanding a few things)

Software: Away3D 4.x

dubletar, Member
Posted: 12 January 2012 11:57 PM   Total Posts: 73

Hi Away Community!

First, I want to say that I have fallen in love with Away3D. I have been checking out 3d Engines for flash for about 2 weeks and finally settled upon Away 3d for a few reasons:
*Open Source
*Ability to contribute to it
*Simple installation and source code access

Two friends and myself are working on a project I began a year ago and we want to go 3d.

After diving into Away3d 4.x, using Flash CS5, coding in Flash Builder…

We dont know where to begin.

I’ve been unable to understand the away3d for 2 weeks, and this week I took off 4 days from work to sit down, read resources and figure it out. :( fail… I feel like a newb all over again…

So here’s my Q’s (which I know has been asked a million times):

1. View3D: How does that work!? When added to the stage, does it act like a movie clip would? or does it act like a window? It is automatically sized as the entire stage? or does the size need to be defined?

2. Loading Mesh: We’re new to 3d and flash. Whats the best format to load static objects (like a house)? and the best format for animated objects ? and best for non-bone animated 3d objects?

3. How do we load a simple mesh into Away3D? Ive searched and downloaded plenty of resources, but they are for Away3D 3.x, not 4.x.

4. How do we load the skins/texture to these 3d objects?

Please, please help!

Once I understand these things and create our application online, I want to begin contributing to Away3D, financially, and via online support. I want to create a library of info with all newbish questions explaining everything in detail, so people like my self can hit the ground running.

I truly appreciate it!

   

Avatar
Matse, Sr. Member
Posted: 13 January 2012 06:05 PM   Total Posts: 149   [ # 1 ]

Hi dubletar,

you probably didn’t get answers because the forum is swarmed with those questions, use the search feature wink

First of all make sure you get the “right” version of away3D, you should get it from here :
https://github.com/away3d/away3d-core-fp11 (notice the “zip” button, clicking on it will prompt you to download the whole away3d lib as a zip file)

This is the “master” branch, I didn’t check those last days but personaly I’d go with the “dev” branch which is meant to become away3D4 Beta (Away3D is still “Alpha” currently, although it’s very stable and all)

depending on the branch you start with, you will probably want to get the associated example files. Beware those might work or not as the code base is still evolving and examples are not always up to date. Typically some will work, some won’t (it’s usually pretty easy to fix them if you really want to)

Examples for the master branch should be those ones :
https://github.com/away3d/away3d-examples-fp11

for the dev branch I’m not sure, I’d try those :
https://github.com/away3d/away3d-examples-fp11/tree/texturerefactor

Don’t get scared with those master/dev branch though : it’s not a whole different world, but there are changes that you need to account for in your code.
See this blog post by DerSchmale about “dev branch” :
http://www.derschmale.com/2011/12/27/the-away3d-dev-branch/
I recommend you read his other blog posts too wink

Ok now to your questions

1. View3D is a Sprite, it just displays the 3D scene. You have to resize it if you need ( myView.width = 300; )

2. It really depends on what 3D software you’re using. .OBJ works pretty good, it’s a bit “fat” on the filesize. .3DS works good too, has smaller filesize but won’t import multi-materials.
For bones-animated meshes MD5 or AWD2
For vertex-animated meshes MD2

3. This is something you will easily find in the example files I pointed you to. AssetLibrary class is good for that although there are other ways too. Look at the examples, do a search on the forum with “AssetLibrary” and if you don’t manage to load a mesh post again in this thread I’ll try to take some time to clean up the class I use for my game and post it.

4. Nothing special here, the same way you would load any bitmap image (jpeg/png/whatever), then it depends on the branch you use. Master branch will let you assign a BitmapData to a Material directly while with Dev branch you’ll create a texture from the BitmapData then assign that texture to a Material.

Yeah some wiki or something would be really nice, for newcomers of course but also experienced ones to share knowledge and all. The forum is meant for this too but it requires quite some digging/searching.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X