Results 1 to 8 of 8
  1. #1

    Default Canvas.Style to render texture???

    I wanna draw a translucend texture, but i seems that Canvas class don't have more the Style, anyone know how to draw a texture traslucent, like style=3 in Unreal Engine 1 or 2

    In UE 1 and 2

    Canvas.Style=STY_Translucent; or Canvas.Style=3;

    In UE3?

  2. #2
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Posts
    118

    Default

    You need to use DrawMaterialTile instead, and set the Materials BlendMode to be translucent.

    Keep in mind, when rendering on the canvas, only the Emissive and Opacity values are valid.

  3. #3
    MSgt. Shooter Person
    Join Date
    Oct 2007
    Posts
    240

    Default

    I had used Canvas.Style for drawing text, how should I update that for UT3?

    I wouldn't use DrawMaterialTile for text, or would I?
    www.DAWGA.com

    UT3 RPG Invasion Server up, hit F10, "open dawga.com:8888" to join

  4. #4
    MSgt. Shooter Person
    Join Date
    Oct 2007
    Posts
    193
    Gamer IDs

    Gamertag: Pfhoenix0

    Default

    No, text rendering hasn't changed at all (to include font support, for better or worse).

    Also, for rendering textures, you do not, in fact, need a material :

    1) Create a texture with an alpha channel (I use TARGA .tga format)
    2) Import your texture into a texture package
    3) In your code, call Canvas.DrawTile()

    The thing to play with is Canvas.DrawColor.A. Setting the alpha channel will affect how transparent your texture shows up as.
    Last edited by Pfhoenix; 12-14-2007 at 09:56 AM.
    Fleet Wars
    Jetpack for UT3
    Raggy Weapons
    SpeedBump
    Mod Exemplar Project
    Official Proelium Site
    Official UnrealScript IRC Channel - #unrealscript on irc.enterthegame.com

  5. #5
    MSgt. Shooter Person
    Join Date
    Oct 2007
    Posts
    240

    Default

    Quote Originally Posted by Pfhoenix View Post
    No, text rendering hasn't changed at all (to include font support, for better or worse).
    But Canvas.Style is not there anymore. I was asking how I do it now. All I used the canvas for in 1 mod was to write text, and I would change the Style of the Canvas depending on some conditions.
    www.DAWGA.com

    UT3 RPG Invasion Server up, hit F10, "open dawga.com:8888" to join

  6. #6
    MSgt. Shooter Person
    Join Date
    Oct 2007
    Posts
    193
    Gamer IDs

    Gamertag: Pfhoenix0

    Default

    You don't need it. The "style" is determined by the texture itself. You can't have a color-keyed texture any more. You need to create textures with alpha channels for masking.

    You only have two options :
    1) Do as I wrote
    2) Do as Bonehed wrote

    My method negates the need to have materials that you won't otherwise use. Bonehed's method allows you to do fancy processing on a texture before rendering it.
    Fleet Wars
    Jetpack for UT3
    Raggy Weapons
    SpeedBump
    Mod Exemplar Project
    Official Proelium Site
    Official UnrealScript IRC Channel - #unrealscript on irc.enterthegame.com

  7. #7

    Default

    i need Canvas.DrawColor.A = 0 and Canvas.DrawTile()?

  8. #8
    MSgt. Shooter Person
    Join Date
    Sep 2006
    Posts
    415

    Default

    use this..
    Code:
    	H.Canvas.DrawColor.R = 255;
    	H.Canvas.DrawColor.G = 255;
    	H.Canvas.DrawColor.B = 255;
    	H.Canvas.DrawColor.A = 0;
    you want transparent green? use this..
    Code:
    	H.Canvas.DrawColor.R = 0;
    	H.Canvas.DrawColor.G = 255;
    	H.Canvas.DrawColor.B = 0;
    	H.Canvas.DrawColor.A = 130;
    Last edited by pingfreak; 12-20-2007 at 07:22 PM. Reason: stuff added
    ~ If it was easy everyone would be doing it. ~
    Akimbo Expansion Pack Elite Machines XX HitSounds Show Damage
    DM-Backyard99 DM-Lan_Party

    James O Bishop


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.