Giter Site home page Giter Site logo

Flags - Alpha threshold about nifxml HOT 5 OPEN

niftools avatar niftools commented on May 18, 2024
Flags - Alpha threshold

from nifxml.

Comments (5)

ttl269 avatar ttl269 commented on May 18, 2024

I don't think so. I think that it si defined correctly in nif.xml - like the threshold for alpha testing function - and it works like that. So, I don't see any reason to change anything here.

from nifxml.

hexabits avatar hexabits commented on May 18, 2024

@neomonkeus @ttl269 There are actually undeciphered values for NiAlphaProperty's Flags.

Harvestable plants where the texture changes when picked e.g. florajazbay01.nif (a bad example because the vanilla NIF's threshold is actually wrong. Fixed in USKP.) seem to have a Flags value of 37612.

This means more than likely that 32768 has something to do with harvestable plants. The way that this appears to work is that Bethesda expects the Threshold to be 128. There are parts of the DDS file's alpha that you paint a grey color. Once you harvest the plant it adds a certain value to the threshold such that this grey color becomes invisible.

This means there is also a 16384 value.

from nifxml.

ttl269 avatar ttl269 commented on May 18, 2024

@jonwd7 @neomonkeus My investigations:

  • When plant is harvested, game set Threshold value always to 160. As you said, to work this "harvesting", the value of Threshold in nif file must be set to 128.
  • 15th bit (32768) in Alpha flags is Editor Alpha Ref Test (name taken from Scene Graph). It has probably no influence on look or function of object in game. I have also not found any visual function in CK.
  • It seems that 14th bit (16384) in Alpha flags is not used.

from nifxml.

hexabits avatar hexabits commented on May 18, 2024

@ttl269 So does disabling the 15th bit not cause the "increase threshold on harvest" function to cease in game? Because it's odd that these harvestable plants have this bit, yet other plants and grass do not.

I will eventually getting around to writing an 010 script that can test the various bitflags in the NIF format so that I can actually start compiling lists of all the NIFs with certain bits toggled on.

from nifxml.

ttl269 avatar ttl269 commented on May 18, 2024

@jonwd7 I have tested it yesterday and disabling this bit didn't broke "increase threshlod on harvest" function in game. Later then I have found a name for that bit - Editor Alpha Ref Test - so I assume that this bit has something to do only in CK.

from nifxml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.