Create "Scope Shader " with Flow Graph!

#1
Hi
Currently, it's very difficult to create a shader in the cryengine .
(there is no Shader node.)
This Shader Scope has been destroyed for a long time and there is no solution to it.
I do not have a solution for Shader Scope, reflection.

But inside, Scope with Flow Graph can do something!
But it's not synchronous with zooming
for example:
When you zoom into weapons,
4 times fast right click.
Image

Code: Select all

<Graph Description="" Group=""> <Nodes> <Node Id="49" Class="Game:Start" pos="-414,234,0"> <Inputs InGame="1" InEditor="1"/> </Node> <Node Id="50" Class="Image:ScreenFader" pos="252,468,0"> <Inputs FadeGroup="0" UseCurColor="1" FadeInTime="0" FadeOutTime="0" color_FadeColor="0,0,0" tex_TextureName="objects/weapons/attachments/sniper/textures/sniper_scope_a_crosshair_diff.dds" UpdateAlways="0"/> </Node> <Node Id="54" Class="Game:WeaponSensor" pos="-234,216,0"> <Inputs entityId="0"/> </Node> <Node Id="56" Class="Actor:LocalPlayer" pos="-414,180,0"> <Inputs /> </Node> <Node Id="63" Class="String:Compare" pos="54,504,0"> <Inputs A="" B="sniper" IgnoreCase="1"/> </Node> <Node Id="68" Class="Math:BooleanFrom" pos="54,414,0"> <Inputs Value="0"/> </Node> </Nodes> <Edges> <Edge nodeIn="54" nodeOut="49" portIn="Enable" portOut="output" enabled="1"/> <Edge nodeIn="54" nodeOut="49" portIn="Get" portOut="output" enabled="1"/> <Edge nodeIn="63" nodeOut="54" portIn="A" portOut="ZoomName" enabled="1"/> <Edge nodeIn="68" nodeOut="54" portIn="Value" portOut="Zoomed" enabled="1"/> <Edge nodeIn="54" nodeOut="56" portIn="entityId" portOut="entityId" enabled="1"/> <Edge nodeIn="50" nodeOut="63" portIn="FadeOut" portOut="True" enabled="1"/> <Edge nodeIn="50" nodeOut="68" portIn="FadeIn" portOut="False" enabled="1"/> <Edge nodeIn="63" nodeOut="68" portIn="Compare" portOut="True" enabled="1"/> </Edges> </Graph>
Image

Re: Create "Scope Shader " with Flow Graph!

#2
Nice one! :)


Try this one:
Image

Code: Select all

<Graph Description="" Group="asd">
<Nodes>
<Node Id="87" Class="Debug:InputKey" pos="594,3456,0">
<Inputs entityId="0" Key="mouse2" NonDevMode="0"/>
</Node>
<Node Id="93" Class="Weapon:AccessoryCheck" pos="864,3600,0">
<Inputs entityId="0" Accessory="SniperScope"/>
</Node>
<Node Id="95" Class="Actor:LocalPlayer" pos="864,3564,0">
<Inputs />
</Node>
<Node Id="97" Class="Image:ScreenFader" pos="1872,3456,0">
<Inputs FadeGroup="0" UseCurColor="1" FadeInTime="0" FadeOutTime="0" color_FadeColor="0,0,0" tex_TextureName="objects/weapons/attachments/sniper/textures/sniper_scope_a_crosshair_diff.dds" UpdateAlways="0"/>
</Node>
<Node Id="99" Class="Logic:Gate" pos="1134,3474,0">
<Inputs Closed="0"/>
</Node>
<Node Id="101" Class="Logic:Any" pos="864,3474,0" InHideMask="1021" OutHideMask="1">
<Inputs />
</Node>
<Node Id="103" Class="Logic:Sequentializer" pos="1332,3474,0">
<Inputs Closed="0" Reverse="0"/>
</Node>
<Node Id="105" Class="Time:Delay" pos="1602,3438,0">
<Inputs delay="0.2" resetOnInput="0"/>
</Node>
<Node Id="107" Class="Time:Delay" pos="1602,3510,0">
<Inputs delay="0.3" resetOnInput="0"/>
</Node>
</Nodes>
<Edges>
<Edge nodeIn="93" nodeOut="87" portIn="Check" portOut="Pressed" enabled="1"/>
<Edge nodeIn="101" nodeOut="87" portIn="in1" portOut="Pressed" enabled="1"/>
<Edge nodeIn="101" nodeOut="87" portIn="in2" portOut="Released" enabled="1"/>
<Edge nodeIn="99" nodeOut="93" portIn="Close" portOut="False" enabled="1"/>
<Edge nodeIn="99" nodeOut="93" portIn="Open" portOut="True" enabled="1"/>
<Edge nodeIn="93" nodeOut="95" portIn="entityId" portOut="entityId" enabled="1"/>
<Edge nodeIn="103" nodeOut="99" portIn="In" portOut="Out" enabled="1"/>
<Edge nodeIn="99" nodeOut="101" portIn="In" portOut="out" enabled="1"/>
<Edge nodeIn="105" nodeOut="103" portIn="in" portOut="Out2" enabled="1"/>
<Edge nodeIn="107" nodeOut="103" portIn="in" portOut="Out1" enabled="1"/>
<Edge nodeIn="97" nodeOut="105" portIn="FadeIn" portOut="out" enabled="1"/>
<Edge nodeIn="97" nodeOut="107" portIn="FadeOut" portOut="out" enabled="1"/>
</Edges>
</Graph>

