Printable Version of Topic
Sandy's Forum _ AS2 1.x versions _ texutre theory
Posted by: mont Aug 21 2006, 09:57 AM
Hi Everyone,
I am analyzing SANDY for my new 3D project, but i have some doubts
regarding the texture.first of all i want to know can't we apply the
texture without importing the bmp or jpg file into the fla file.Second
i am using MAYA for creating my complex 3d shapes, after i export the
wrl file and use it in the project, it will not work however the same
if i do in 3dsmax it will work,so is there any problem with MAYA.
Hope i get quick reply.
MOnt
Posted by: kiroukou Aug 21 2006, 10:58 AM
Hi,
Texture pictures do not need to be embeded in a fla file.
The
wrl file format generated by Maya may be a bit different from the one I
used to create the parser. However the ASe parser seems to be more
robust, so you should try to use it instead of wrl.
And it would be better to say what is wrong with your test. It would help me to fix the problems...
++
Posted by: mont Aug 21 2006, 11:41 AM
Hi kiroukou
Attached File(s)
MotherBoard.zip ( 781.78k )
Number of downloads: 23
WrlTest.fla ( 608.47k )
Number of downloads: 19
Posted by: kiroukou Aug 21 2006, 11:45 AM
There is a problem with the zip file you've attached
Posted by: mont Aug 21 2006, 12:29 PM
QUOTE(kiroukou @ Aug 21 2006, 11:45 AM)

There is a problem with the zip file you've attached

Hi Kiroukou,
Need to know the other way to apply texture without importing the picture file
also the ASE file is 72kb it gives problem in rendering also
Attached File(s)
Mother_Board.zip ( 10.09k )
Number of downloads: 25
Posted by: kiroukou Aug 21 2006, 01:42 PM
the technic to apply an external texture is very simple, and you can find it on the demos source files or in this board.
You just have to load the picture, and convert it to a BitmapData.
As it is more a flash problem, I'll let you search on the web (or the flash documentation).
Let me know if you have some problems...
Concerning the ASE file, 72kb should be good and easy to render.
Posted by: mont Aug 21 2006, 02:32 PM
QUOTE(kiroukou @ Aug 21 2006, 01:42 PM)

the technic to apply an external texture is very simple, and you can find it on the demos source files or in this board.
You just have to load the picture, and convert it to a BitmapData.
As it is more a flash problem, I'll let you search on the web (or the flash documentation).
Let me know if you have some problems...
Concerning the ASE file, 72kb should be good and easy to render.
Thanks kiroukou
I am applying texture in flash through SANDY texture class.
This is how I implementing texture on 3d object.
skin = new TextureSkin( BitmapData.loadBitmap( 'texture' ) );//linkage id
Object3D(_o).setSkin( skin );
But
my question is that, can I export the .ASE file with the texture
information in flash, do I need to save all the texture information in
the .ASE file.
Posted by: kiroukou Aug 21 2006, 10:01 PM
QUOTE
But
my question is that, can I export the .ASE file with the texture
information in flash, do I need to save all the texture information in
the .ASE file.
Yes
Posted by: mont Aug 22 2006, 07:45 AM
QUOTE(kiroukou @ Aug 21 2006, 10:01 PM)

Yes

Hi,
I am saving my all the texture information in .ASE file format. The file has a refrence of a jpg file like :::
*MAP_CLASS "Bitmap"
*MAP_SUBNO 1
*MAP_AMOUNT 1.00
*BITMAP "RAM_MAP.jpg"
The
file also has a (*MATERIAL_LIST) tag.I am parsing the whole file
through .ASE parser but it does not show anything after compilation.but
if i import the "RAM_MAP.jpg" file into flash library and use it as an
bitmap data, it gives the result.
My question is whether my .ASE
file has information of the material or not, if yes then why it does
not visible without importing the bitmap,and if not how can i store
material information in the .ASE file(A link can be useful here)
Thanks
Posted by: kiroukou Aug 22 2006, 08:06 AM
Oh ok, I get it!
No the ASE parser doesn't read the BITMAP field directly! (But it's something I'll keep in mind!)
The ASE parser reads the vertex, texture coordinates, faces declarations, tags. that's all.
You
have to load the picture RAM_MAP.jpg here into a movieclip
(MovieClipLoader, etc..) and then simply convert this movieClip content
into a BitmapData object, to pass into arguments to the TextureSkin
object.
Look at the cubicPano demo sources, this technic is used there.
++
Posted by: mont Aug 22 2006, 09:35 AM
QUOTE(kiroukou @ Aug 22 2006, 08:06 AM)

Oh ok, I get it!
No the ASE parser doesn't read the BITMAP field directly! (But it's something I'll keep in mind!)
++
Thanks kiroukou for your quick explanation
Kiroukou
one solution for this is, we can read the bitmap entry from xml and
pass it to the JSFL for importing the bitmap directly into flash, in
this way user dose not need to import it manually.
I have two more questions for you (eah!!!).
First
is I have a 80 kb ASE file and a 600 kb bitmap. When I am applying
press event on the object, the object doest not rendered properly. Is
this a problem of decimal precision as flash player can’t handle good
mathematical calculation?
I have one more question here regarding the mouse event
I need to apply mouse event on 3d Object in my custom class, I could not found any event for that in the pixlib.
Can I use my own event broadcaster class here?
Posted by: kiroukou Aug 22 2006, 11:49 AM
Hey.
the
JSFL solution can be a good idea, but doesn't have to be inside the
sandy's package since it depends on the IDE, and most of sandy's users
don't use flash (I don't
)
Can you show me the example with the event problem? I can't understand what can happen there...
Pixlib has a great event system. Look at sandy's files to see how it works (as World3D.as in sandy.core package).
EventDispatcher as far as I remember 
What kind of custom class have you created ?
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)