FighterCNash
Member
SALLY I LOVE YOU THANKS FOR LET ME KNOW!!!! I WILL DOWNLOAD AND TEST IT NOW!
Something I found. I have a scene with 6 AVSLAVE plugins. When I change texture on 1, sometimes texture is removed from another.@MonsterShinkai @SPQR @FighterCNash @C&G-STUDIO
Releasing SallySoundFX 2 quietly for now on my (free and public) Patreon.
Just in case I F'ed up something I will wait before I upload this to the Hub.
This will hopefully be the foundation for many cool Visualizations.
SallySoundFX 2.00 Release
I've tested long enough. Only visual bugs remain and performance is good. Everything "should" work.
Feedback welcome of course! And please be critical! I can take it.
Hope this does not disappoint people because it still looks 'basic'. The potential of all the crazy stuff you can do with this counts. If I would have VR hardware I'd try to make a beat saber Plugin ... that's complicated, but possible. However it would never be 100% the same, since whatever object you spawn to slash is generated from a 'live' signal. Just some thoughts ...
Todo-list: more visualizations *doh*, custom shaders, reflective materials, learn about advanced mesh rendering for even more performance
This was the first "working" version a few days ago. Later I found out it leaked memory like crazy. (fixed now ofc)
Yep, that is not suppose to happen. Fortunately easy to reproduce. If the "Load Texture"-Button gets a new valid Texture back from the VaM-Filebrowser I destroy the previous one in an attempt to keep memory clean. I expected it it be instanced from the other Plugins and so I was very aggressive about keeping memory free.Something I found. I have a scene with 6 AVSLAVE plugins. When I change texture on 1, sometimes texture is removed from another.
That should be no problem to add. Was thinking about a drop-down menu similar to the Color Logic.One thing that came to mind, it would be nice if each tile was scalable.
That's probably something to look into when I investigate Shaders and Materials more. Currently the Visualizations use the "Sprites/Default" Shader. Unlike other typical VaM Materials the main reason to use this one is - it uses Vertex-Colors. So each geometry point has a color assigned. It is always 'unlit' - no shadows. And it's faster to render compared to the "Standard" Shader where colors come from the the material-color. Vertex-Colors are nice for Visualizations because the color "fine control" for each point.And also if opacity was able to be controlled.
Hmm that reminds me, I think the VaM integrated RythymTool does something similar when a audio file is loaded.I thought of that beat saber thing too and if it helps i think the easiest way to do it is to have a 'learn song' functionality. The user would just let the song play once, you record the data in a json and then it would be used in the game, like at 0:30s in the song you would start popping in atoms based on the data for 0:25s or something like that
Yep, that is not suppose to happen. Fortunately easy to reproduce. If the "Load Texture"-Button gets a new valid Texture back from the VaM-Filebrowser I destroy the previous one in an attempt to keep memory clean. I expected it it be instanced from the other Plugins and so I was very aggressive about keeping memory free.
Concerning what you (MonsterShinkai) wrote on Discord DM
That should be no problem to add. Was thinking about a drop-down menu similar to the Color Logic.
From there you can pick from various "Geometry Logic" behaviors. Scaling the tiles would then be one of them.
That's probably something to look into when I investigate Shaders and Materials more. Currently the Visualizations use the "Sprites/Default" Shader. Unlike other typical VaM Materials the main reason to use this one is - it uses Vertex-Colors. So each geometry point has a color assigned. It is always 'unlit' - no shadows. And it's faster to render compared to the "Standard" Shader where colors come from the the material-color. Vertex-Colors are nice for Visualizations because the color "fine control" for each point.
What would happen if I changed the Shader to "Standard"?
It would need light to become visible, it would have shadows, but no color (or material color only).
The Visualizations really need a good custom Shader.
That would open up the floodgates for all kind of new customization options.
I've experimented with a simple custom one that I created with a Shader Editor named Amplify. At one point I had a version where I loaded this one ...
View attachment 155574
... from an AssetBundle. It worked, but to be honest I absolutely hate AssetBundles. I removed that code part again. I get why they are useful for game-development, but I just find the workflow to create them super annoying, they add so many additional potential points of failure and they are more or less black box once packed. If I can avoid them I will avoid them. Not sure whether that will be possible with Shaders to load them "directly" into VaM.
Hmm that reminds me, I think the VaM integrated RythymTool does something similar when a audio file is loaded.
Could try to "steal" the required data from that one too. I think that should be 100% the same data every time it loads - as long as the audio file is the same.
Meanwhile more experiments ... back to cave now.
Demo Scene in separate Upload to keep dependency small.
Initial Version 2 VaM Hub Upload so users can build scenes from it and have the required dependency on VaM Hub.
Fixed some bugs. Don't worry, I will add new ones .
Changes Version 2.01
- Replaced non square textures with ones that contain an Alpha Channel for transparency testing. Note that these Alpha Channel are more like a transparency masks, either 1 or 0. Custom Textures with values in between can behave different...
[Obsolete("Creating materials from shader source string will be removed in the future. Use Shader assets instead.")]
public static Material Create(string scriptContents)
{
return new Material(scriptContents);
}
public static readonly string SSFXShader = @"Shader ""SSFX""
{
Properties
{
_MainTex(""MainTex"", 2D) = ""white"" {}
_Smoothness(""Smoothness"", Float) = 1
_EmissionMultiply(""EmissionMultiply"", Range( 0 , 4)) = 1
_Metallic(""Metallic"", Float) = 1
[HideInInspector] _texcoord( """", 2D ) = ""white"" {}
[HideInInspector] __dirty( """", Int ) = 1
}
SubShader
{
Tags{ ""RenderType"" = ""Opaque"" ""Queue"" = ""Geometry+0"" ""IsEmissive"" = ""true"" }
Cull Back
CGPROGRAM
#pragma target 3.0
#pragma surface surf Standard keepalpha noshadow exclude_path:deferred
struct Input
{
float2 uv_texcoord;
float4 vertexColor : COLOR;
};
uniform sampler2D _MainTex;
uniform float4 _MainTex_ST;
uniform float _EmissionMultiply;
uniform float _Metallic;
uniform float _Smoothness;
void surf(Input i, inout SurfaceOutputStandard o )
{
float2 uv_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw;
float4 tex2DNode3 = tex2D(_MainTex, uv_MainTex);
o.Albedo = tex2DNode3.rgb;
o.Emission = (tex2DNode3 * i.vertexColor * _EmissionMultiply).rgb;
o.Metallic = _Metallic;
o.Smoothness = _Smoothness;
o.Alpha = 1;
}
ENDCG
}
Fallback ""Sprites/Default""
CustomEditor ""ASEMaterialInspector""
}";
material = Material.Create(AVSlave.SSFXShader);
AudioListener.GetSpectrumData(samplesUnity, 0, FFTWindow.Blackman);
Thank you for your reply.
I'll study the Sonic Stage a lot.
Too bad. Your plugin is 1000% better than VaM's volume action. Thanks for the quick response.@CheersMate
The Unity Engine only provides the GetSpectrumData() function for the "master channel". That's all Audio Sources mixed together. I would need that function for a specific AudioSource to isolate the signal from all other sources.
Triggering from a relatively quiet source works if it's the only source. But it's kinda sketchy. Maybe you'd have to disable Auto-amplification and crank that up very high.
This reminds me of the situation in real life - when you put a headphone plug into a "line out" instead of "headphone out" - the signal on a "line out" has no amplifier and comes out very quiet - the amplifier is needed - it's works, but is not ideal.
If you need a simple separated signal from various AudioSources (assuming you have for example loud music playing on another source) it may be better to use the standard VAM "Volume Action". The volume signal coming from there is tied to what's currently playing on that AudioSource. I guess that uses the in VAM implemented RhythmTool, but I'm not sure how that works.
Thank you for clearing that up. I can just put in the embedded VAM music and the scene will still work. Also thank you for your help and the advice. Ill have to go check the SSFX demo out.@Jimi T
Yes including copyrighted music with a scene is a legal problem.
Pretty sure many scenes here are not legal with their included music. Guess everybody is just 'looking away'.
All the web-related Atoms do play audio with the VAM embedded browser.
Note how the Windows Volume Mixer it has an extra Volume control for that browser. It's played in a different way.
Some scene creators include instructions to download a song from YT - with renaming & moving it to the correct VAM folder.
*meh* - that's annoying and just put's the legal problem into the users hands and everybody has to do extra work to make a scene work.
I'd try to find CC0 or CC BY licensed music and include the file. It's more reliable.
Personally I think streaming is bad:
-Users may not give permission to access web for security reasons
-VAM does not 'react' to audio from embedded browser
-Link could die after some time -> breaks scene
-Potential bad latency/connection if hosted on a server far away
-Embedded browser is picky with the audio format and isn't very reliable (browser crashes and streams randomly stop)
The SSFX demo scene uses classic music where the copyright has expired. It's public domain.
Vinheteiro on YT inspired me to use this.
Obviously it's 'difficult' to find a RAP song from 1855.
Older music is just something to keep in mind when looking for usable music.
!> Compile of Sally.SallySoundFX.4:/Custom/Scripts/Sally/SallySoundFX/SallySoundFX.cslist failed. Exception: System.Exception: Path MacGruber.LogicBricks.12:\Custom\Scripts\MacGruber\LogicBricks\Internal\MacGruber_Utils.cs not found
at MVR.FileManagement.FileManager.ReadAllText (System.String path, Boolean restrictPath) [0x00000] in <filename unknown>:0
at MVRPluginManager.SyncPluginUrlInternal (.MVRPlugin mvrp, Boolean isFromConfirmDenyResponse) [0x00000] in <filename unknown>:0
Yes, some .cslist -files are hardcoded to reference LogicBricks.12.I have MacGruber.LogicBricks.14 installed. I guess you hardcoded a dependency on version 12?