×
Меню
Индекс

NiScreenPolygon примечания

 
Примечание.
Благодаря внимательности уважаемого Greatness7 удалось найти подобные настройки для этого объекта.
    <niobject name="NiScreenPolygon" inherit="NiObject">
        <add name="Num Vertices" type="ushort"></add>
        <add name="Vertices" type="Vector3" arr1="Num Vertices"></add>
        <add name="Has UV" type="bool"></add>
        <add name="UV Sets" type="TexCoord" arr1="Num Vertices" cond="Has UV"></add>
        <add name="Has Vertex Colors" type="bool"></add>
        <add name="Vertex Colors" type="Color4" arr1="Num Vertices" cond="Has Vertex Colors"></add>
        <add name="Num Property States" type="uint"></add>
        <add name="Property States" type="int" arr1="Num Property States"></add>
    </niobject>
Т.е. если какой-то файл будет содержать СкринПолигон, данные настройки позволяет его открыть.
 
Возможно, не удалось полностью определить параметры для раздела PropertyStates.
Что он должен содержать и должен ли содержать вообще.
Модели захваченные из игры имеют значение этого раздела в нулях.
Попытки установить ссылки на свойства, или иные произвольные параметры приводили либо к КТД, либо ни чему.
Поскольку увидеть этот объект в локальном файле - "проблематично".
Тест через МВСЕ - не проводился.

Примечание.
Однако, можно применить "альтернативный" вариант!
    <niobject name="NiScreenPolygon" abstract="0" inherit="NiTriShape">
    </niobject>
Т.е. достаточно будет указать, в настройках камеры, любой шейп из уже имеющихся в ниф файле.
В этом случае, Скеневиювер, корректно откроет этот файл и в разделе NiScreenPolygon покажет наличие там этого шейпа.
 
Примечание.
Однако, если просто переименовать шейп, или шейпдату в NiScreenPolygon и подсунуть такую модель СкенеВиюверу - будет вылет.
 
Примечание.
Попытки прописать NiScreenPolygon с описанными выше уникальными настройками в раздел экстра даты другого элемента ниф файла,
приводили к стабильному вылету при открытии (загрузке) такой модели.
Либо при попытке вызвать свойства основного объекта.
Отчего, можно предполагать, что правильные, индивидуальные настройки этого элемента, так и не были найдены.
Либо он, не может быть загружен в экстра дату, как это происходит с аккумуляторами.
 
Hrnchamd писал:
NiScreenPolygon is for rendering without using a camera, so it is mostly UI + hit faders, sunglare, and stuff like that
sunglare - это ореол от солнца.
Хотя по SSG ореол это обычная билборд нода. Да и hit fader тоже!
В целом МВ везде и всюду использует обычные triShapes.
 

 Выдержка из оригинальной справки. (NDL Gamebryo 1.1)
 
An NiScreenPolygon represents a screen-space (as opposed to model or world-space) polygon. NiScreenPolygon objects are typically used as cursors, "Heads-up display" indicators, dials, gauges, and other overlay objects. However, screen polygons do have depth values, and can be used at depths other than 0.0 (i.e. nearest the screen).
 
NiScreenPolygon Clipping and Culling
Unlike previous versions of Gamebryo, NiScreenPolygons are clipped, although behavior is not completely consistent across renderers. Refer to the documentation for each renderer for questions regarding such inconsistencies.
 
NiScreenPolygons and Rendering Properties
Note that each screen polygon acts as if it were the root of a scene graph -- any property value that is to differ from the default values must be attached to the screen polygon.  This requirement is true even if multiple screen polygons are attached to the same camera.  Rendering property settings do not carry over from one screen polygon to the next.  All rendering properties now affect screen-space polygons.  However, no dynamic effects are ever attached to a screen-space polygon, so no lights or texture effects will ever affect them.
 
The code creates a simple, 4-vertex screen polygon that includes only vertex positions and texture UVs.
The texture coordinates map the entire texture across the polygon.
Only two properties are attached; a texturing property and a dithering property.
The texturing property attaches the procedural texture as the base texture (already assumed to be valid), and sets the texture mode to REPLACE, ensuring that the texture is rendered directly.
The dithering property is attached in order to ensure that the resulting image on 16-bit framebuffers is not heavily banded (this can happen with this kind of cloud texture,
and tends to draw attention to the nature of the noise function).