Giter VIP home page Giter VIP logo

effekseerforcocos2d-x's Introduction

Effekseer

Effekseer

This software is a particle effect editing tool. By incorporating runtimes and plug-ins, effects created in Effekseer can be played back in your application. Effekseer is intended to be used primarily for games, allowing the designer, not the programmer, to be in charge of editing particle effects.

本ソフトウェアはパーティクルエフェクト編集ツールです。 ランタイムやプラグインを組み込むことで、Effekseerで作成されたエフェクトをアプリケーション中で再生できるようになります。 Effekseerは主にゲーム向けに使用することを想定しており、パーティクルエフェクトの編集をプログラマではなくデザイナーが担当できるようにします。

本軟件為粒子效果的編輯工具。 透過組合 runtime 和插件,由Effekseer制作而成的效果便可以在應用程式內播放。 Effekseer主要用作遊戲開發,不僅是程序員而且設計師也可進行粒子效果的編輯。

master branch is the development branch. Please don't use master branch for production.

Supported platforms

  • DirectX9, DirectX11, DirectX12, Metal, Vulkan, OpenGL
  • WebGL
  • Unity
  • GodotEngine
  • UnrealEngine
  • DX Library
  • Cocos2d-x
  • Console games (Please mail to effekseer(at)gmail.com)

Sponsors

Development

Repositories

Roadmap

English

日本語

Branch

Documents

HowToBuild

How to add a new language

Profiling

Design

CodeOverview

CodingRule

コーディングルール

For contributors

Please read issues. We always welcome pull requests for improvements, bug fixes, and so on.

issuesを読んでください。常時、機能追加、バグ修正といったプルリクエストを募集しております。

Issues

effekseerforcocos2d-x's People

Contributors

darreney avatar durswd avatar icarusli avatar kou-yeung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

effekseerforcocos2d-x's Issues

Does not work with cocos2d::ClippingNode

Build with:
macOS 13.6
Xcode 15.0.1
cocos2d-x v4
EffekseerForCocos2d-x latest (commit f8a286d)

Run on:
macOS 13.6

Testing code:

auto stencil = cocos2d::Sprite::create("mask.png");
auto clip = cocos2d::ClippingNode::create(stencil);

auto emitter = efk::EffectEmitter::create(efkManager);
auto effect = efk::Effect::create("effects/test.efkefc", 20);
assert(effect);
emitter->setEffect(effect);
emitter->setPlayOnEnter(true);

auto sprite = cocos2d::Sprite::create("mask.png");
clip->addChild(sprite);
clip->addChild(emitter);

addChild(clip);

Please see the first attached gif for result.

Meanwhile, EffekseerForGodot4 DOES work with clipping (the second gif). So the problem seems to be related to EffekseerForCocos2d-x rather than Effekseer.

1

2

Issue with color multiplication in cocos version

Hello, I am using Effekseer for Cocos in game production for mobile phones. Version 1.52g.
The issue is that effect looks very different in Effekseer Editor and in a game. I've attached an archive with test effect and to screenshots from the editor and from a game:
https://cloud.mail.ru/public/hvgv/5rZP3LAhX

There are following files in archive:
COLOR_POWER_FX_152.png - screenshot from the editor
COLOR_POWER_FX_COCOS.png - screenshot from the game
t007_color_power_01.efk - the effect binary file
SHD_color_power_01_01.efkmat - generated shader for the effect
T_glow_01.png - texture
t007_color_power_01.efkefc - some other effect binary

As you can see on the screenshots the result is very different.
In shader I am multiplying color with some value that much greater that 1.0f, so the output gl_FragColor becomes something like vec4(5.0, 2.0, 1.0, 1.0) - normally it is white, but in the editor it's bright yellow.

The main question is how to achieve the same effect visuals in the game? Maybe you are using HDR while rendering in the editor by default?

Difficult to update to the version 1.6x (v3)

