Jump to content

Quick question about Ancient Bark + new Ancient Bark Shader


Recommended Posts

In both CM-Patch and EE, Ancient Bark has FX_SC_SCHILD as spell FX. However there exist rindenhaut.shader and rindenhaut2.shader, implying that FX_DR_RINDENHAUT should exist. Also Flix' FX list implies that. Does Vanilla spells.txt have FX_DR_RINDENHAUT as ancient bark's spell FX? And if so, why was it changed? And if not so, why do these files exist?

EDIT: Go to this post to get the shader and instructions how to use: 

Screenshot example for the new shader at work:

OoDWLe7.jpeg

 

Edited by Lindor
Link to comment

FX_DR_RINDENHAUT is just a god-awful looking FX. 

FY39lCn.jpg

CM Patch replaced it with the FX_SC_SCHILD, somewhere around v.1.30, I believe.  I preserved it in EE because I agreed with the change.

I've tried to work with the three textures of FX_DR_RINDENHAUT to make it look like something at least bark-ish if nothing else. It's just too... overwhelming. It completely masks the underlying creature textures and doesn't respect any MASKED surface entries.  I'm convinced something is actually wrong with the way it's coded.

hq\fx\dr_rindenhaut.dds -- makes the brown "leopard spot" pattern

hq\fx\dr_rindenhaut2.dds -- the bright green glow.

hq\fx\dr_rindenhaut3.dds -- doesn't seem to do anything whatsoever. Ironically this is the one texture that looks like bark. 

Playing "musical chairs" with the textures and trying a few recolors resulted in the following:

BahhR9S.jpg

yUPZrtT.jpg

 

Of these I think the bottom left one looks the best.

Dmitriy made a pretty good version in Addendum, which seems to draw on elements of both the original Rindenhaut and also the SC_Shield.  Maybe you can see what he did with the shaders.

mqEgQut.jpg

  • Like! 1
Link to comment
18 hours ago, Flix said:

FX_DR_RINDENHAUT is just a god-awful looking FX.

Aah, so it was purely cosmetic.

18 hours ago, Flix said:

It completely masks the underlying creature textures and doesn't respect any MASKED surface entries.  I'm convinced something is actually wrong with the way it's coded.

Actually it looks like everything works as scripted in the shader. The reason for it not working MASKED is probably that it is a 3d texture. I think I understand how it works and can make it look better. Btw FYI the shader makes the FX clip (aka the pixels not being rendered, and I really mean pixel, not vertex) wherever the alpha channel of the texture0 falls below 30%. It's a yes/no thing, no possibility for different levels of alpha. I can change that I think. Also I can make it work differently for glow and diffuse.

Btw the third texture really doesn't do anything. Both shaders expect only one texture. One shader for the diffuse and one for the glow.

But I can't make the anicent bark shader work like the scorpion shader, partially bcs the scorpionshield shader is way more complex than the ancient bark one, I don't understand everything, partially bcs there's limitations: I can't influence the files tied to the FX. The SC expects 4 textures, and I can't bind 3 more textures to the FX cause that's hardcoded. I can decrease the number of textures a shader expects, but never increase it.

18 hours ago, Flix said:

Maybe you can see what he did with the shaders.

That is the plan :)

18 hours ago, Flix said:

Maybe you can see what he did with the shaders.

Not much actually, as far as I can tell. Ancient Bark as well uses FX_SC_SCHILD and using the N++ compare plugin I can tell the only thing he changed was a single parameter which, if I interpret it correctly, it makes the glow slowly move along the y-axis with the ingame time. As a side effect the glow texture has to be 1960 pixels wide along the y axis now in order to avoid jumps.

The main change needs to be in the four texture files the shader expects.

Wierdly, the scorpion in addendum now uses FX_RINDENHAUT. But D didn't change anything about the ancient bark shader.

 

 

One more thing: I found a unverwundbar.shader. Achilles e.g was "unverwundbar". Well, nearly. At the beginning of the shader it says // skorpionshield. But I don't see why this exists, the FX_SC_SCHILD has two different shaders. Another mystery I want to know more about.

 

EDIT:

33 minutes ago, Lindor said:

Not much actually, as far as I can tell. Ancient Bark as well uses FX_SC_SCHILD and using the N++ compare plugin I can tell the only thing he changed was a single parameter which, if I interpret it correctly, it makes the glow slowly move along the y-axis with the ingame time. As a side effect the glow texture has to be 1960 pixels wide along the y axis now in order to avoid jumps.