Re: Create "Scope Shader " with Flow Graph!

#3
Nice one! :)


Try this one:
Hi
Your source sample. It's fine, but it still has the same problem.
I think the problem is not solvable.
Problem: Right click, press and release several times (Quickly)

I did it, that's just the problem.

Code: Select all

<Graph Description="" Group=""> <Nodes> <Node Id="49" Class="Game:Start" pos="-378,216,0"> <Inputs InGame="1" InEditor="1"/> </Node> <Node Id="50" Class="Image:ScreenFader" pos="252,252,0"> <Inputs FadeGroup="0" UseCurColor="1" FadeInTime="0" FadeOutTime="0" color_FadeColor="1,1,1" tex_TextureName="objects/weapons/attachments/sniper/textures/sniper_scope_a_crosshair_diff.dds" UpdateAlways="0"/> </Node> <Node Id="54" Class="Game:WeaponSensor" pos="-198,198,0"> <Inputs entityId="0"/> </Node> <Node Id="56" Class="Actor:LocalPlayer" pos="-378,162,0"> <Inputs /> </Node> <Node Id="63" Class="String:Compare" pos="72,468,0"> <Inputs A="" B="sniper" IgnoreCase="1"/> </Node> <Node Id="68" Class="Math:BooleanFrom" pos="72,396,0"> <Inputs Value="0"/> </Node> <Node Id="78" Class="Debug:InputKey" pos="-198,72,0"> <Inputs entityId="0" Key="mouse2" NonDevMode="0"/> </Node> <Node Id="88" Class="Time:Delay" pos="72,108,0"> <Inputs delay="0.2" resetOnInput="0"/> </Node> </Nodes> <Edges> <Edge nodeIn="54" nodeOut="49" portIn="Enable" portOut="output" enabled="1"/> <Edge nodeIn="54" nodeOut="49" portIn="Get" portOut="output" enabled="1"/> <Edge nodeIn="63" nodeOut="54" portIn="A" portOut="ZoomName" enabled="1"/> <Edge nodeIn="68" nodeOut="54" portIn="Value" portOut="Zoomed" enabled="1"/> <Edge nodeIn="54" nodeOut="56" portIn="entityId" portOut="entityId" enabled="1"/> <Edge nodeIn="50" nodeOut="63" portIn="FadeOut" portOut="True" enabled="1"/> <Edge nodeIn="63" nodeOut="68" portIn="Compare" portOut="True" enabled="1"/> <Edge nodeIn="88" nodeOut="78" portIn="in" portOut="Released" enabled="1"/> <Edge nodeIn="50" nodeOut="88" portIn="FadeIn" portOut="out" enabled="1"/> </Edges> </Graph>
Attachments
sh3.jpg
sh3.jpg (104.68 KiB) Viewed 1084 times

Re: Create "Scope Shader " with Flow Graph!

#4
Everything is solvable :D
Below the solution, enjoy :)

FG

Code: Select all

