Jump to content

Vishankas Mod corner


Recommended Posts

The alpha channel of the T-Energy-shader's color output has no effect whatsoever. The output color just gets multiplied and therefore darkened by the input texture's alpha channel.
It seems that for the mytiquefx surface, at least one of SURFACE_FLAG_OPAQUE, SURFACE_FLAG_MASKED or SURFACE_FLAG_TRANSPARENT needs to be present or otherwise the surface doesn't get rendered. I have no idea why.

We want solely SURFACE_FLAG_TRANSPARENT to work with T-Energy. And no matter what I try, it just doesn't work.

So far I'm out of theories. There are multiple surfaces out there which don't have one of the three textures, dont know but I think they do work, e.g. "fx-sera-fluegel-castbase_c" or "fx-sera-kampfhaltung-cast_c". Also non-fx-surfaces like all the ancient set wing variations. Why not mystiquefx? I have no idea.

If only I knew what shader was responsible for SURFACE_FLAG_TRANSPARENT. If only I knew why SURFACE_FLAG_TRANSPARENT even exists. Theres a C#-var calles IsOpaque which gets set to true via SURFACE_FLAG_OPAQUE. Why not have either the flg set and set alpha to 1 or have it not set and set alpha to whatever the inpt texture's alpha is? What does this flag do? Why does it need to be present for the fx to get rendered? So many questions, so little answers.

Link to comment

In surface.txt, SURFACE_fLAG_TENERGY never appears together with SURFACE_FLAG_TRANSPARENT. Except for three instances, the SURFACE_fLAG_TENERGY always appears together with either SURFACE_FLAG_OPAQUE or SURFACE_FLAG_MASKED.
These three instances are "fx-speicherstein_s", "sera-mystiquefx-wing_c" and "sera-soporfx-wing_c".

The sopor aethernis wings are a variant of the mystique set, and their FX do show up, but their SURFACE_FLAG_TENERGY isn't working either.

I find this together with your post here interesting:

On 9/24/2022 at 11:18 PM, Vishanka said:
ewSurface = {
  name         = "seraphim-mystiquefx-wing_c",
  texture0Name = "maps/heroes/seraphim/sets/mystique/c_sera-mystique-wing_fx_orig.tga",
  texture1Name = "maps/heroes/seraphim/sets/mystique/c_sera-mystique-wing_fx_orig.tga",
  texture2Name = "fx/blue.tga",
  flags        = SURFACE_FLAG_SFX + SURFACE_FLAG_TENERGY,
  shader       = obj_d_s_b_skin,

HCz4ksa.png

So the fx CAN spawn without either of the three opaque, transparent and masked flags. It's not the SURFACE_FLAG_TRANSPARENT which stops the T-Energy-effect from working. Now I'm even more confused than before. Why isn't it showing up, and why does it work on console?

 

EDIT:

Aaand it doesn't make any sense because the soporfx surface is functionally the same as the wingfx surface. everything's the same, it takes another diffuse image but the image's content is the same as the mystique's diffuse image. Even the itemtypes of the wings match. So why do the soporfx appear but the mystiquefx don't? It must be a hardcoded issue, then.

Edited by Lindor
Link to comment

This has to be the case nut I've solved so far. Instead of trying to force the game into accepting the SURFACE_FLAG_TENERGY, I searched for the function responsible for the effect and created a T-Energy shader which automatically applies the effect.

I've had to guess which textures the game uses, though. But I think I got pretty close :D Transparent-T-Energy-Wings.jpg.9053aeaf9cca057e6967780f6392b393.jpg

Will upload a mod again.

 

 

I strongly recommend using the extractvalues.shader which I will provide in the mod even if you're not using the T-Energy wings. I improved it.

Also I think it would be a good idea to change the "sera-mystique-wing_c" and "sera-sopor-wing_c" flag from SURFACE_FLAG_OPAQUE to SURFAC_FLAG_MASKED and not just focus on the "sera-mystiquefx-wing_c" / "sera-soporfx-wing_c" surfaces.

Link to comment

You can also make it more transparent in the add-t-energy.shader. I think I like that more :)

