Placeable Alpha Transparency Effect (Alpha SEF?) Required (RESOLVED!)

EDIT: This is now resolved: See the longer post further down for the final result. :+1:

I may have missed something obvious, but I wanted to be able to apply an alpha SEF (VFX) to a placeable object to make it appear ghosted/transparent and with a “bluish” hint to it.

Is there an easy way to do this? If not, does anyone know how to make one?

(I have not been successful in applying one.)

@4760 This may be within your area of expertise: Is this something that requires doing at a model level, perhaps?

1 Like

I’ve always considered you a “master scriptwriter” over here, so I’m really surprised you don’t know how to do it. Sorry but I have a high opinion of your abilities. :slightly_smiling_face:

Is this something like that you’re looking to do? Here’s a script I use to make a door look go “ghostly”. Maybe this script can inspire you?
Sorry if that’s not the case.

// Put this script OnEnter.
// z3_ar9201_doorsanctu_1
// Make door of samll sanctuary glow blue 

#include "x0_i0_partywide"

void main()
{
    object oTarget;
    effect eVFX;

    // Get the creature who triggered this event.
    object oPC = GetEnteringObject();

    // Only fire for (real) PCs.
    if ( !GetIsPC(oPC)  ||  GetIsDMPossessed(oPC) )
        return;

    // Only fire once per PC.
    if ( GetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF)) )
        return;
    SetLocalInt(oPC, "DO_ONCE__" + GetTag(OBJECT_SELF), TRUE);

    // Apply a visual effect.
    eVFX = SupernaturalEffect(EffectVisualEffect(VFX_DUR_ETHEREAL_VISAGE));
    oTarget = GetObjectByTag("z3_ar9201_doorsanctu_1");
    ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVFX, oTarget);
}
1 Like

@raymondsebas

Thanks for your high praise of my skills. I do what I can. :slightly_smiling_face:

In my own notes, I had this VFX as a NWN1 that failed to work on anything … So, I had the script there, but it is commented out with a note that it did not work. :thinking:

Have you tested and confirmed this effect as working then?

I mean I do have a VFX that works (kind of), but it is not transparent. (I think it is using the Blur VFX.)

EDIT: OK, so I looked at my “own” notes again and found that it should work: I looked at the wrong script line before!

Thanks for making me check my own stuff again! :+1:

1 Like

This is the VFX I used (see attached image).
In all honesty I don’t remember what the other VFX did to the door, I know I went with this one because I liked it.
I will try other VFX on it. I will get back to you during the day.

1 Like

I think I answered my own question (see my edit above.) :sweat_smile:

Thanks for making me check my own stuff again! :+1:

1 Like

@raymondsebas

OK, so after applying the correct VFX (as according to my own notes), I did end up getting a result … however, it is a little bit too non-transparent for my need … :thinking:

1 Like

@Lance_Botelle

Here’s a different look effect by selecting “VFX_DUR_GHOSTLY_VISAGE_NO_SOUND” instead.

1 Like

Ah! That may be more what I am after … I will try that one too … back in a sec. :slightly_smiling_face:

1 Like

@raymondsebas

That last VFX was better, but it still lacks the transparency I was after … :thinking:

Maybe there is a VFX number we have yet to find?

(I am going to mark this thread unresolved just in case there is another VFX or solution for the transparency I am after. I want to be able to see through the item, as if we are seeing an outline/skeleton of the placeable only.)

1 Like

It’s especially the “VFX_DUR_” that seem to work, but not all.

VFX_DUR_GLOW_LIGHT_BLUE as in the attached image gives the same result as “VFX_DUR_GHOSTLY_VISAGE_NO_SOUND”, as you can see here.

And “VFX_DUR_BLUR” will be blue but will pulsate gently.

1 Like

@raymondsebas

Yes, I have this one in a number of places already … but, sadly, it is not transparent … although is currently the best contender for what I need it for. :slight_smile:

EDIT: I thought I was going to be able to apply some kind of SEF with alpha to the placeable, but it did not work. :thinking:

The only other thing I have not tried, but don’t think it should make any difference, is to add a line to the vfx_persistent.2da and add the transparent SEF I make to that and then try applying the VFX via the old method using EffectVisualEffect instead of EffectNWN2SpecialEffectFile … :thinking: (It may well be that many of the old VFX stopped working due to alpha involvement somehow? I note the old VFX I want to apply have this.)

