Game Development Community

Hiding a DIF realtime?

by George · in Torque Game Engine · 11/04/2005 (3:39 pm) · 11 replies

Could anyone point me in the right direction here. Basically I have an overhead camera system and what I'd like to do is hide any DIF that might come between player and the camera or even make it semi transparent. For example, if the character passes under a bridge, It'd become transparent so you can see whats happening under it. I tried searching but I couldnt find any tutorials or resources.

About the author

Recent Threads

  • What happened to GORPE

  • #1
    11/04/2005 (4:34 pm)
    Hum well if you where using TSE you could apply a shader that's see thru. But I would not know how to
    turn it on or off?
    #2
    11/04/2005 (9:50 pm)
    If it's overhead, I wouldn't use a DIF -- I would use a DTS.... I suppose it depends on what you are doing though.
    #3
    11/04/2005 (11:18 pm)
    It's not really hiding, but maybe you could teleport that dif under terrain, but then you wouldn't have collision..
    #4
    11/05/2005 (5:36 am)
    I don't work with dif.. but does DIF have the .startfade function that DTS objects have?
    #5
    11/05/2005 (6:43 am)
    There is probably a .visible member for the object that you can set to false, maybe. If you want semi-transparency, you'll have to alter the code for DIF rendering and the camera functions.
    #6
    11/05/2005 (9:56 am)
    As I said, if this is top down, I don't think you need the complex collisions that DIF offers -- you could probably get away with DTS collisions... and this is all easy to do with a shape instead of a BSP...
    #7
    11/05/2005 (10:48 am)
    Maybe you could use the transparent resource and manually set a detail level to use transparent difs? I don't know I am just looking at the header file for interiorinstance.h.

    Edit:
    dynamic skins using the transparent difs?
    #8
    11/08/2005 (12:34 pm)
    You could use DTS only for the parts you wish to fade in/out. It's possible to get the DTS models to cast shadows on the lightmaps.
    #9
    11/08/2005 (12:43 pm)
    Has anyone thought about just transforming the camera underneath the roof of the .dif?
    #10
    11/08/2005 (12:57 pm)
    Don't shoot me! Wouldn't a better approach be to expand the plane clipping inside the engine as it removes non-visible faces, what about changing its logic.
    #11
    11/08/2005 (1:08 pm)
    I'm looking to do the same thing. Trying using %this.fade(); It may need some variables passed to it. I don't remember if it's 3 variables for fade() or startfade(). The first I think is how long of a pause before it fades, Second is the duration of the fade, and the third is a bool, of if it's visible or not.