Loading [MathJax]/extensions/Safe.js

Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Need help with object (tree) shadows  (Read 525 times)

0 Members and 1 Guest are viewing this topic.

genXgamer

  • Modder
  • member
  • Offline Offline
  • Posts: 1449
Need help with object (tree) shadows
« on: January 03, 2024, 04:50:51 PM »

Hi guys

I have made up a number of winter trees both singular and groupings, at the request of Uzin I've added shadows.
The problem I'm having is the horizontal (top view) plane can clearly be seen in the shadow and really stands out from the air.
What baffles me is one tree looks good, I think the horizontal plane is underneath the main shadow for this tree.

Both the [ShVertices_Frame0] and [ShFaces] contain no information for the horizontal plane, so what part do these play?

If someone could give me a brief explanation of how shadows are generated and how the problem may be fixed.
I'm not overly happy with their darkness and excessive level of detail either but I can live with it.
I cannot make available the trees the way the shadows currently look.


Logged
Go in quickly - Punch hard - Get out!

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6200
Re: Need help with object (tree) shadows
« Reply #1 on: January 03, 2024, 08:26:02 PM »

When transparency is utilized in blending, the setting for AlphaTestVal should be considered. This sets a cut-off level for inclusion/exclusion in the alpha channel. The higher this number, the more 'aggressively' the darker tones in the alpha channel are ignored. Any value larger than zero can cause the kind of hard edges for shadows you are getting . Try making it 0.0, to hopefully retain the full alpha channel grey scale and eliminate any such had edge cutting.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

genXgamer

  • Modder
  • member
  • Offline Offline
  • Posts: 1449
Re: Need help with object (tree) shadows
« Reply #2 on: January 03, 2024, 09:35:44 PM »

Making the AlphaTestVal 0.0 impacts the appearance of the trees, for the worse (see below).
However it has zero affect on the shadows.

Not my main worry anyhow, I want to eliminate the horizontal plane shadow and get them all looking like the middle tree.


Logged
Go in quickly - Punch hard - Get out!

WxTech

  • Modder
  • member
  • Offline Offline
  • Posts: 6200
Re: Need help with object (tree) shadows
« Reply #3 on: January 03, 2024, 10:08:03 PM »

This is an issue I find myself periodically battling with. Getting the right combination of blend, testA, testZ and AlphaTestVal, along with the texture size/sharpness and the LOD transition can be something of an art.

You could consider using a second texture for the horizontal part, which would give you full control of it, such as creating no shadow for it. Or separate the horizontal part in the mesh, and create a second .mat file set for it, or otherwise nix the shadow mesh.

There's nothing that says an object must use only the one and same texture and .mat files for the whole shebang.
Logged
Great minds discuss ideas. Average minds discuss events. Small minds discuss people. - Hyman Rickover (but probably predating his use.)

genXgamer

  • Modder
  • member
  • Offline Offline
  • Posts: 1449
Re: Need help with object (tree) shadows
« Reply #4 on: January 03, 2024, 10:54:51 PM »

Thanks Glenn

I thought about seperate textures, the Elm tree in B.A.T. is an example.
But I believe performance wise this is less desirable.
One tree shadow looks right, I just have to figure out why.
Logged
Go in quickly - Punch hard - Get out!
Pages: [1]   Go Up
 

Page created in 0.034 seconds with 27 queries.