<Graph Description="" Group="asd">
<Nodes>
<Node Id="87" Class="Debug:InputKey" pos="-108,-72,0">
<Inputs entityId="0" Key="mouse2" NonDevMode="0"/>
</Node>
<Node Id="93" Class="Weapon:AccessoryCheck" pos="162,72,0">
<Inputs entityId="0" Accessory="SniperScope"/>
</Node>
<Node Id="95" Class="Actor:LocalPlayer" pos="162,36,0">
<Inputs />
</Node>
<Node Id="99" Class="Logic:Gate" pos="432,-54,0">
<Inputs Closed="0"/>
</Node>
<Node Id="101" Class="Logic:Any" pos="162,-54,0" InHideMask="1021" OutHideMask="1">
<Inputs />
</Node>
<Node Id="129" Class="Image:ScreenFader" pos="1566,0,0">
<Inputs FadeGroup="0" UseCurColor="1" FadeInTime="0" FadeOutTime="0" color_FadeColor="0,0,0" tex_TextureName="objects/weapons/attachments/sniper/textures/sniper_scope_a_crosshair_diff.dds" UpdateAlways="0"/>
</Node>
<Node Id="130" Class="Logic:Sequentializer" pos="738,-54,0">
<Inputs Closed="0" Reverse="0"/>
</Node>
<Node Id="131" Class="Time:Delay" pos="1062,18,0">
<Inputs delay="0.2" resetOnInput="0"/>
</Node>
<Node Id="132" Class="Time:Delay" pos="1062,-54,0">
<Inputs delay="0.3" resetOnInput="1"/>
</Node>
<Node Id="133" Class="Logic:Gate" pos="1296,198,0">
<Inputs Closed="0"/>
</Node>
</Nodes>
<Edges>
<Edge nodeIn="93" nodeOut="87" portIn="Check" portOut="Pressed" enabled="1"/>
<Edge nodeIn="101" nodeOut="87" portIn="in1" portOut="Pressed" enabled="1"/>
<Edge nodeIn="101" nodeOut="87" portIn="in2" portOut="Released" enabled="1"/>
<Edge nodeIn="99" nodeOut="93" portIn="Close" portOut="False" enabled="1"/>
<Edge nodeIn="99" nodeOut="93" portIn="Open" portOut="True" enabled="1"/>
<Edge nodeIn="93" nodeOut="95" portIn="entityId" portOut="entityId" enabled="1"/>
<Edge nodeIn="130" nodeOut="99" portIn="In" portOut="Out" enabled="1"/>
<Edge nodeIn="99" nodeOut="101" portIn="In" portOut="out" enabled="1"/>
<Edge nodeIn="131" nodeOut="130" portIn="in" portOut="Out2" enabled="1"/>
<Edge nodeIn="132" nodeOut="130" portIn="in" portOut="Out1" enabled="1"/>
<Edge nodeIn="133" nodeOut="130" portIn="Open" portOut="Out1" enabled="1"/>
<Edge nodeIn="133" nodeOut="130" portIn="Close" portOut="Out2" enabled="1"/>
<Edge nodeIn="129" nodeOut="131" portIn="FadeIn" portOut="out" enabled="1"/>
<Edge nodeIn="133" nodeOut="132" portIn="In" portOut="out" enabled="1"/>
<Edge nodeIn="129" nodeOut="133" portIn="FadeOut" portOut="Out" enabled="1"/>
</Edges>
</Graph>
Test FG:

Code: Select all

