Something else you could consider is doing a little post-processing on your JPG files - once you've got the JPG loaded, you could get at the BitmapData and use copyChannels to copy the blue channel into the alpha channel, thusly:
var tmpBmp = [jpg bitmapdata]; tmpBmp.copyChannel( tmpBmp, tmpBmp.rect, tmpBmp.rect.topLeft, BitmapDataChannel.BLUE, BitmapDataChannel.ALPHA); Voila! Blue == transparent without having to export lots of new PNG files. It might be a little noisy, but that's an artifact of jpeg compression you'd encounter anywhere you were trying to do something like this. h. 2008/10/21 katopz <[EMAIL PROTECTED]>: > Hey Ben > > do try again with png in swf and use compression as jpg(set in library flash > IDE i mean), as i remember png got smaller size in same quality, btw must > use "save for web" in photoshop for png not just s"ave as" png > > hth > > 2008/10/21 Ben <[EMAIL PROTECTED]> >> >> PNG are so much larger than JPGs, so I think PNGs won't be >> feasible.....I got an item database with almost 10k items....most with >> own mesh in male / female version. The 3ds File is almost 100k each >> and the JPG texture 100k again...a PNG would be like 500k I guess. >> Any idea what could be done otherwise? >> So is there no transparent color-keying at this moment? >> Do you think it would be hard to say to the renderer that he should >> omit drawing a pixel if it's of a certain color? >> >> On 20 Okt., 19:53, "Rob Bateman" <[EMAIL PROTECTED]> wrote: >> > Hey Ben >> > >> > have you tried using a transparent png for the texture? You should be >> > able >> > to achieve the effect you want without any extra trickery - just have >> > transparency in your image from the start in place of the blue color and >> > you >> > should be set! >> > >> > atb >> > >> > Rob >> > >> > >> > >> > On Mon, Oct 20, 2008 at 5:32 PM, Ben <[EMAIL PROTECTED]> wrote: >> > >> > > As you seem to be one of the main developer on this project: >> > >> > > Is there any color-keying option to make surfaces transparent? In my >> > > case blue is defined to be the "transparent color", so I'd like to >> > > omit the drawing there.. >> > >http://www.nunduniel.kilu.de/viewer.php?id=3769173Here is an example >> > >> > > On 20 Okt., 04:11, "Rob Bateman" <[EMAIL PROTECTED]> wrote: >> > > > > So the Dot3BitmapMaterial information is only affected by the >> > > > > diffuse >> > > > > part of the light? >> > >> > > > i'm afraid so, the maths for resolving a specular component normal >> > > > map is >> > > > currently not something i have the time to spend on! >> > >> > > > cheers >> > >> > > > Rob >> > >> > > > On Sat, Oct 18, 2008 at 4:11 PM, Ben <[EMAIL PROTECTED]> wrote: >> > >> > > > > So the Dot3BitmapMaterial information is only affected by the >> > > > > diffuse >> > > > > part of the light? >> > >> > > > > On 18 Okt., 17:01, "Peter Kapelyan" <[EMAIL PROTECTED]> wrote: >> > > > > > I don't think you can mix those two (normal + specular). If >> > > > > > that's >> > > the >> > > > > case >> > > > > > there "might" be a way of mixing them by using a Composite >> > > > > > material >> > > made >> > > > > of >> > > > > > two seperate materials, but that a hunch and it might not turn >> > > > > > out as >> > > > > > expected... >> > >> > > > > > -Pete >> > >> > > > > > On Sat, Oct 18, 2008 at 9:27 AM, Ben <[EMAIL PROTECTED]> >> > > > > > wrote: >> > >> > > > > > > I've got some a 3d Model which include a standard texture >> > > (diffuse), a >> > > > > > > normal map and a specular map. >> > >> > > > > > > Now I added some light to the scene. >> > > > > > > I used the Dot3BitmapMaterial, with the texture bitmap as >> > > > > > > first >> > > > > > > parameter and the normal map as the second as described in the >> > > > > > > documentation. >> > >> > > > > > > I noticed that I can't get some shiny effect on my mode, even >> > > though >> > > > > > > there is a shininess component and a specular coefficient. >> > >> > > > > > > I use a DirectionalLight3d, but have seen that only ambient >> > > > > > > and >> > > > > > > diffuse parts of the light are being considered...if I use the >> > > > > > > specular part, the whole model stays dark. With >> > > > > > > PhongBitmapmaterial >> > > is >> > > > > > > seems ok, but I can't include my normal map details and it >> > > > > > > looks >> > > kinda >> > > > > > > weird. >> > >> > > > > > > Any idea how I can get the normal map working with some >> > > > > > > shininess? >> > > > > > > Or do I just use the wrong material type? >> > >> > > > > > > Thanks >> > >> > > > > > -- >> > > > > > ___________________ >> > >> > > > > > Actionscript 3.0 Flash 3D Graphics Engine >> > >> > > > > > HTTP://AWAY3D.COM >> > >> > > > -- >> > > > Rob Bateman >> > > > Flash Development & Consultancy >> > >> > > > [EMAIL PROTECTED] >> > >> > -- >> > Rob Bateman >> > Flash Development & Consultancy >> > >> > [EMAIL PROTECTED] > > > -- > katopz > http://www.sleepydesign.com >