Accidentally swapped Addendum with CM one, D disabled this feature, not enabled it. This also explains why there's this whole chunk of code set up in the shader file that is not even used. It was used in CM and got disabled in Addendum, not vice versa. Still wierd that D just flipped that single value instead of just deleting this whole chunk of now unnecessary code, thus improving performance.

So without having played an Addendum Dryad yet, I assume the ancient bark fx glow is now not moving anymore or at least more slowly? Because that would confirm my interpretation of the code I'm seeing.

Edited by Lindor
Link to comment

Always hated this skin, though i loved playing the dryad.  When I see Flix,s image here:

FY39lCn.jpg

 

 

For maybe the first time ever im thinking  .. do you guys think it was created this way as a kind of Easter Egg to the first time we all saw the world through the Predator's eyes in Arnold Schwarzenegger's epic Predator? I remember everyone in the audience gasping in awe when we saw this imagery on the big screen back then, all connected to alien"s concept of jungle subterfuge ^^

 

pred1.jpg

  • Haha 1
Link to comment
2 hours ago, Lindor said:

Not much actually, as far as I can tell. Ancient Bark as well uses FX_SC_SCHILD

Sorry about that, you're right, he actually kept that effect in place for Ancient Bark, changing the textures to use more green, and slowing down the shader movement, making it look like this:

po0EyJk.jpg

 

He then gave FX_DR_RINDENHAUT to the Scorpion boss.  The FX now looks like this, which is actually pretty neat.

rcwYqNf.jpg

 

2 hours ago, Lindor said:

The reason for it not working MASKED is probably that it is a 3d texture.

Ah, I see, it's a volume map. I've never made nor edited one of those.  Loaded in GIMP it kind of looks like an image with 100 slightly different layers.

 

1 hour ago, gogoblender said:

Easter Egg to the first time we all saw the world through the Predator's eyes in Arnold Schwarzenegger's epic Predator?

That is such a great movie. I mean, that's a good of an explanation as any!  :lol:

  • Haha 1
Link to comment
8 minutes ago, Flix said:

and slowing down the shader movement

perfect! So my interpretation is probably correct, thx!

 

11 minutes ago, Flix said:

The FX now looks like this, which is actually pretty neat.

Looks like T-Energy glow and the holes are bigger. Again must've been done at the texture level, no changes to rindenhaut.shader or rindenhaut2.shader.

Link to comment
12 hours ago, Lindor said:

Btw the third texture really doesn't do anything. Both shaders expect only one texture. One shader for the diffuse and one for the glow.

Wrong! sry for that.

Both shaders expect 2 textures, the volume map and texture0. It might be that the hardcoded linking is off and links the glow map to both rindenhaut.shader and rindenhaut2.shader, but it is more likely that the glow, rindenhaut2.shader, just masks the underlying diffuse, rindenhaut.shader. A way to solve this is to inverse the clipping for rindenhaut.shader, which I can do.

EDIT: actually rindenhaut.shader's texture0 doesn't do anything despite the script expecting it. The diffuse color is made of the volume maps color.

 

Curious why they chose to go the 3d way. So that curved meshes don't distort the holes? Hm.

EDIT2: I know why. It's about the intersection of a 2d surface with a 3d volume map which makes the leopard spots change size and form, merge and split and rotate and wobble. If it was a 2d map, the leopard spots would just move around the mesh but not change their appearance.

Edited by Lindor
Link to comment

Just an idea and I don't know if that would be feasible.

That thing is called Ancient Bark or Rindenhaut; how about applying any shader just to the skin layers but not over the armor?

Link to comment

Really great work! 

In case there was confusion, there are absolutely no plans to change the FX for PFP, that's outside the scope of the mod.

Depending on how it looks I'm sure it will have some useful application in D2F though. I've thrown in everything plus the kitchen sink with this next release work regards to FX.

Link to comment

Thx for all the positive feedback! The project is not finished yet, there are more things improvable.

The original code had half the size of the leopard spots and 10 times the resolution of the diffuse map. Initially I changed that thinking that I'd increase resolution and decrease spot size when in fact I was doing the exact opposite. Re-enabling the resizing parameters made it really look 10 times better:

LyjY9q2.jpeg

I have updated the code within the post above to fit the higher res shader.

