Skip to content

Instantly share code, notes, and snippets.

View ashe23's full-sized avatar

Ashot Barkhudaryan ashe23

  • 20:29 (UTC +04:00)
View GitHub Profile
@ashe23
ashe23 / gif_maker.txt
Created June 15, 2023 10:36
creating gif with trasparent background
# ffmpeg -y -framerate 30 -i Test.FinalImage.%04d.png -vf palettegen palette.png
# ffmpeg -y -framerate 30 -i Test.FinalImage.%04d.png -i palette.png -lavfi paletteuse=alpha_threshold=128 -gifflags -offsetting output.gif
@ashe23
ashe23 / .gitignore
Created April 11, 2022 11:30
unreal engine gitignore
# Visual Studio
.vs/
# Rider
.idea/
Plugins/Developer/RiderLink/*
# Executable and Libraries
*.slo
*.lo
@ashe23
ashe23 / imgs_to_video.py
Created December 3, 2021 13:10
Create video from images [Updated]
# run methods
# py img_to_video.py --input inputdir --output outputdir --img_format fmt
# default input dir - current dir
# default output dir - current_dir/output
# default img_format - png
import os
import os.path
import glob
import argparse
@ashe23
ashe23 / customtestplugin.build.cs
Created February 18, 2020 11:39
Adding to Menu Entries in UE4 editor
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
public class CustomTestPlugin : ModuleRules
{
public CustomTestPlugin(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
@ashe23
ashe23 / test.cpp
Created May 8, 2019 11:34
Getting all morph targets from skeletal mesh ue4 C++
USkeletalMeshComponent* mesh = GetMesh();
USkeletalMesh * skelMesh = mesh->SkeletalMesh;
TMap< FName, int32 > myMap = skelMesh->MorphTargetIndexMap;
for (TPair< FName, int32> Entry : myMap) {
Morphs.Add(Entry.Key.ToString());
}
@ashe23
ashe23 / gist:ec404f4120e62067a595d37804659fbc
Last active January 6, 2026 12:10
In Game ScreenShootMaker Unreal Engine
// Fill out your copyright notice in the Description page of Project Settings.
#include "ScreenShootMaker.h"
#include "ImageUtils.h"
#include "Misc/FileHelper.h"
#include "Runtime/Engine/Classes/Engine/World.h"
#include "HighResScreenshot.h"
#include "Runtime/Engine/Classes/Engine/Engine.h"
#include "Runtime/Engine/Classes/Engine/GameViewportClient.h"
#include "Runtime/Engine/Public/Slate/SceneViewport.h"
@ashe23
ashe23 / AudioActor.cpp
Created May 16, 2018 09:05
Audio Decode in UE4
// Fill out your copyright notice in the Description page of Project Settings.
#include <AudioActor.h>
#include <Sound/SoundWave.h>
#include <Sound/SoundCue.h>
#include <ConstructorHelpers.h>
#include <WaveFileManager.h>
#include <Runtime/Engine/Classes/Components/AudioComponent.h>
#include <Runtime/Engine/Public/AudioDecompress.h>
#include <Engine.h>
@ashe23
ashe23 / gist:645c631c1cf8d315d9f84424878e21ef
Last active March 6, 2018 12:26
ffmpeg video streaming
#include <stdio.h>
#define __STDC_CONSTANT_MACROS
#ifdef _WIN32
//Windows
extern "C"
{
#include "libavformat/avformat.h"
#include "libavutil/mathematics.h"
@ashe23
ashe23 / CMakeLists.txt
Last active December 23, 2016 17:40
Google Test with cmake
cmake_minimum_required(VERSION 3.6)
project(sandbox)
add_subdirectory(googletest-master)
include_directories(googletest-master/googletest/include)
include_directories(googletest-master/googlemock/include)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp SimpleTest.cpp)
add_executable(sandbox ${SOURCE_FILES})