<Graph Description="" Group="asd">
<Nodes>
<Node Id="116" Class="Image:ScreenFader" pos="1170,666,0">
<Inputs FadeGroup="0" UseCurColor="1" FadeInTime="0" FadeOutTime="0" color_FadeColor="0,0,0" tex_TextureName="objects/weapons/attachments/sniper/textures/sniper_scope_a_crosshair_diff.dds" UpdateAlways="0"/>
</Node>
<Node Id="117" Class="Logic:Sequentializer" pos="342,612,0">
<Inputs Closed="0" Reverse="0"/>
</Node>
<Node Id="118" Class="Time:Delay" pos="666,684,0">
<Inputs delay="0.2" resetOnInput="0"/>
</Node>
<Node Id="119" Class="Time:Delay" pos="666,612,0">
<Inputs delay="0.3" resetOnInput="1"/>
</Node>
<Node Id="120" Class="Debug:InputKey" pos="-126,594,0">
<Inputs entityId="0" Key="mouse2" NonDevMode="0"/>
</Node>
<Node Id="122" Class="Logic:Any" pos="144,612,0">
<Inputs />
</Node>
<Node Id="128" Class="Logic:Gate" pos="900,864,0">
<Inputs Closed="0"/>
</Node>
</Nodes>
<Edges>
<Edge nodeIn="118" nodeOut="117" portIn="in" portOut="Out2" enabled="1"/>
<Edge nodeIn="119" nodeOut="117" portIn="in" portOut="Out1" enabled="1"/>
<Edge nodeIn="128" nodeOut="117" portIn="Open" portOut="Out1" enabled="1"/>
<Edge nodeIn="128" nodeOut="117" portIn="Close" portOut="Out2" enabled="1"/>
<Edge nodeIn="116" nodeOut="118" portIn="FadeIn" portOut="out" enabled="1"/>
<Edge nodeIn="128" nodeOut="119" portIn="In" portOut="out" enabled="1"/>
<Edge nodeIn="122" nodeOut="120" portIn="in1" portOut="Pressed" enabled="1"/>
<Edge nodeIn="122" nodeOut="120" portIn="in2" portOut="Released" enabled="1"/>
<Edge nodeIn="117" nodeOut="122" portIn="In" portOut="out" enabled="1"/>
<Edge nodeIn="116" nodeOut="128" portIn="FadeOut" portOut="Out" enabled="1"/>
</Edges>
</Graph>

Re: Create "Scope Shader " with Flow Graph!

#5
Everything is solvable :D
Below the solution, enjoy :)

Test FG:

Code: Select all

<Graph Description="" Group="asd">
<Nodes>
<Node Id="116" Class="Image:ScreenFader" pos="1170,666,0">
<Inputs FadeGroup="0" UseCurColor="1" FadeInTime="0" FadeOutTime="0" color_FadeColor="0,0,0" tex_TextureName="objects/weapons/attachments/sniper/textures/sniper_scope_a_crosshair_diff.dds" UpdateAlways="0"/>
</Node>
<Node Id="117" Class="Logic:Sequentializer" pos="342,612,0">
<Inputs Closed="0" Reverse="0"/>
</Node>
<Node Id="118" Class="Time:Delay" pos="666,684,0">
<Inputs delay="0.2" resetOnInput="0"/>
</Node>
<Node Id="119" Class="Time:Delay" pos="666,612,0">
<Inputs delay="0.3" resetOnInput="1"/>
</Node>
<Node Id="120" Class="Debug:InputKey" pos="-126,594,0">
<Inputs entityId="0" Key="mouse2" NonDevMode="0"/>
</Node>
<Node Id="122" Class="Logic:Any" pos="144,612,0">
<Inputs />
</Node>
<Node Id="128" Class="Logic:Gate" pos="900,864,0">
<Inputs Closed="0"/>
</Node>
</Nodes>
<Edges>
<Edge nodeIn="118" nodeOut="117" portIn="in" portOut="Out2" enabled="1"/>
<Edge nodeIn="119" nodeOut="117" portIn="in" portOut="Out1" enabled="1"/>
<Edge nodeIn="128" nodeOut="117" portIn="Open" portOut="Out1" enabled="1"/>
<Edge nodeIn="128" nodeOut="117" portIn="Close" portOut="Out2" enabled="1"/>
<Edge nodeIn="116" nodeOut="118" portIn="FadeIn" portOut="out" enabled="1"/>
<Edge nodeIn="128" nodeOut="119" portIn="In" portOut="out" enabled="1"/>
<Edge nodeIn="122" nodeOut="120" portIn="in1" portOut="Pressed" enabled="1"/>
<Edge nodeIn="122" nodeOut="120" portIn="in2" portOut="Released" enabled="1"/>
<Edge nodeIn="117" nodeOut="122" portIn="In" portOut="out" enabled="1"/>
<Edge nodeIn="116" nodeOut="128" portIn="FadeOut" portOut="Out" enabled="1"/>
</Edges>
</Graph>
that's good. :D
But there is still a small problem. :(
Zoom on any weapon! :?
I just want to show up on the "Rifle" weapon. And also the name of the zoom is "sniper". :geek:

Who is online

Users browsing this forum: No registered users and 0 guests

cron