Counter-Strike 2 Workshop Tools/BreakableWindows: Difference between revisions
Jump to navigation
Jump to search
Note:This tutorial assumes a basic familiarity with ModelDoc Editor.
Bug:func_breakable does not spawn gibs on break in
Counter-Strike 2. It's recommended to use prop_dynamic instead [todo tested in ?]
Important:Glass material should have dynamic expressions configured, otherwise there would be no break pieces.
Tip:it is not needed to have custom model file since primitive shapes are created inside of ModelDoc
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{toc-right}} | {{toc-right}} | ||
{{note|This tutorial assumes a basic familiarity with [[ModelDoc Editor]].}} | {{note|This tutorial assumes a basic familiarity with [[ModelDoc Editor]].}} | ||
{{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}} | ||
Line 8: | Line 7: | ||
[[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 == | == Creating base window model == | ||
{{tip|it is not needed to have custom model file since primitive shapes are created inside of ModelDoc | {{todo| unscrew that and make it more readable and consistent}} | ||
{{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" | * 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: | |||
{{Quote|; | |||
:Name: window | :Name: window | ||
:Source file: <none> | :Source file: <none>}} | ||
* add [[Mesh Operation Stack]] as parent of [[RenderMeshFile]] | |||
* add [[Box Primitive]] as child of [[Mesh Operation Stack]] , set desired `Box dimensions` (x-thickness,y-width,z-height), but keep `Position` at [0,0,0], for this example, use "workshop/content_examples/breakable_glass/breakable_glass_01.vmat" material | |||
* add [[UV map planar custom]] stretch it so only single part of window texture fills model (note: you need to unselect this node and compile to preview how uv will look) | |||
== Adding Break pieces to model == | == Adding Break pieces to model == |
Revision as of 22:47, 2 October 2024




example model can be found in Counter-Strike Global Offensive\content\csgo\workshop\content_examples\breakable_glass\breakable_glass_01.vmdl
Creating base window model
Todo: unscrew that and make it more readable and consistent

- 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>
- add Mesh Operation Stack as parent of RenderMeshFile
- add Box Primitive as child of Mesh Operation Stack , set desired `Box dimensions` (x-thickness,y-width,z-height), but keep `Position` at [0,0,0], for this example, use "workshop/content_examples/breakable_glass/breakable_glass_01.vmat" material
- add UV map planar custom stretch it so only single part of window texture fills model (note: you need to unselect this node and compile to preview how uv will look)
Adding Break pieces to model
todo
Creating custom glass material
todo