alphawings.jpg.a5a85a3899960c03d2a4688e6c10eb50.jpg

    float3 color_diffuse = colorize3D(tex0.xyz + (te.color0.xyz * tex0.a));
    float3 color_glow = float3(te.color1.xyz * tex0.a);
	
	O.col[0] = float4(color_diffuse.xyz, tex0.a);
	O.col[1] = float4(color_glow.xyz, tex0.a);

	return O;
}

 

  • Respect! 1
Link to comment
18 minutes ago, Lindor said:

You can also make it more transparent in the add-t-energy.shader. I think I like that more :)

Nice work! Would it be possible to make the whole thing even more transparent and only the t-energy effect would make it look more solid? So that the base glow is very faint

Link to comment

Yee unlike the standard SURFACE_FLAG_TENERGY, the effect is responsive to the texture0Name's alpha channel. You can make it as transparent as you wish. That's something that was important to me, as I always wished that was true for SURFACE_FLAG_TENERGY.

Link to comment
58 minutes ago, Lindor said:

Yee unlike the standard SURFACE_FLAG_TENERGY, the effect is responsive to the texture0Name's alpha channel. You can make it as transparent as you wish. That's something that was important to me, as I always wished that was true for SURFACE_FLAG_TENERGY.

Can you change the color of the effect, for example to red?

Link to comment
35 minutes ago, Vishanka said:

Can you change the color of the effect, for example to red?

Ye just edit the textures. In the surface.txt file which contains just the changes I tried to describe what each texture of the surface does, though I admit that it's a bit more complicated than I described. Just play around with it; e.g. if you swap texture1Name to "fx/te_fx.tga" you get a red-ish background.

Link to comment
  • 2 weeks later...
On 1/31/2024 at 7:19 PM, Vishanka said:

Can you change the color of the effect, for example to red?

 

On 1/31/2024 at 7:59 PM, Lindor said:

Ye just edit the textures.

I'm curious. Are there any interesting colors / texture combinations which you did come up during experimenting? Would love to see some more of your work :)

Link to comment

@Lindor Actually I want to look into materials. Let's take these legs for example. How can I add two more material layers so that the thigh cotton would for example be silk and the blade on the knee metal?

Link to comment
22 minutes ago, Vishanka said:

@Lindor Actually I want to look into materials. Let's take these legs for example. How can I add two more material layers so that the thigh cotton would for example be silk and the blade on the knee metal?

The material for each itemtype is specified in iteminfo.txt. I don't know what happens if you specify multiple iteminfos for the same itemtype, but I guess that most likely the one furthest down the script will overwrite all others.

In order for there being multiple materials for an item, I think one would need multiple itemtypes for an item, like it's e.g. the case with the armored spiders. The saddle of the spider mount has a different itemtype than the body e.g., 13341=saddle, 13342=body. But I don't know wether achieving this for a blueprint.txt item is possible. E.g. "dagger_1h_normal" has multiple itemtypes, but I don't know wether, like for the spider, they all come together to create one model or the game just randomly picks one if the item drops.

Link to comment

Maybe I have not used the correct words, I am pretty much a rookie; mean something like the diamond set of the highelve, to me it looked like there were 2 surfaces, one for the metal part and one for the rest, but maybe that's just not how it works.
fDM8N6U.png

Link to comment

grafik.png.79143569935c642378d4cedb4810f4bd.png

There is this skin color slider. The values which color is chosen, are they editable somewhere? I use the same texture on seraphim and highelf but highelf is lighter so the solution is not the texture, but some file with the color values.
Does anyone know something?

Link to comment

Good job on the wing effect. Got it to work with the PFP easily enough:

pfp.thumb.png.a7bc01e3267f12514c761cc894d44242.png

I am wondering though - was the effect always supposed to be there in the PC version, but was just broken in some way, or was it an entirely new thing in the console versions and this mod just retroactively adds it to the PC version?

Link to comment
2 hours ago, idbeholdME said:

I am wondering though - was the effect always supposed to be there in the PC version, but was just broken in some way, or was it an entirely new thing in the console versions and this mod just retroactively adds it to the PC version?

It has been present on Console but never worked on PC. But it was supposed to work.

Link to comment
5 hours ago, Vishanka said:

But it was supposed to work.

So it has been present in the code, but just not functioning?

I am mainly wondering about whether this is a bug fix, or a modification.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...
Please Sign In or Sign Up