Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 9.98 KB

material-editor-scene.md

File metadata and controls

48 lines (34 loc) · 9.98 KB

Material editor scene verification

Russian translation | Authoring procedure

Automated checks

Configure an x86 test build and build the affected targets separately. Use material-preview-panel-tests, drag-value-label-tests, and gameui-tests for interaction; preview-model-tests and material-lifecycle-tests for model loading and opening and closing the editor; scene-preview-gl-tests and studio-capture-gl-tests for rendered output. If the change affects shared interfaces, include checks for the engine, client, and other modules that use those interfaces.

GL checks require an OpenGL 3.3 compatibility context. A skipped GL case does not establish rendering correctness. Record results with the source revision and build configuration.

For game observations, prepare matching Release engine, client, and GameUI libraries using the installation procedure. Building a target does not install it. Closing and reopening the editor must preserve saved materials and leave settings previews and gameplay usable.

Developer runtime checks

Run these checks in an installed Steam game with the matching libraries and updated localization resources. Record the library revision, video mode, selected model, and r_mat_scene_state output for any failure.

  1. Start the client without loading a map. Set developer 1 and open Material Editor from the upper-left tools group, including the native and optional CEF menu presentations. Select an installed model that has not been precached. Its textures, skin families, body variants, and sequences must become available. Close and reopen the editor.
  2. Test Model view and Weapon view. Use the mouse to orbit, pan, and zoom, frame the model, and mirror the weapon. Release mouse capture through button release, focus loss, console opening, and close. The settings preview must still work after the editor closes.
  3. Select an animation, move its frame slider, pause and resume, and change playback speed. Animation must progress without a map. Compare short non-looping sequences at 0.25x, 1x, and 2x: motion must span the declared sequence duration evenly, without an early jump to the final pose. Scrub the first, middle, and final frames, then switch sequences. Confirm that model and texture changes preserve scene lighting.
  4. Select weapon_finish, edit a visible parameter, and toggle Compare. Disable gameplay r_studio_shader and r_studio_materials; the editor must still render authored materials. Their cvar values must remain unchanged after closing.
  5. Change azimuth, elevation, all RGB channels, ambient strength, and directional strength. Try Neutral lighting, Ambient lighting only, and Grazing light. Orbit the camera with the light fixed and inspect highlights in both view modes.
  6. Change a material, then attempt a model change, texture change, and close. Test Save, Discard, and Cancel. Cancel must preserve the selected model, texture, and unsaved material settings. In the texture browser, Back must restore the previously selected image while retaining other edits. Cancel in the color picker must restore its opening color.
  7. Save and reopen a document. Select individual related-model save targets. Exercise a destination without the selected texture, a write failure, and a partial failure across destinations. All failures must be visible and the working material must remain dirty. Unselected documents must remain unchanged.
  8. Scroll the catalog from the first model to the last, then filter, clear the filter, and rescan. Every visible row must show a thumbnail or failure marker. After scrolling, select several rows. Each must open the model identified by its name and thumbnail. Scrolling must preserve unsaved material settings and must not consume the model-loading limit. Reach the shared 128-new-entry limit by selecting installed models, including models with separate texture companions. Expect a visible capacity error while previously loaded models remain usable. Check that closing and reopening the editor does not reset the accounting.
  9. Exercise video mode change, disconnect and reopen, and loading while a save/discard confirmation is open. The editor, child dialogs, and mouse capture must close on a forced exit. After reconnecting, normal camera, crosshair, viewmodel, and entity rendering must use gameplay state.
  10. Confirm that view and animation controls stay below the viewport with a visible gap and the Lighting tab contains all light controls. Use the Model picker on Material with dirty material values. Reset Weapon view after rotating, panning, and zooming; animation, mirror, material, and lighting must survive.

Toggle the sun indicator and compare its color and arrows with the light controls. Enable Animate sun from vertical Neutral lighting: elevation must become 35 degrees and remain fixed while azimuth rotates continuously around the model. Set Sun speed to 0.25x, 1x, and 4x and compare revolution times of 96, 24, and six seconds, including with model playback paused and the gizmo hidden.

