Transparent texture with Mipmap

       Hi,  I have a problem about transparent texture with mipmap. In no-alpha channel texture it is correct.  Does anyone have the same problem as me?
This is my source code:
        function uploadTextureWithMipmaps( dest:ITexture, src:BitmapData ) :void
            var ws:int = src.width;
            var hs:int = src.height;
            var level:int = 0;
            var tmp:BitmapData;
            var transform:Matrix = new Matrix();
            var trans:Boolean = src.transparent;
            if ( trans )
                tmp = new BitmapData( src.width, src.height, true, 0x000000 );
            else
                tmp = new BitmapData( src.width, src.height );
            while ( ws >= 1 && hs >= 1 )
                if ( trans )
                    tmp.draw( src, transform, null, "alpha", null, true );   
                tmp.draw( src, transform, null, null, null, true );   
                dest.textureObj.uploadFromBitmapData( tmp, level );
                transform.scale( 0.5, 0.5 );
                level++;
                ws >>= 1;
                hs >>= 1;
            tmp.dispose();
I append the mipmap0, 1, 2  result to describe this situation. They are generated by a transparent texture after executing the upper function.     
mipmap0
mipmap1
mipmap2

You were close, but I have fixed your code for you.
public function uploadTextureWithMipmaps( dest:Texture, src:BitmapData ) :void
     var ws:int = src.width;
     var hs:int = src.height;
     var level:int = 0;
     var tmp:BitmapData;
     var transform:Matrix = new Matrix();
     var tmp2:BitmapData;
     tmp = new BitmapData( src.width, src.height, true, 0x00000000);
     while ( ws >= 1 && hs >= 1 )
          tmp.draw(src, transform, null, null, null, true);   
          dest.uploadFromBitmapData(tmp, level);
          transform.scale(0.5, 0.5);
          level++;
          ws >>= 1;
          hs >>= 1;
          if (hs && ws) {
               tmp.dispose();
               tmp = new BitmapData(ws, hs, true, 0x00000000);
     tmp.dispose();

Similar Messages

  • W3d with transparent textures will be broken transmission problems

    W3d with transparent textures will be broken transmission
    problems
    When the W3D models have Texture with alpha channel, It will
    be Crusher and Transmittance (Showing the bottom), If not alpha it
    will be normal! please tell me why,Thanks
    snap:
    have alpha channel:
    snap-alpha.JPG
    no alpha channel(normal):
    snap-no-alpha.JPG
    3d model Source file & W3D file:
    http://www.3dzone.cn/beijixiong.zip
    <---new

    As we have written you can get it to work. Just do one of the
    following.
    1. Make the model a complete mesh. no parts just stuck into
    others. Make sure vertecies are welded together properly etc.
    2. a) Separate the head,hat,hands etc b) group them together
    c) export (the exporter will combine them into one model again).
    3. a) Assign a non transparent texture to your model, b)
    select the polygons that needs transparency, c) assign the
    transparent texture to those polygons
    4. Outsource the importing of models to someone else.
    I used method 2 as I mentioned in an earlier post and got it
    to work, here is the result.
    Scarecrow
    with transparency working
    The url to report bugs to adobe was recently posted, use the
    search function.

  • Stage3D semi transparent textures

    I have been playing arounf with the Stage3D with moderate success but i have an issue rendering transparent textures.
    as you can see some of the faces at the back are only partially rendered.
    E.g. the bottom face is rendered through the front face but not through the side face)
    Does anyone have any idea what might be causing this sort of behaviour?
    you can see the demo here. (www.spoboyle.co.uk/demo/) click to pause the rotation
    I have also included a screen shot

    I have a solution now for the cube problem (or any convex polygon)
    cull the front faces draw the polygon and then cull the back faces and draw again.
    so generally when dealing with semi-transparent objects
    first draw all opaque objects
    then draw all semi-transparent objects in order starting with those furthest away from the camera (convex objects should be drawn twice as mentioned above)
    if you have any concave polygons all I can say is good luck!
    I have removed all the above links and placed all the files here.

  • Transparent Textures (Again)

    Hi guys,
    Ive recently been kicking about in J3D and I was wondering how to make a full colour transparent texture over the top of another one. I have done the tutorial at http://swjscmail1.java.sun.com/cgi-bin/wa?A2=ind0207&L=java3d-interest&P=R58182&D=0&H=0&O=T&T=1 which worked fine (albeit very confusingly), producing a grayscale alpha blended image which I could use, but naturally it doesnt look very pretty if its grayscale. At the moment Ive got the actual Graphic produced being created from a jpg rather than the examples fileRect statements.
    What I really want is to have a cloud plain, which is made from some colour image, with transparent sections where the transparent image is overlaid. Can this even be done? How would it be done with a single image (which is stil fine)? I suspect its got to do with the RGBA field in Texture2D and the ARGB field in BufferedImage, but as all that is quite confusing to me, Im seeking your wise advice.
    Thanks in advance

    I have done some stuff with this, and it does have to do with the rgba channels but I don't remember the details. I think I ended up just trying every possible set of TextureAttributes until I found one that works.
    I think using a transparent PNG to start with can help too.

  • Transparent textures in 3D-SubScene

    Hi!
    I've got a 3D scene with shapes having semi-transparent textures (e.g. texture with alpha gradient to simulate reflections).
    When it is shown using a 'normal' Scene, everything works fine, but as soon as I change to a SubScene with black background (subScene.fill(Colors.BLACK)), transparent pixels seem to be blended to white instead of black.
    Correct with Scene: http://i39.tinypic.com/2isuq35.png
    Incorrect with SubScene: http://i40.tinypic.com/20aayvp.png
    As you can see in the screenshots, it seems that only pixels that are not fully transparent are affected.
    System information:
    Java(TM) SE Runtime Environment (build 1.8.0-ea-b109)
    Java HotSpot(TM) 64-Bit Server VM (build 25.0-b51, mixed mode)
    Windows 7 (x64)
    GPU: NVIDIA Quadro 600
    Hardware acceleration: DirectX / Direct3D
    Is this a bug, missing feature or do I have to do something special to make this work?
    Thanks,
      Mario

    What does it say to the right of the exlamation point? Does it indicate you're using DIrectX 8 or 9? I don't know about dragging textures onto the model here. I always have dragged materials onto a model. (My knowledge of this is somewhat limited, but I've had good luck with applying and editing materials on the models). Make sure you're using the latest drivers for your card. I'm running a fairly wimpy ThinkPad at the moment and if I choose the chrome material it reflects the beach just fine in the Toolkit on an .igs model.

  • Transparency Issues with PSD files in FCP 7

    I'm having some weird file layer transparency issues with FCP 7. I'm working on a project that's made up entirely of graphics drawn in Photoshop CS5. They Photoshop settings were done to match an HDTV 1080i (16:9) sequence in FCP. In FCP, the pixels were set to square, field dominance to none, frame rate to 29.97 and compressor is Apple ProRes 422.
    I exported my PSD files out of Photoshop, with each layer being exported to its own file. In general, things were fine, but there were a few files where you could see the outline of the character against the background, but mind you that this is only visible once the video is rendered out in the FCP timeline. Nothing is visible in Photoshop, nor is it visible while viewing from the Browser in FCP. I told this to the artist and he went back and made corrections, making sure everything was on a transparent background, but the result was still the same - once I rendered the graphics out in FCP, these edge lines were visible.
    I then went back into Photoshop, opened all the files that were giving me trouble, clicked on the "foreground color" and changed it to a color other than white, then back to white and hit ok. That seemed to work - even when rendered out, I was getting no artifacts, until I tried enlarging the graphics over 100%.
    Also, with some of the same graphics, I was trying to layer them so that a guy was in the foreground with other people and a van behind him in the background. Once again, no problem in Photoshop, but once brought into FCP, the background people were actually being displayed over the main foreground character.
    I'm pretty baffled - what to do? I'll attach a photo of the weird lines around the characters. It might be hard to see at this size, but if you download and enlarge it to 300% or so, you'll see what I mean.

    Just saw that Adam's original post was an older one.  Will keep this here anyway to maybe help the most recent poster.
    Sharon
    Adam, did you try what David said about pointing to the root folder?  Did that work?
    When I copy the SD card, I name a new folder on my hard drive something specific, like Smith Wedding.  Then I copy everything inside the SD card to that new folder.  The first level inside my new folder now has folders for
    AVF_INFO
    PRIVATE
    and on down from there.  When you open Log and Transfer, point it to the Smith Wedding folder (of course whatever you have named yours).
    ClipWrap2 also works great to convert the files beforehand if you want.
    What camera are you using?  I have the Sony NX30 and it was giving me fits because the .mts files don't ingest if the clips are longer than 11 min. My problem is that I'm still on FCP 6.0.6.  I think 7.0.3 fixed that.  But I did find enough work-arounds to keep the camera. 
    This is a link to the full discussion if you are interested.
    https://discussions.apple.com/message/19085158#19085158
    Sharon
    Message was edited by: SSteele

  • White box behind transparent images with drop shadow in InDesign CC 2014 (v.10) but not in InDesign CC (v.9)

    Hi all,
    Please can you help? No matter what settings I use in my print options in InDesign CC 2014 (v.10), ALL transparent images with a drop shadow are printing with a white box behind the image. If I remove the drop shadow, all prints fine. I know this is an old issue that happens with ID sometimes but I have been lucky enough to never have had it happen to me before! (All images are regular flattened TIFF images with clipping paths).
    Also, feathered edges are not printing correctly and are sharp instead of feathered.
    When I export the document to IDML and open it up in InDesign CC (v.9) all prints perfectly with no white boxes and feathered edges prints perfectly as well. I have compared all of the print settings (including color management, transparency flattener, etc.) between both versions and they are exactly the same. I am printing to a Xerox color laser printer. Can anyone offer any advice?
    Thank you so much,
    Christine

    Okay...false alarm! It turns out that the issue was with my PRINTER settings (the settings you customize after hitting the “Printer” button at the bottom of the Print dialogue box in ID CC. I thought I had triple checked this but it seems there was one setting I missed earlier…adjusting the print brightness seemed to cause the issue. SO GLAD to know it was not InDesign…20 or so sheets/prints later….and thankful to know what was causing the issue! Thank you so much Steve for helping at any rate:) Much appreciated:)

  • Transparent page with outlined font for motion 5

    I am trying to follow this tutorial. http://www.youtube.com/watch?v=scbXhiZy8uA
    I need to create exactly what he does in the first minute of the video. A transparent background with outlined texts, I have the script nescessary to create the effect. I have zero experience with illustrator. Can someone provide a detailed step process or provide links to videos that will solve my problem.
    Please watch the video to understand exactly what im having trouble with. Thank you.

    What is your problem you forgot to mention it.
    Keep in mind the background in illustrator is always transparent and you physically need to add a shape to fill it. The white background is just to make it easier to see the lines. You can turn on and off the checkboard pattern as you like (View>Show transparent grid) or ctrl-shift-d(windows)cmd-shift-d(mac)

  • Transparent design with router on both sides?

    I am looking to solve a design which has to work in two scenarios. Preferably with an in-line solution.
    1. Transparent design with VRF on both sides:
    FW-VRF (Subnet A)
          |
          | (VLAN 11)      | ACE (Subnet A)
          |
          | (VLAN 12)
          |
    LAN-VRF
          |
          |  (VLAN 13)
          |
    Real servers (Subnet B)
    2. Transparent design in plain bridge mode
    FW-VRF (Subnet A)
          |
          | (VLAN 11)      |
       ACE (Subnet A)
          |
          | (VLAN 12)
          |
    Real servers (Subnet A)
    As mentioned, I am aiming for a single design for both scenarios. A routed design will not pass in the first scenario and a one-arm solution will be inefficient in the second scenario. (both due to existing infrastructure) Is it possible to solve this with a transparent solution in both scenarios? I can't seem to get it to work.
    Thanks in advance for any help!

    I'm gonna expand my question a bit as I can not seem to get a working config in scenario 1. From the ACE I can ping the VRFs on both side of the ACE. I can on the other hand not ping neither the bvi-address of the ACE nor one VRF from the other. Can anyone notice any immediate errors in my config? Thanks in advance for any help!
    Addresses:
    10.3.66.1 - FW_VRF on client side
    10.3.66.6 - LAN_VRF on server side
    10.3.66.7 - BVI if on ACE
    ===Admin===
    resource-class TEST_res
    limit-resource all minimum 10.00 maximum unlimited
    boot system image:c4710ace-mz.A3_2_0.bin
    hostname 4710Appl
    interface gigabitEthernet 1/1
    description Management port
    switchport access vlan 752
    no shutdown
    interface gigabitEthernet 1/2
    description Client side LAN
    switchport trunk allowed vlan 2522
    no shutdown
    interface gigabitEthernet 1/3
    description Server side LAN
    switchport trunk allowed vlan 2524
    no shutdown
    interface gigabitEthernet 1/4
    shutdown
    access-list BPDU ethertype permit bpdu
    access-list ALL line 8 extended permit ip any any
    access-list everyone line 8 extended permit ip any any
    access-list everyone line 16 extended permit icmp any any
    class-map type management match-any REMOTE_ACCESS
    description Remote access traffic match
    2 match protocol ssh any
    3 match protocol icmp any
    4 match protocol snmp any
    policy-map type management first-match REMOTE_MGMT_ALLOW_POLICY
    class REMOTE_ACCESS
    permit
    interface vlan 752
    description Management VLAN
    ip address 10.7.52.63 255.255.255.0
    service-policy input REMOTE_MGMT_ALLOW_POLICY
    no shutdown
    ip route 0.0.0.0 0.0.0.0 10.3.66.1
    context TEST_context
    allocate-interface vlan 752
    allocate-interface vlan 2522
    allocate-interface vlan 2524
    member TEST_res
    context TEST_context_routed
    username admin password 5 $1$bale5EiS$bEdquz.bbcW3wRcfeSzbu/  role Admin domain
    default-domain
    username www password 5 $1$bsOdgxav$1uywtkwFEj3QalKaOTrkZ1  role Admin domain de
    fault-domain
    ssh key rsa 1024 force
    ===Application context===
    access-list ALL line 8 extended permit ip any any
    access-list ALL line 16 extended permit icmp any any
    class-map type management match-any REMOTE_ACCESS
    description Remote access traffic match
    2 match protocol ssh any
    3 match protocol icmp any
    policy-map type management first-match REMOTE_MGMT_ALLOW_POLICY
    class REMOTE_ACCESS
    permit
    interface vlan 752
    ip address 10.7.52.64 255.255.255.0
    service-policy input REMOTE_MGMT_ALLOW_POLICY
    no shutdown
    interface vlan 2522
    description Client side VLAN
    bridge-group 1
    access-group input ALL
    access-group output ALL
    no shutdown
    interface vlan 2524
    description Server side VLAN
    bridge-group 1
    access-group input ALL
    access-group output ALL
    no shutdown
    interface bvi 1
    ip address 10.3.66.7 255.255.255.240
    no shutdown
    ip route 0.0.0.0 0.0.0.0 10.3.66.1

  • Transparent Partion with three sources and one target- Need quick response

    I am creating transparent partion with three sources and one target.What will be the impact of this on retrieval and how can I improve retrieval.
    Thanks,

    transparent partion
    1:network load will be heavy
    2:transparent partion allows user to manipulate or edit or delete at will ,from the user to target
    and also from target u can update it back to respective databases
    3: disk usage will be high
    [email protected]

  • Printing on Transparency Paper with a Mac.

    Printing on Transparency Paper with a Mac.
    Hi there
    I am having issues printing to transparency paper with my Mac.
    I am using a Epson DX5000 ink jet printer, with ink jet transparency paper.
    I've created my design at 600dpi (a little bit overkill I guess you could say).
    What I am doing is creating/printing (none coloured) black images that are then displayed using a projector.
    My problem is that I don't think enough ink is being printed onto the transparency paper and so when its displayed on to a wall you can see through the black ink too much and also the ink all looks cracked.
    This maybe also possibly caused by the fact that with ink jet transparency paper you print on the one side that has a rough type feel to it, that must have some kind of coating so that the ink dries on it correctly and doesnt just smear.
    here's a little image of what I mean.
    As you will see the image just isnt clear enough and light leaks through the black.
    You are only actually supposed to be able to see anything thats white. So thats only the white text around the outside and the white images in the middle. (this is a little hard to explain as of course a printer doesnt print white, what its actually doing it NOT printing the white sections at all, so this is where the light shines through)
    Ive tried numerous print settings when printing from Adobe Acrobat
    Print>Printer>Print Settings
    Media Type setting are:-
    Plain papers
    Epson Matt
    Epson Ultra Glossy
    Epson Premium Glossy
    Epson Premium Semi Gloss
    Epson Glossy
    Envelope
    Color settting are:-
    Color
    Black
    Print Quality setting (More and less appear depending on what type of paper you say you are using) are:-
    Fast Economy
    Economy
    Draft
    Normal
    Fine
    Super Fine
    Photo
    Best Photo
    Photo RPM
    I assume that Photo RPM is the best setting and to be honest I'm not really sure which type of paper to choose?
    Ive tried many different settings, Ive tried printing in just Black, but that doesnt put out enough ink, I then tried printing in colour (even though my designs are just in black), it definitely produced on a page more ink, but still not enough.
    Does anyone have any suggestions here at all, I'm all out of ideas?
    thanks      

    Gary Scotland wrote:
    Use an image editing application to create a pure black and white image with maximum contrast, painting in where needed in the black area to produce maximum black.
    This is how I have already created them.
    In the printer driver settings set:
    colour settings option:   print in Greyscale not in colour mode
    Greyscale option is not available, but I can just print in black, which does not cover enough.
    paper or media settings option choose:   Transparency
    There is no option for Transparency paper

  • Transparency problems with Dashboard Widgets

    I installed Leopard on my MacBook and everything has been working well with the exception of some funkiness with my Dashboard widgets. There are a few widgets that the white text on them has changed from solid white test to transparent text with a white outline. I've got a screen shot here:
    Has anyone else run into this problem? Is there a way to fix this problem? Any thoughts on this would be greatly appreciated.
    Thanks!
    --Tim--

    Someone pointed out something that fixed it. There was a font name conflict that was bringing up an incorrect style of Helvetica Neue.

  • Transparent TEB with Cap5?

    I'm trying to make a text entry box's background transparent.  With Cap4 it was quite easy (Options -> Background Color) but now all I see is the Fill color and if I turn the alpha down I loose the text as well.  Am I missing something somewhere?
    Thanks!

    See if the post linked below helps...
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    Begin learning Captivate 5 moments from now! $29.95
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcererStone Blog
    Captivate eBooks

  • How do I create transparent text with gradient stroke?

    I'm creating text that will be printed on a deep gray to black tshirt. 
    I created text, added an offset path to it with a gradient, and a deep gray color fill on top, achieving the gradient stroke.  However, I'm not exactly sure what color the shirt itself will be, other than deep gray to black.  And I didn't want the deep gray/black fill in my text to appear and look awkward on the shirt.  Unless that is something I shouldn't be considered about.
    To be safe, how would you create transparent text with a gradient stroke?  I'm using Illustrator CS5.

    aimsrandom,
    Based on a guess that you wish to have the stroke fade into the basic tshirt colour, you may use transparency rather than colour.
    But the transparent text in the headline raises a few questions.
    No fill colour for the Type/text, or different fill and (basic) stroke colour, or?

  • Transparent firewall with CSC

    Hi,
    We will be deploying 1 firewall with IPS module and 1 transparent  firewall with CSC module. please refer to the diagram. is there any concern for this deployment? will it works?
    Please adviced.
    Thanks.

    Yes. Absolutely. No problem.
    -Kureli

Maybe you are looking for

  • Multiple iPad accounts on one computer?

    I have only been an Apple person for about a year and a half, so I call on the Apple gods for help. My dad and stepmom each have an iPad (1st and 3rd generation), but share a laptop (Dell Latitude). They want certain apps on their iPads, but don't wa

  • Sales person territory details

    Hi, I am importing sales person(order management -> setup->sales->salespersons) details to R12. Now my question is is there any api or interface to insert Territories details for sales person(order management -> setup-> sales->salespersons->receivabl

  • It dosen't work to atctivate my iphone,pleas help me!

    I had jailbreak instaled in my iphone 4 and now my iphone dosen't woork my english may be bad because I live in Sweden. Now I have restored my iphone and it dosen't work to activate it pleas can some one help me!!!

  • Why cant i use help on the top bar

    I cant use help when in my desktop

  • Handling errors in BAPI

    Hi frnds i m unable to know the answer for the q? How do u handle errors in BAPI. i.e i m using standard BAPI po creation if some errors occurs then how to handle those errors how can we know the errors. plz reply me back frnds... thnks...