1 Like

Have you tried a vfx and assigned it the model effect. It gives a placeable as a vfx (or iirc a model/creature in default animation pose). You would then assign the SEFToPlayOnModel to something like vfx_invisibility, and handle any interaction via a placeable collision box or the like. Here is an example of the vfx barrel with vfx_invisibility, which seems to be the look you are going for.

3 Likes

@kamal

Ah, that is the sort of thing I am after! :slightly_smiling_face:

There was another approach I was going to try later, but this may be a bit more straightforward.

As soon as I am back at my main computer, I’ll give this a shot.

I was not aware of that property facility in the tool settings.

I will have to see how the collision feels in game, as I also was after full highlight if possible.

Thanks.

I will post results later.

1 Like

I was going under the assumption that a placeable barrel won’t show the vfx_invisibility. Theoretically (I haven’t tried it), you could spawn a placeable barrel, and in the onSpawn try to apply the vfx you want to the barrel.

2 Likes

@kamal

Correct, it does not work like this, as I thought it would do too. i.e. This does not work …

image

I am at my main computer now and so will try the things out that you and @4760 have suggested and see what I come up with.

(I also have a script that can apply VFX or SEFS at startup and the SEF also does not work on startup.)

I’ll report back.

1 Like

@kamal

QUESTION: Is there a specific colour I have to use for the DDS file to make the texture transparent in the world?

Using transparent makes the barrel appear black.

I’m experimenting with ideas…

I mean PLC_MC_CollBox uses just a small alpha image, but when I try it, it comes out black … I’ll try again. Now it is coming out like this …

image

Oooh… Messed around some more with some of the config settings …

UPDATE 1: I may be getting somewhere now … I will try some various tidying up of the texture now…

1 Like

@raymondsebas
@4760
@kamal

First, my thanks go to all three of you who helped steer me where I needed to go! Hopefully, I will put the end result to good use now, and possibly moving forward. In case it was not obvious, the usage of these is to highlight to the player where they are able to drop an object. :+1:

If you have any feedback for improvements, or have a favourite “look” for what I am aiming for, then please let me know. That feedback is asked of any who are following this post. :slightly_smiling_face:

Anyway, after playing around with the VFX editor and editing textures and creating new models to test, I believe I have the effect I am after. The BIGGEST issue I had throughout this testing that slowed me up, is that I found out that the toolset had to be reloaded on occasion as it was not always updating “live”. So, sometimes I was seeing a correct result, and at other times it may have worked, but where I had not reloaded the toolset, I missed it. So, I had to repeat some tests to realise it was doing the right thing after all. :face_with_diagonal_mouth:

WHAT WORKED FOR ME

  1. I ended up simply making a new model for the object that I wanted “ghosted”, as applying the VFX only (as a “transparent” SEF) lacked the exact collision I was after and the collision box was too cumbersome to employ as accurately as I wanted to.

  2. I have no idea if any of the options I set here in MDBConfig made any difference, but I show them now just in case. The important bit is that I reworked my own texture for the barrel so that the vast majority of it was “transparent”. (This is where the toolset played up a few times in my testing.) So the plc_mc_exbarrels_lb (DDS texture file) is where all the transparency ends up coming from. I also “brightened” and coloured the remaining texture to stand out more as a glow.

  1. For extra “attraction”, (and as it was just like any new placeable object), I was then able to add a VFX to the object for extra finish effect. This can be left off or altered as require via scripting.

THE END RESULTS

Here is a video with the end results. From left to right, the first barrel has no VFX added, the second has the BLUR (0) VFX, the third has VFX_DUR_GHOSTLY_VISAGE_NO_SOUND (478), and the last one has VFX_DUR_PARALYZED (232). However, there are a number of other VFXs that can be added and a better one may suit certain situations. I just wanted to show a few examples.

SHORT VIDEO (TO SHOW PULSING)

JUST A SCREENSHOT

1 Like
  • Alpha test tells the engine to use the transparency (alpha channel)
  • Cutscene Mesh means that the f_ bones will be used (if they exist), that’s why the characters have lips movement during conversations.
  • Glow tells the engine the illumination texture will be used: all colors except black will behave as if a light is coming from behind the texture.
  • No Cast Shadows obviously means there won’t be any shadow projected by the model.
3 Likes