Also I'm thinking about clipping the glow effect for high opacity of the volume maps alpha, this way the sparkling of the diffuse maps on regions with low alpha should be reduced. Also I think I'm gonna repurpose the volume map's colorization into a normal map. Last but not least, I think I'm gonna change the border glow. Currently it's a sinus peak, but it could also be a pure positive or negative slope, will see what looks better.

10 hours ago, Flix said:

Depending on how it looks I'm sure it will have some useful application in D2F though. I've thrown in everything plus the kitchen sink with this next release work regards to FX.

Haha glad to read that. However there are just half of the FX listed currently in the FX list, there is so much more awaiting as indicated by your list. I'm getting consumed by my shader project rn, but I haven't forgotten about the FX list. But the plans I have for upcoming new shaders are just too exciting, esp. the possibility to finally achieve the starry pattern I want for the Deylen set.

11 hours ago, Vishanka said:

Just an idea and I don't know if that would be feasible.

That thing is called Ancient Bark or Rindenhaut; how about applying any shader just to the skin layers but not over the armor?

Good idea, but I don't even know wether that's possible. If it is, then I'm definitely not understanding enough to do that yet. I'm currently learning about the Pixel shader part, but your idea would be settled in the Vertex Shader half. But my guess is that it's probably hardcoded into the I.position parameter.

Edited by Lindor
  • Like! 1
Link to comment
2 minutes ago, Lindor said:

Good idea, but I don't even know wether that's possible. If it is, then I'm definitely not understanding enough to do that yet. I'm currently learning about the Pixel shader part, but your idea would be settled in the Vertex Shader half. But my guess is that it's probably hardcoded into the I.position parameter.

I thought of the possibility to change the skin color at character creation and the way that affects all the armor items, even those with skin parts on them, maybe there is a way to do anything with that behaviour. There are those _hx.dds files, with just the skin selection for items... and I don't know what I'm talking about but perhaps you have an idea :lol:

Link to comment
38 minutes ago, Vishanka said:

I thought of the possibility to change the skin color at character creation and the way that affects all the armor items, even those with skin parts on them, maybe there is a way to do anything with that behaviour. There are those _hx.dds files, with just the skin selection for items... and I don't know what I'm talking about but perhaps you have an idea :lol:

I've taken a look at skin.shader. The color of skinned items comes from texture3, and I'm pretty sure they hardcoded the linking of texture3 to be dependent on the skin color you choose. Actually I think that's a CM-Patch achievement. Or otherly stated: you're wearing a skin above your skin.

Trying to change the behaviour of FX is a whole different story. It would be necessary to clip the FX dependent on Vertex position. This dependency could be achieved through the alpha channel of called texture3 of skinned items and for non skinned items the whole surface would need to be clipped. For that it would be necessary to "send" information from one shader to the other. That is not possible without hardcoding.

Edited by Lindor
Link to comment
  • The title was changed to Quick question about Ancient Bark + new Ancient Bark Shader

That's pretty damn good.  Will be an even better choice than the SC_SHIELD for Ancient Bark in EE, I think.  :thumbsup:

I really appreciate you describing what you did.

  • Thanks! 1
Link to comment
  • 2 weeks later...
On 4/18/2022 at 10:54 PM, Lindor said:

YmBVQwx.jpeg

Unfortunately imgurs max height pixel size is 3000.

With sinus / positive slope / negative slope is the function glow of Volume map's alpha channel meant. So e.g. for positive slope, the inside of the border glows the most. You can see the effect alpha scaling has on negative slope e.g., there's a visible gap between the border and the bark texture.

EDIT: I have decided what to go for: Small border size, doubled leopard spot size (which has the side effect of doubling border width without increasing the amount of border per texture), color luminosity of border scaling with glow function, alpha of border not scaling with glow function and the glow function islinear with positive slope.

OoDWLe7.jpeg

This will be the final version of the shaders, the code a couple posts above has been edited.

Btw this is how it looks with rindenhaut3.dds at full opacity? opaqueness?:

  Reveal hidden contents

 

 

It’s awesome! I remember being very disappointed when I found out that putting on the path which was necessary to just survive make the character look ugly and almost unrecognizable her features and pretty parts of her armour all washed away… I love how much time you put into this really making an effort to find a balance to this dilemma

I would’ve loved seeing the dryad this way when I first started playing 

you have a sensitive And sharp eye for details in this game 

Thank you for this work

🙏

gogo

  • Thanks! 1
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