Counter-Strike 2 Workshop Tools/BreakableWindows: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
{{todo|polish it out, add information.}}
{{todo|polish it out, add information.}}
{{note|This tutorial assumes a basic familiarity with [[ModelDoc Editor]].}}
{{note|This tutorial assumes a basic familiarity with [[ModelDoc Editor]].}}
{{tip|example model can be found in "Counter-Strike Global Offensive\content\csgo\workshop\content_examples\breakable_glass\breakable_glass_01.vmdl"}}
{{Bug|func_breakable does not spawn gibs on break in {{cs2|4}}. It's recommended to use prop_dynamic instead}}
{{Bug|func_breakable does not spawn gibs on break in {{cs2|4}}. It's recommended to use prop_dynamic instead}}
{{important|Glass material should have dynamic expressions configured, otherwise there would be no break pieces.}}
{{important|Glass material should have dynamic expressions configured, otherwise there would be no break pieces.}}
example model can be found in {{path|Counter-Strike Global Offensive\content\csgo\workshop\content_examples\breakable_glass\breakable_glass_01|vmdl}}


[[File:Cs2 br glass mdoc hierarchy.png|thumb|right|250|model doc outliner setup for breakable glass]]
[[File:Cs2 br glass mdoc hierarchy.png|thumb|right|250|model doc outliner setup for breakable glass]]
== Creating base window model ==
{{tip|it is not needed to have custom model file since primitive shapes are created inside of ModelDoc"}}
* add [[RenderMeshFile]] to outliner, cancel the file selection and keep the created note, It should appear as empty node, change [[RenderMeshFile]] Name to something like "window"
; [[RenderMeshFile]]
:Name: window
:Source file: <none>


== Creating base window model ==
todo
== Adding Break pieces to model ==
== Adding Break pieces to model ==
todo
todo
== Creating custom glass material ==
== Creating custom glass material ==
todo
todo

Revision as of 22:20, 2 October 2024

Todo: polish it out, add information.
Note.pngNote:This tutorial assumes a basic familiarity with ModelDoc Editor.
Icon-Bug.pngBug:func_breakable does not spawn gibs on break in Counter-Strike 2 Counter-Strike 2. It's recommended to use prop_dynamic instead  [todo tested in ?]
Icon-Important.pngImportant:Glass material should have dynamic expressions configured, otherwise there would be no break pieces.

example model can be found in 🖿Counter-Strike Global Offensive\content\csgo\workshop\content_examples\breakable_glass\breakable_glass_01.vmdl

model doc outliner setup for breakable glass

Creating base window model

Tip.pngTip:it is not needed to have custom model file since primitive shapes are created inside of ModelDoc"
  • add RenderMeshFile to outliner, cancel the file selection and keep the created note, It should appear as empty node, change RenderMeshFile Name to something like "window"
RenderMeshFile
Name: window
Source file: <none>

Adding Break pieces to model

todo

Creating custom glass material

todo