Results 1 to 24 of 24
  1. #1
    MSgt. Shooter Person
    Join Date
    Apr 2011
    Posts
    227

    Default Help: Fake Transparency for Cloak Mode

    Hi,

    basically I want to create a material effect like the cloak mode in crysis. I already tried the different transparency options for the material, but none worked out like i would like them to: I can either disable shading completely, or I have to live with the fact that faces are visible, that should not be:


    I want it to look like this:

    (not an actual screenshot - edited with gimp)

    I figured out I need the scenetexture for this, but it only works with transparent materials. What I would do is: First render the scene without the cloaked object, then render the cloaked object with a solid material but textured with the scenetexture to make it seem transparent. Dependant on the percentage of cloaking I would blend between the scenetexture and another solid texture.

    The question is: Is this possible? If so, how is it possible?

    greetings

  2. #2
    Iron Guard
    Join Date
    Jan 2009
    Location
    Etats-Unis
    Posts
    760
    Gamer IDs

    Gamertag: The Clown 117

    Default

    UT3 had a cloaking power up, so it is possible.

  3. #3
    MSgt. Shooter Person
    Join Date
    Apr 2011
    Posts
    227

    Default

    Thanks, by searching for UT3 instead of UDK I have found a few pictures/videos about the Nightshade's cloak and about cave crystals that look somewhat like what I want, but no hints whatsoever on how it is done

    greetings

  4. #4
    Marrow Fiend
    Join Date
    Jul 2006
    Location
    UT40k
    Posts
    4,634

    Default

    first try having a look at the UT3 code which is available on the udn site, if its a material then spend $10 for UT3 and have a look at how they did it
    UT40K:The Chosen - Warhammer 40,000 for UDK
    ut40kgeodav - UE4 Tutorials
    UT3 Tutorials - Characters - Weapons - Vehicles - FaceFX
    UDK Tutorials - Basics - Vehicles - Characters - Weapons

  5. #5
    MSgt. Shooter Person
    Join Date
    Apr 2011
    Posts
    227

    Default

    It is a material (VH_Nightshade.Materials.M_VH_NightShade_Skin). However there are two counter arguments: first I am not exactly sure if the material actually does what I think it does (all transparent materials from the udk or the ut3 demo do not) and second every online shop I checked so far said it wasn't available in my country so that is a bad omen I will still look it up at the local store tomorrow.

    greetings

  6. #6
    Redeemer
    Join Date
    Sep 2007
    Location
    Finland
    Posts
    1,290

    Default

    I think the material has to be switched in the game code to the translucent one.
    FYI, here is what I came up with regarding the cloak material.

    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version

  7. #7
    MSgt. Shooter Person
    Join Date
    Apr 2011
    Posts
    227

    Default

    That looks pretty perfect
    Yea I think switching Materials is a necessity. After playing around with the settings it is possible to blend from cloak to almost solid, but not entirely.
    Still I will try to get ut3, seems to be a good idea- and sample-repository.

    greetings

  8. #8
    Iron Guard
    Join Date
    Jan 2009
    Location
    Etats-Unis
    Posts
    760
    Gamer IDs

    Gamertag: The Clown 117

    Default

    Xendance, what texture are you using for the distortion?

  9. #9
    MSgt. Shooter Person
    Join Date
    Apr 2011
    Posts
    227

    Default

    I got it working!

    The idea is quite simple actually: Change the Blend to Alpha Composite. Then for a solid appearance set the diffuse to whatever it should be for solid. To have the material appear transparent plug the DestColor into Emissive and use the Distortion. The Cloaking-Effect is done by simply multiplying the two material 'types' with a factor:
    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version

    By lowering the opacity parameter over time the cloak activates:
    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version

    Not a final material, though, but I never thought I get this proof of concept done so quickly. Thanks alot to everyone!

    greetings

  10. #10
    Iron Guard
    Join Date
    Jan 2009
    Location
    Etats-Unis
    Posts
    760
    Gamer IDs

    Gamertag: The Clown 117

    Default

    Is the blend triggered in code, or does it just happen in a loop during gameplay?

  11. #11
    MSgt. Shooter Person
    Join Date
    Apr 2011
    Posts
    227

    Default

    Right now the Cloak is not dynamic. I have created a MaterialInstanceConstant and can set the 'Opacity'-parameter to the desired value. Wether I will use this in a Script or within a Cutscene I can controll the cloak with that parameter. I am doing neither, yet, but I will go for the scripting method eventually.

    greetings

  12. #12
    MSgt. Shooter Person
    Join Date
    Jul 2011
    Location
    Stockholm, Sweden
    Posts
    45

    Default

    Interesting thread.
    Could someone upload the material +textures in an UDK package so I can have a look? I'm not very good with the node editor yet.
    "There he goes. One of God's own prototypes. Some kind of high powered mutant never even considered for mass production. Too weird to live, and too rare to die." Ś Hunter S. Thompson

  13. #13
    MSgt. Shooter Person
    Join Date
    Apr 2011
    Posts
    227

    Default

    Here you go:
    http://freetimestudio.net/Cloak.upk
    The textures are from the default content of the UDK, but you can use any diffuse or normal texture you want.
    I also included three sample instances:
    This Image Was Automatically Resized by using the Screenshot Tag.  Click to view the full version

    greetings
    Last edited by FTC; 09-14-2013 at 03:03 PM.

  14. #14
    MSgt. Shooter Person
    Join Date
    Jul 2011
    Location
    Stockholm, Sweden
    Posts
    45

    Default

    Thanks a bunch
    "There he goes. One of God's own prototypes. Some kind of high powered mutant never even considered for mass production. Too weird to live, and too rare to die." Ś Hunter S. Thompson

  15. #15
    Iron Guard
    Join Date
    Jun 2009
    Location
    Where the ganja is plentiful
    Posts
    717
    Gamer IDs

    Gamertag: PSN: ShurikenUK

    Default

    Wow thanks for the knowledge and meterials here, Predator would be proud!

    @Niteshade

    Which book is that quote from? I've only read F&L in Las Vegas, but it was one of the best books I've ever read, or more, "experienced". Same goes for Clockwork Orange and Trainspotting.
    Last edited by shuriken88; 07-22-2011 at 11:00 PM.
    There is no religion except that of Music. There is no god, except that of your own will to create music.
    -Ancient Texts of Truth

  16. #16

    Default

    Hi, I know it's a old post, but i couldn't find the package and was trying to reproduce that, the problem is that even if i plug my texture into diffuse for the opaque version. With Alpha_composite i can't get anything fully opaque.

  17. #17
    MSgt. Shooter Person
    Join Date
    Apr 2011
    Posts
    227

    Default

    Hi,

    it should work with BLEND_AlphaComposite, because this mode allows using no alpha at all but still have SceneTexture and depth functions available.
    Anyway, I still have the package and reuploaded it:
    http://www.freetimestudio.de/misc/pr.../udk/Cloak.upk

    However a fully opaque AlphaComposite still has no shadow and a very poor shading. You should create a Solid material that looks very familiar to the opaque cloak and switch materials when the cloak is activated or deactivated via script.

    greetings

  18. #18

    Default

    Thanks FTC! Will check it out, yes i was thinking about switching anyway, but the opaque with alphaComposite was transparent, and I got no idea why. Will try it now, thank you.

  19. #19

    Default

    Ok I found out something really odd. Your shaders is transparent on my mesh too. So i tried it on another mesh and it works. Even the shader I had before works too. My question is, what could cause a mesh to be transparent and another not while they share the same shader?

  20. #20
    MSgt. Shooter Person
    Join Date
    Apr 2011
    Posts
    227

    Default

    Does your mesh have any vertex colors? It might have to do something with that, however the shader does not use Vertex Colors, so it should not affect the transparency.
    Then again I am hardly a professional at shaders.

    greetings

  21. #21
    MSgt. Shooter Person
    Join Date
    Sep 2012
    Posts
    177

    Default

    Does someone have the sample package available? I want to look at it and share it with my team for learning purpose on this

    Thanks,

  22. #22
    Redeemer
    Join Date
    Apr 2009
    Location
    Jacinto
    Posts
    1,476
    Gamer IDs

    Gamertag: Keltar3007

    Default

    Look for radioactive infestation on google code...it should help/

  23. #23
    MSgt. Shooter Person
    Join Date
    Sep 2012
    Posts
    177

    Default

    Thanks, I found the code & the upk.
    I need to test it and look into it but I have a starting point

  24. #24
    MSgt. Shooter Person
    Join Date
    Aug 2011
    Posts
    209

    Default

    In case someone is too lazy to google for the link to the sample, it is: https://code.google.com/p/radioactiv...downloads/list


 

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.