Change speed during rotation without a clock reset, then stop and resume. Change the model and model playback speed, and edit presets, angles, color, and strengths while the sun moves. Animated elevation must stay in 5..80 degrees; disabling rotation restores the static -90..90 range. Reset must disable sun animation and restore 1x sun speed. Values and the selected controls must remain coherent, and the working material must stay unchanged. 11. Hover and click animated, mirrored, skinned, and body-selected geometry, including masked holes and overlapping surfaces. The visible texture must be outlined and selected. Dragging must rotate without selecting. Cancel a dirty selection and verify that both the texture field and working values remain unchanged. For a masked surface, reduce weapon_finish uBaseTint alpha to 0.25 and 0.5 and confirm that clicking selects the visible surface behind it. Repeat after GL context replacement and viewport resize. Move the pointer from the model into empty background and leave it there for several frames; subsequent model draws must remain stable. 12. Repeat entry, lighting, saving, and close checks in the supported Linux client.

  1. Select a group whose textures have different scalar, vector, image, and color values. Check the mixed markers, edit one parameter, switch programs, and save/reopen every selected texture. Back in the image browser and Cancel in the color picker must restore each texture's original parameter and mixed marker. Repeat by closing the picker and leaving the browser through a tab. Other unsaved changes must remain intact. Check Save, Discard, and Cancel when changing the group.
  2. Enter nan, inf, and 1e999 into scalar and vector fields. Each rejected edit must restore the last valid value, preserve the material and dirty state, and leave the editor responsive.

These observations verify engine initialization before the first map, VGUI layout and focus, installed content, and appearance. Engine-free and offscreen checks do not establish those properties.

Material effect checks

  1. Select both studio and weapon_finish. Verify dissolve with a red gradient mask at 0, 0.5, and 1; combine it with noise at 0, 0.5, and 1. Set each space to UV and then screen coordinates. Move the model, resize the view and confirm screen cells remain square. Freeze noise with speed 0, change the seed, then set 4 updates per second. Hover and click the remaining fragments and masked holes.
  2. Select Occluded only, disable the test occluder, move the pointer onto the parameter panel, and rotate the model through several complete turns. Repeat with a small model containing thin, nearly edge-on triangles, then resize the window and switch between windowed and fullscreen modes. Fill, outline and glow must remain absent. Select Always: outline and glow must follow the entire external silhouette, while visible surfaces retain their material and receive no fill. Select Visible only: the visible silhouette must remain outlined.
  3. Enable Show test occluder. Confirm visible surfaces retain their material while the hidden part receives fill in all three outline modes. Set outline width 2, glow radius 8 and strength 1. Occluded only must outline the hidden part of the external silhouette; Always must outline the whole silhouette; Visible only must outline the visible part. No mode may trace the wall cut across the model. Fully hide the model: Visible only must have no outline or glow while hidden fill remains. Width 0 must disable outline and glow. Repeat with MSAA Off and 4x in video settings, applying each change and restarting as prompted. Toggle Compare, change model and view mode, then switch video mode and reopen the editor. Record r_mat_scene_state counters for a failure.
  4. Install the server module and its include file on a test server. Open the materials test plugin menu with ncl_fx_menu or /ncl_fx. Create a model, select its program, switch outline modes, and adjust parameters.
  5. Test normal, fine, and coarse parameter steps and direct numeric entry. Enter 0.1234567 and verify precision after parameter updates and reconnecting. Values outside the allowed range must be clamped to its minimum or maximum. nan and infinity must be rejected. Fractional outline_mode values must be rejected without changing the parameter.
  6. Move the model behind a wall outside the player's potentially visible set (PVS) and enable ncl_mat_through_walls. Check the model in NextClient 2.6+ and an ordinary client, including joining after the effect is enabled and reconnecting. Disable the flag. The engine may continue transmitting a recently visible model briefly; wait for transmission to stop.
  7. Repeat after clearing the material, removing the final binding, deleting and recreating game objects, picking up and dropping a weapon, and changing maps.
  8. Transmission outside the PVS must honor the server's other restrictions: no-draw, missing models, observer and group rules, and the maximum number of entities in a packet.