thehankinator Posted November 28, 2016 Posted November 28, 2016 How can I make a material that is visible in the editor but not when the game is running? For use specifically for invisible triggers. I could change the material via a script but it would be nice if I could create a special material that did all that for me. I'm thinking of something similar to how it looks in Source engine 1 Quote
Rick Posted November 28, 2016 Posted November 28, 2016 Draw a csg and change it's material to invisible (or I think there is a pink one (search in the Materials folder) that when applied doesn't show up in the game but does in the editor). To get the functionality of a trigger you'll still need to add a script and change the collision to trigger on the csg. Quote
macklebee Posted November 28, 2016 Posted November 28, 2016 The inherent caulk material located in the Materials/Developer folder provides this function. I changed the blend mode of the material to be able to see through it within the Editor. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel
reepblue Posted November 28, 2016 Posted November 28, 2016 I made something a while back, but when you use it with probes, the reflection of the trigger brushes get baked within it's reflection. Josh said (a while back, mind you) he was gonna look into a "show in-game" option in which unlike "Hidden", would only have the entities Draw function skipped. 2 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
Einlander Posted November 30, 2016 Posted November 30, 2016 Make a material with the 'transparent.shader' Then use this code: function Script:Start() if not DEBUG then local material = Material:Create() material:SetBlendMode(5)--Blend.Invisible self.entity:SetMaterial(material) material:Release() end end This will make whatever the object is invisible at runtime (F6), but visible when debugging (f5) or in the editor. Quote
reepblue Posted November 30, 2016 Posted November 30, 2016 Yes, but if a trigger brush will get seen by the probe cameras and the reflection will have your trigger brush in the cubemap! Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
macklebee Posted November 30, 2016 Posted November 30, 2016 Yes, but if a trigger brush will get seen by the probe cameras and the reflection will have your trigger brush in the cubemap! Yes, if you are using probes, you will need to hide the triggers in the editor prior to performing the GI option. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel
thehankinator Posted November 30, 2016 Author Posted November 30, 2016 I am not using probes so this should work great, thanks guys! 1 Quote
reepblue Posted November 30, 2016 Posted November 30, 2016 Yes, if you are using probes, you will need to hide the triggers in the editor prior to performing the GI option. That's how I did it in the Vectronic Demo, it was kind of a pain tho. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
DooMAGE Posted November 30, 2016 Posted November 30, 2016 Uhh, so it's a good idea hide my invisible triggers before building the GI? This can cause performance issues later? Quote My Leadwerks games! https://ragingmages.itch.io/
thehankinator Posted December 1, 2016 Author Posted December 1, 2016 I think if you are using the vanilla invisible material you should be fine. Quote
Josh Posted December 13, 2016 Posted December 13, 2016 There's a new blend mode for this in the material editor. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
reepblue Posted December 13, 2016 Posted December 13, 2016 Here is a trigger material. Seems the blend mode only works if Z-Sort is on. (Intentional?) Edit: Added transparency! triggermat2.zip Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
thehankinator Posted December 22, 2016 Author Posted December 22, 2016 Here is a trigger material. Seems the blend mode only works if Z-Sort is on. (Intentional?) Edit: Added transparency! This looks and works great! Should be included with LE imo. Quote
reepblue Posted December 22, 2016 Posted December 22, 2016 This looks and works great! Should be included with LE imo. Not mine, but in 4.2, there is a default trigger material. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.