createEffekSeerFiles_v3.py had deleted in this 1.6x version.
I can't update to 1.6 for my cocos2dx-v3 project,
There are a lot of files changed :(
19 files removed;40 files added;15 files rename; xxx files modified..

I'm trying to read the source code, but it's too much. Is there any outline or something?

tks!

Texture Ref error

EffekseerForCocos2d-x.cpp

void TextureLoader::Unload(Effekseer::TextureRef data)
{
if (data != NULL)
{
auto path = g_glTex2FilePath[data];
auto tex = g_filePath2CTex[path];

	if (tex->getReferenceCount() == **1**) /* should be 2  ,or none of data will be cleanup*/
	{
        CleanupTextureData(data);
		g_glTex2FilePath.erase(data);
		g_filePath2EffectData.erase(path);
		g_filePath2CTex.erase(path);
	}
	tex->release();
}

}

iOS crash on call to VertexBuffer::Unlock

Hi

I am experiencing a crash on

memcpy(target + m_vertexRingStart, m_resource, m_offset);

for iOS because previous call to GLExt::glMapBuffer is returning null.
Calling glGetError after that returns GL_INVAILD_OPERATION

The device I'm using is an iPhone 6 with iOS 10.3.2

If I avoid using buffer mapping (by forcing avoidIOS122 to true some lines above) everything seems to work fine

Infinite recursion if effect is played with an offset

If an effect is played starting on a frame different that 0 ManagerImplemented::Preupdate is called recursivelly infinitely
The issue is that the flag:

drawSet.IsPreupdated = true;

Should be set before the for loop
Otherwise the condition in

is always false and ManagerImplemented::Preupdate is called again

performance optimize


bool EffectManager::Initialize(cocos2d::Size visibleSize)
{
	int32_t spriteSize = 4000;

#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
	// large buffer make application slow on Android
	**spriteSize = 600;**
#endif
....

Android(Virtualbox)
not good performance when playing a lot of effect at same time , but if changed spriteSize to 50, have a nice fps.

a question abount the model

when i import the efkmodel file to the editor,i want to play the model's action, does the editor can support this?

EffectEmitter::setSpeed not working

Hi EffeckEmitter::setSpeed is not working anymore on master

I think this issue has something to do with this line being removed when void InstanceGroup::Update( float deltaFrame, bool shown ) was refactored on commit b81f121
Also I feel it has to do with this other because instances doesn't receive deltaFrame scaled by the speed of the emitter

Texture scroll issue

Hello, I have struggled issue while texture is scrolling in custom shader on android devices.
I have noticed, that time is used to scroll texture further and further, time is forwarded to shader with "predefined_uniform" in generated pixel shader. Also it is look like that time - is time since application started, not the same as livetime of a particle.
As a result, after a some time goes up, texture has huge pixel artifacts.

PS:
I have debugged method "shader_->SetConstantBuffer()", and even if this code:
https://gyazo.com/cd4ce187d75270ae07e13b3d5039d9b1 not executed(material is not custom), predefined_uniform is set with time in other way.

Scheduler Update method order

Hello.

In one frame, EffectEmitter Update method need to be called before EffectManager Update method. Otherwise, the Node property(position...) of the particle being rendered is last frame not current frame.

I think the Update method order should be indicated in the help document.

The video below is an example. The red picture is the particle(by EffectEmitter). The green picture is a Sprite. Both call RunAction at the same time.

wrong.mov

TransformVertexes SSE2 issue

Hi,
I think that i found bug in inline void TransformVertexes( Vertex* vertexes, int32_t count, const ::Effekseer::Matrix43& mat ) function in EFK_SSE2 section.
When i debugging my game with enabled Address Sanitizer under OS X with cocos2d-x effekseer, i'm getting following error:
================================================================= ==69543==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffeefbf9263 at pc 0x0001037887f3 bp 0x7ffeefbf8870 sp 0x7ffeefbf8868 READ of size 16 at 0x7ffeefbf9263 thread T0 #0 0x1037887f2 in EffekseerRendererGL::TransformVertexes(EffekseerRendererGL::Vertex*, int, Effekseer::Matrix43 const&) EffekseerRendererNative.cpp:849 #1 0x1037830cc in void EffekseerRenderer::SpriteRendererBase<EffekseerRendererGL::RendererImplemented, EffekseerRendererGL::Vertex, EffekseerRendererGL::VertexDistortion>::Rendering_Internal<EffekseerRendererGL::Vertex>(Effekseer::SpriteRenderer::NodeParameter const&, Effekseer::SpriteRenderer::InstanceParameter const&, void*, Effekseer::Matrix44 const&) EffekseerRendererNative.h:2911 #2 0x103778f11 in EffekseerRenderer::SpriteRendererBase<EffekseerRendererGL::RendererImplemented, EffekseerRendererGL::Vertex, EffekseerRendererGL::VertexDistortion>::Rendering_(Effekseer::SpriteRenderer::NodeParameter const&, Effekseer::SpriteRenderer::InstanceParameter const&, void*, Effekseer::Matrix44 const&) EffekseerRendererNative.h:2763 #3 0x1037759dc in EffekseerRenderer::SpriteRendererBase<EffekseerRendererGL::RendererImplemented, EffekseerRendererGL::Vertex, EffekseerRendererGL::VertexDistortion>::Rendering(Effekseer::SpriteRenderer::NodeParameter const&, Effekseer::SpriteRenderer::InstanceParameter const&, void*) EffekseerRendererNative.h:3012 #4 0x10098153f in Effekseer::EffectNodeSprite::Rendering(Effekseer::Instance const&, Effekseer::Instance const*, Effekseer::Manager*) EffekseerNative.cpp:11260 #5 0x1009d690a in Effekseer::Instance::Draw(Effekseer::Instance*) EffekseerNative.cpp:16081 #6 0x1009c77d2 in Effekseer::InstanceContainer::Draw(bool) EffekseerNative.cpp:14737 #7 0x1009cddbe in Effekseer::ManagerImplemented::DrawHandle(int) EffekseerNative.cpp:14227 #8 0x1022a50bb in efk::EffectEmitter::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int)::$_0::operator()() const Effekseer.cpp:610 #9 0x1022a477c in void std::__1::__invoke_void_return_wrapper<void>::__call<efk::EffectEmitter::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int)::$_0&>(efk::EffectEmitter::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int)::$_0&&&) type_traits:4428 #10 0x1022a4618 in std::__1::__function::__func<efk::EffectEmitter::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int)::$_0, std::__1::allocator<efk::EffectEmitter::draw(cocos2d::Renderer*, cocos2d::Mat4 const&, unsigned int)::$_0>, void ()>::operator()() functional:1562 #11 0x1001268a1 in std::__1::function<void ()>::operator()() const functional:1913 #12 0x1014bd590 in cocos2d::CustomCommand::execute() CCCustomCommand.cpp:55 #13 0x103665932 in cocos2d::Renderer::processRenderCommand(cocos2d::RenderCommand*) CCRenderer.cpp:480 #14 0x10366adf2 in cocos2d::Renderer::visitRenderQueue(cocos2d::RenderQueue&) CCRenderer.cpp:618 #15 0x10366c143 in cocos2d::Renderer::render() CCRenderer.cpp:680 #16 0x10264a549 in cocos2d::Scene::render(cocos2d::Renderer*) CCScene.cpp:277 #17 0x1007085e1 in cocos2d::Director::drawScene() CCDirector.cpp:339 #18 0x100733d6d in cocos2d::DisplayLinkDirector::mainLoop() CCDirector.cpp:1490 #19 0x10328dd8d in cocos2d::Application::run() CCApplication-mac.mm:111 #20 0x103288e40 in main main.mm:144 #21 0x7fff7d485ed8 in start (libdyld.dylib:x86_64+0x16ed8)
I think, the reason of that is _mm_loadu_ps function works with four values (as described there https://software.intel.com/en-us/node/524260), but TransformVertexes function corresponding Matrix43 matrix. I mean, that call _mm_loadu_ps( mat.Value[0] ) uses mat.Value[0][0], mat.Value[0][1], mat.Value[0][2], mat.Value[1][0], call _mm_loadu_ps( mat.Value[1] ) uses mat.Value[1][0], mat.Value[1][1], mat.Value[1][2], mat.Value[2][0] and so on. And _mm_loadu_ps( mat.Value[3] ) approach stack overflow.

Could you fix it, please?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.