Search Unity

Converting particle system with no collisions to animated mesh.

Discussion in 'Scripting' started by unity_E0lm9clmLlOAzw, Sep 28, 2019.

  1. unity_E0lm9clmLlOAzw

    unity_E0lm9clmLlOAzw

    Joined:
    Sep 28, 2019
    Posts:
    2
    I want to create particle effects in Unity, then export and use them in my own game engine. Im fine with any file format since i will use Assimp to load the models into my game, and Assimp suports almost every 3D format. Do you have any scripts, or add-ons that can do that?
     
  2. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    2,605
    So.. you want to use another engine to create and then export the particle effects you plan on using in your own engine?

    Effectively particle effects consist of two components: sprites and position+rotation changes over time. So you could extract those information and save / export them in some format to your liking, which you can then import to reconstruct the effect. Something similar has been done here: https://forum.unity.com/threads/mparticles-3ds-max-particle-animation-importer.101434/
    Of course, if you want to import it using some tool, then you'll need to encode the information in a format this tool can read.

    May i ask why you are writing your own engine? Unless you are working with a somewhat bigger team, writing your own game engine is almost always a bad idea. People tend to greatly underestimate the effort involved in doing this, and the results often arent exactly good either, if the game even gets released due to the increased workload.
    Of course i cant say anything about you and you are free to do what you want, i just thought i'd better mention that writing your own game engine is almost always a rather impractical idea, unless you know exactly why that's required and what you are doing.
     
  3. unity_E0lm9clmLlOAzw

    unity_E0lm9clmLlOAzw

    Joined:
    Sep 28, 2019
    Posts:
    2
    I want to write my own game engine from 7 reasons:
    1) I dont trust people in general, and because of it I dont know how efficient Unity renders a scene.
    2) Its a great learning exercise.
    3) The game i want to make its not the typical game on the market.
    4) If this project succeeds I dont want to have to pay Unity money for this.
    5) I dont know Unity, im just a programmer with basic knowledge of 3D modeling softwares.
    6) I already know how to code 80% of the engine.
    7) The engine is just the tip of iceberg that needs to be done for my game. The entire project will probably take 50 times more time to finish.
     
  4. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    2,605
    I dont plan on completely derailing this thread, so i've put my reply to your points in the below spoiler.
    What are you doing about the particles? Did you look into what i wrote above? Or are you only looking for complete solutions, rather than explanations for how you may approach it yourself. In which case i guess i cant help, and unless anybody did the same thing in the past and is willing to share his script for it, or there exists a free tool i missed when researching, then i doubt you'll find an easy solution free of work, sadly.

    About your arguments for writing your own engine, some of them are definitely valid, while others are a bit questionable. The below is only my opinion on the matter, so ignore it if you dont want to hear it - although reading it doesnt hurt either.
    1) Fair enough, as that's pretty much the reason i stay away from assets unless its models
    2) Hard to argue against that, but sometimes (Quaternions for example) properly understanding something gains you nothing, while potentially taking a long time still
    3) Engines tend to tackle those things that are shared between "all" games, everything extra is just that: extra. So the type of game should not matter, unless you plan on using raytracing instead of rasters for rendering, invent your own physics, and well, do everything in a way that's not common in any games. Which is very unlikely, no matter what you do.
    4) No offense, but this point is really a bit silly. Unity only requires you to buy a license after you earn more than 100k a year, that's 8.3k a month, of which they take 25 bucks, which is 0.3% of your income. The worst case scenario is right when you hit the 200k/year mark, where you pay 125 bucks, meaning a whole 0.75%. And since it's a flat value it becomes less and less important from there on, assuming you make more money per year. I mean.. seriously, that's as fair as it gets. On top of that, no matter how good the game is, it's extremely unlikely that your first game earns you anywhere near that amount of money. Not impossible, but still. A rather popular Unity youtuber recently released a game. Iirc he had about 150k subscribers, so he had a huge range for free advertisement, and still only made <10k or so in the first month, which creates the most income generally.
    5) Fair point, but you could make it a "great learning experience" ^^
    6 + 7) If we are only talking about the absolute necessities, like vector math, rendering and maybe physics or whatever you need, then i believe you. However, "proper" game engines like Unity offer a lot more than that. The particle system which you seem to need is just one tiny part of it. Easy shader or vfx creation through the graph systems is another. Basically free multithreading and a speedup between factor 10x to 50x+ (no joke) through efficient memory layouting with DOTS is another thing.
    I consider myself a decent programmer (currently finishing my masters degree in computer sciences, if that even puts any weight on that statement). However, if i imagned i had to programm all the tools offered by Unity (even only considering the ones i used and found useful over the past couple months), it would probably take years to do properly.
    And i'm not sure if the results would be any better either. More likely than not, worse.

    So yeah, that's just my opinion. You are obviously free to do what you want, but i highly recomment you consider using some engine. It does not have to be Unity, but i believe you miss out on a lot of time-savers, or even free performance upgrades, by ignoring engines. When i started studying computer sciences and wrote some mini games for fun i also wanted to do everything myself, but looking back at it now, that's not feasible for anything but very small games, and even for those: feasible does not necessarily mean reasonable.

    Anyways, even if you dont plan on using Unity, or any other engine, when you have a protoype or the finished product, consider sending me a message. You made me curious about what you are making so i'd love to have a look after it's done ;)
     
    Last edited: Sep 28, 2019