Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

PA Particle Field - Superfast, GPU Based, Persistent Particles

Discussion in 'Assets and Asset Store' started by popupAsylum, Apr 17, 2015.

  1. strongbox3d

    strongbox3d

    Joined:
    May 8, 2012
    Posts:
    860
    Hello popupAsylum,

    I am having problem with the particles when I try to use the "Texture type: Animated rows". Here there is a picture so you can see what I mean. The problem is that the particle appears as the whole sheet instead of the frames in the sheet.
    Could you help me to fix that?

    Regards,
    Carlos ProblemWithYourAsset.jpg
     
  2. sebsmax

    sebsmax

    Joined:
    Sep 8, 2015
    Posts:
    118
    Hello @popupAsylum
    I've upgraded to Unity 2017.1, I had to disable the shadow in the demo folder

    17 Assets/PopupAsylum/PAParticleField/Demos/MeshAnimation/PAParticleFieldShadows.cs(17,41): error CS0029: Cannot implicitly convert type `UnityEngine.Rendering.ShadowCastingMode' to `bool'

    Code (CSharp):
    1.  // particleField.castShadows = castShadows;
    And once the game is build, all particles are graphically scaled but still considered as not scaled.
    In the editor, everything is fine
     
  3. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    653
    Hello @popupAsylum
    TLDR: cylindrical exclusion zone?

    I'm trying to make an enormous asteroid belt for a mobile VR game. I figured PAPF might be able to help me. Is there a way to have a cylindrical exclusion zone (or, in a pinch, I could use one spherical with two enormous boxes at top and bottom?)

    Thx!
     
  4. BlueMerlin

    BlueMerlin

    Joined:
    Mar 6, 2015
    Posts:
    2
    Hi @popupAsylum !

    We use your stardust system on a player with the world simulation to create an atmospheric dust in our scene. We just have updated to Unity 2017.1.0f3 and PAPF, everything is fine and the simulation works correctly in the editor. But when we build the scene, the simulation switch to local mode. Can you help us to fixe it?

    Thanks!
     
  5. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    653
    HI @BlueMerlin
    It might be the same issue I encountered recently. @popupAsylum kindly solved it thus:
    I was targeting Android. HTH.
     
  6. BlueMerlin

    BlueMerlin

    Joined:
    Mar 6, 2015
    Posts:
    2
    Hi @Arkade ,
    thanks a lot for your answere, it's works perfectly now !
     
  7. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,013
    @popupAsylum In the online documentation it states the following:

    I've always wanted to try this because I'd like to improve the look of the rain effect by using a modified material from LIQUIDUM. I've always thought this must be possible based on the documentation. However, I remember somewhere where there was information on how to make a compatible shader, but I can't find that now. Do you have a link to where it explains how to make a shader compatible with PAP?

    [EDIT]
    I finally found it in one of your old blog posts.

    http://popupasylum.co.uk/?p=683

    I guess I'll see if I can make sense of it and get it working.
     
  8. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    402
    @popupAsylum I have a strange bug that occurs when I instantiate the Specks Prefab into a scene where the particles operate in Local space as opposed to World space (which was set in the prefab) - the odd thing is that this happens only on iOS and not in the editor.

    When I load a scene that contains the Specks Prefab it works as expected in World Space in the editor and in iOS.

    Can you think why this might be at all?

    I'm using Unity 5.5.4 and v 1.33

    thanks

    Nalin

    UPDATE - Ok it seems that if I set it to Local with Delta then it gives the behaviour I want and is consistent on iOS and in Editor - not sure why the above is different across Editor/iOS
     
    Last edited: Nov 22, 2017
  9. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    Hi @puzzlekings, PA Particle Field makes use of shader_features which allows unity to save memory in a build if it detects a feature is not being used, in this case it's detecting the WORLD_SPACE is not being used because it isn't being used in the scene at build time. You can force features that are not detected to be included using shader variant collections, this page shows how to make them https://docs.unity3d.com/Manual/OptimizingShaderLoadTime.html

    That's the most official way, in practice though there's lots of ways to ensure the feature is detected and included, including a disabled version of the prefab somewhere, or referencing a material with the keyword and the same shader.
     
    Alverik likes this.
  10. puzzlekings

    puzzlekings

    Joined:
    Sep 6, 2012
    Posts:
    402
    Thanks for clarifying!
     
  11. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    Does PA support custom shader or material?
     
  12. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    Hi @clagrens, PA supports custom shaders but they have to be authored for it since the positioning of the particles happens in the vertex shader, the Animated Mesh and Sine wave scenes are examples of custom shaders as is this tutorial http://popupasylum.co.uk/?p=683

    The simplest way is to call

    Code (csharp):
    1. PAParticleField(/*inout appdata_full*/ v)
    or for mesh particles
    Code (csharp):
    1. PAParticleMeshField(/*inout appdata_full*/ v)
    in your vertex shader followed by

    Code (csharp):
    1. float4 finalPosition = PAPositionVertex(v.vertex);
    or for surface shaders
    Code (csharp):
    1. float4 finalPosition = PAPositionVertexSurf(v.vertex);
    The first function does all the simulation and the second positions the vertex in the correct space depending on if its a world space field or not.

    If you want more control or fancier effects, you can breakdown the PAParticleField function by calling its own functions yourself in your vertex shader, PAParticleField looks like this:

    Code (csharp):
    1. float3 PAParticleField(inout appdata_full v){
    2.     ParticleInput pi = GetParticleInputForBillboard(v);
    3.     BillboardParticleInput bi = GetBillboardParticleInput(v);
    4.     ParticleOutput po = Simulate(pi);
    5.     RasterizeBillboard(bi, po, /*out*/ v);
    6.     return po.position;
    7. }
    ParticleInput, ParticleOutput, BillboardParticleInput and MeshParticleInput are all structs that can have their values modified to do interesting things, Simulate(pi) runs the particle simulation and RasterizeBillboard or RasterizeMesh combines the resulting position and rotation with the mesh of the particle.

    The vertex function below is probably not usable to anyone, it's a very specific custom surface shader for a bee swarm but it show how modifying these structs between function calls can do interesting things. It wraps mesh particles position in a vortex-like circle, flaps the bees wings and wobbles the legs, done by modifying the values of ParticleInput to control speed and direction, ParticleOutput for the positioning in a circle and orientation, and MeshParticleInput for the wing and leg movement.

    https://twitter.com/popupAsylum/status/934198974025814017

    Code (csharp):
    1.  
    2.         void vert(inout appdata_full v, out Input o){
    3.             UNITY_INITIALIZE_OUTPUT(Input, o);
    4.            
    5.             /*struct ParticleInput {
    6.                 float index;
    7.                 float3 position;
    8.                 float3 direction;
    9.                 float speed;
    10.                 float timeOffset;
    11.             };*/
    12.             ParticleInput pi = GetParticleInputForMesh(v);  
    13.  
    14.             //get the unsimulated particles x position, normalized across the field, I'll add a better way of getting this in future
    15.             float particlePositionX = 1-(pi.position.x/2+1);    
    16.             particlePositionX = 1-frac((0.5 - frac(particlePositionX)) * 2 - 1);
    17.  
    18.             //force the bees to fly forward
    19.             pi.direction = float3(0, 0, 1);
    20.            
    21.             float circumfrence = 2 * lerp(0.5, 3, particlePositionX) * 3.14;
    22.             //modify their speed so bees at the edge of the circle fly slower than those near the center
    23.             pi.speed = 1/ circumfrence;
    24.  
    25.             // Get mesh input
    26.             /*struct MeshParticleInput {
    27.                 float3 vertexOffset;
    28.                 float3 normal;
    29.                 float4 tangent;
    30.                 float2 texcoord;
    31.                 fixed4 color;
    32.                 float3 spinAxis;
    33.                 float spinSpeed;
    34.             };*/
    35.             MeshParticleInput mesh = GetMeshParticleInput(v);
    36.  
    37.             // Simulate the particle, at this point the shape is still a box
    38.             /*struct ParticleOutput {
    39.                 float3 position;
    40.                 float3 velocity;
    41.                 float visibility;
    42.                 float time;
    43.                 float linearDistanceTravelled;
    44.             };
    45.             */
    46.             ParticleOutput po = Simulate(pi);
    47.            
    48.             //to make the bees travel in a circle, use the position.z in the box a cylindrical coordinate
    49.             float radialPosition = po.position.z;
    50.             float doublePi = 3.14 * 2;
    51.             float2 circlePos = float2(cos(doublePi * radialPosition), sin(doublePi * radialPosition));
    52.            
    53.             //use position.x as the radius of this bees circle
    54.             float radius = po.position.x * 0.5 + 1;
    55.             radius = radius * (_OuterRadius - _InnerRadius) + _InnerRadius;
    56.            
    57.             //set its position in xz
    58.             po.position.xz = circlePos * radius;
    59.            
    60.             //scaling the particles y position can spread the bees out a bit if desired
    61.             po.position.y *= _Height;
    62.  
    63.             //rotate the bee in the direction its facing (directional is enabled so velocity controls orientation)
    64.             po.velocity.xz += float2(sin(doublePi * (1-radialPosition) * sign(pi.speed)), cos(doublePi *  (1-radialPosition)* sign(pi.speed)));
    65.             //tilt the bee forward a bit
    66.             po.velocity.y += 0.5;
    67.  
    68.             //flap the bees wings based on vertex colors with some magic numbers
    69.             mesh.vertexOffset += (sin(_Time.y * 60) * 0.02 * mesh.color.r + 0.01 * mesh.color.r) * float3(0, -0.5, 0.5);
    70.            
    71.             //bounce the bees legs on vertex colors with more magic numbers
    72.             mesh.vertexOffset.y += sin(_Time.y) * 0.001 * mesh.color.b - mesh.color.b * 0.001;
    73.  
    74.             // position and orient the mesh using the result of the particle simulation
    75.             RasterizeMesh(mesh, po, /*out*/ v);
    76.            
    77.             // put it in the right space
    78.             v.vertex = PAPositionVertexSurf(v.vertex);
    79.         }
    80.  
    81.  
     
  13. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    Great,I have tested PA's demo.It is so fast!
    But another question...Does PA support mesh field? For example,the ring type?
     
  14. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    Do you mean to emit in the shape of a ring or to be able to emit from a mesh? If so not really, for emitter shapes it can do cubes, spheres and cylinder shapes. These are all handled in code as cube emitters and the shader masks some particles to make the field spherical or cylindrical
     
    clagrens likes this.
  15. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    163
    Hey there,
    Haven´t used particle field in a long time, but I remeber beeing able to have a fixed hight for a field and following an object (for high clouds as an example) I guess that is what the PACloudController is made for ?
    But as soon as I activate it and add a camera as a target, no clouds are visible anymore. Also, you can see in the editor window that the particle field does not move.

    Edit: As soon as I assign any follow target in the PACloudController, the clouds disappear on runtime.

    Any tips ?
     
  16. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    @secondsight_ PACloudController is mostly that behavior, it takes several particle fields, which are assumed to be it's children and spread out, and fades them out and re-positions them whenever they get too far from the target.

    Is the problem happening in the demo scene? If not then perhaps if the fields are not children of the PACloudController or if the PACloudController has an awkward Y position/rotation/scale it might be affecting the fields.

    Depending on what your after, and if its a single field, I think PACloudController might be overkill since it only moves the field when the target gets past a distance threshold, it sounds like you might just want to move the field every frame?
     
  17. secondsight_

    secondsight_

    Joined:
    Mar 2, 2014
    Posts:
    163
    Hey,
    Guess that´s what I´m after: I want a particle field to follow the camera in a fixed height.

    And now I´ve found out how to do it: There is a script in the caustic demo that does the trick. It´s called CausticDemo and has a fixed camera distance and a height offset. I guess I have mixed that up with the follow script.
    Thanks anyways :)
     
  18. Mr-Oliv

    Mr-Oliv

    Joined:
    Sep 14, 2012
    Posts:
    33
    Hi!
    Is there an API for accessing and controlling individual particles?
    Thanks
     
  19. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    @Mr-Oliv There's an API for setting up some of the initial states of particles by using or extending PACustomBillboardGenerator/PACustomMeshParticleGenerator, this is stored in the mesh data and not really intended to be modified often, when its running there's not much happening script side, its all shader.

    The ideal way to manipulate particle behavior as its playing would be in a custom vertex shader function.
     
  20. OneOfHaze

    OneOfHaze

    Joined:
    Jun 1, 2017
    Posts:
    7
    Hi, I can't seem to get the exclusion zone to work. Steps:

    1. Create empty scene.
    2. GameObject - Create Other - PA Particle Field
    3. Enable "Use Exclusion Zones" on the Pa Particle Field component
    4. GameObject - Create Other - PA Exclusion Zone

    The Exclusion Zone doesn't seem to affect the particle field in any way.

    It also doesn't work in the demo scenes.

    Any suggestions? Thanks!

    I'm using Unity 2017.3.0f3
     
  21. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    @OneOfHaze If you've recently updated the project to 2017 and you originally imported PAParticleField in a different Unity version it should hopefully be fixed if you update the package. There were some #if !UNITY_5 defines around code for Unity 4.
     
  22. OneOfHaze

    OneOfHaze

    Joined:
    Jun 1, 2017
    Posts:
    7
    @popupAsylum I just bought and downloaded the asset yesterday. However, deleting it from the project and re-importing seemed to solve the problem! o_O #onlyunitythings

    So everything good now! :)
     
    popupAsylum likes this.
  23. erikwp

    erikwp

    Joined:
    Jan 16, 2018
    Posts:
    25
    Hi - I have my own custom generated particle mesh (either mesh points or mesh triangles) with per-particle color - can I simply apply your shader to my mesh to get all the features of your system? Also, will the particles work on IOS? Thanks
     
  24. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    @erikparr you can use your own mesh by extending MeshParticleGenerator returning your mesh instead of generating one, but the mesh data gets redirected a bit since all the data needed gets packed into the mesh.

    The code below is from ParticleMeshField.cginc and shows how the mesh data (i.e. appdata_full in the shader) is converted into the ParticleInput and MeshParticleInput/BillboardParticleInput structs that the shader uses to run the simulation (slightly modified to remove bits that aren't related to the mesh data and to add comments for what its all doing where it's not standard).

    Code (CSharp):
    1.  
    2. MeshParticleInput GetMeshParticleInput(appdata_full v){
    3.     MeshParticleInput o;
    4.     o.vertexOffset = v.vertex.xyz; //the particle's offset from it's pivot is fairly standard
    5.     o.normal = UnpackVector(v.texcoord1.x); //the particle's normal is float packed into UV2.x
    6.     o.tangent = v.tangent;
    7.     o.texcoord = v.texcoord;
    8.     o.texcoord.x += _UOffset; //for flipbook animation
    9.     o.color = v.color;
    10.     o.spinSpeed = v.normal.g; //per particle spin speed packed into normal.g
    11.     o.spinAxis = UnpackVector(v.normal.z); //per particle spin axis packed into normal.z
    12.     return o;
    13. }
    14.  
    15. ParticleInput GetParticleInputForMesh(appdata_full v){
    16.     ParticleInput o;
    17.     o.position =  UnpackVector(v.texcoord1.y); //initial position and direction are float packed into UV2.y
    18.     o.direction = o.position;
    19.     o.speed = v.normal.r; //per particle speed is packed into normal.r
    20.     return o;
    21. }
    Its packed a little different again for billboards, from ParticleField.cginc

    Code (CSharp):
    1.  
    2. BillboardParticleInput GetBillboardParticleInput(appdata_full v){
    3.     BillboardParticleInput o;
    4.     o.vertexOffset = v.texcoord1; //offset from pivot is in UV1
    5.     o.texcoord = float2(v.texcoord.x + _UOffset, v.texcoord.y);
    6.     o.color = v.color;
    7.     o.spinSpeed = v.normal.g;
    8.     return o;
    9. }
    10.  
    11. ParticleInput GetParticleInputForBillboard(appdata_full v){
    12.     ParticleInput o;
    13.     o.index = v.normal.z;
    14.     o.position = -v.vertex.xyz; //initial position and direction are packed in vertex position
    15.     o.direction = -v.vertex.xyz;
    16.     o.speed = v.normal.r;
    17.     return o;
    18. }
    You can either make you mesh's data fit that structure, or write new shader functions to take your mesh in its current format that return a ParticleInput and BillboardParticleInput/MeshParticleInput.
     
  25. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,511
    Is this compatible with current 2018.1b12 version of Unity?
     
    Jokonut likes this.
  26. superjayman

    superjayman

    Joined:
    May 31, 2013
    Posts:
    185
    I get errors with 2018.1.5f1 ??
     
  27. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    I haven't tried it past 2018.1.1 yet, I'll have a look
     
  28. superjayman

    superjayman

    Joined:
    May 31, 2013
    Posts:
    185
    Noticed a strange issue! If I enable Strech/Direction , it's ok in editor mode, but in stand-alone player All the particles are aligned Vertically? Any Ideas? Cheers.
     
  29. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    Are you creating the field at runtime? PAPF makes heavy use of shader_features (which directional is one of) that strip shader variants that aren't detected as being used during the build to reduce file size.

    If that's the case and its a prefab simply including a disabled instance of the prefab in a scene is the easiest way to ensure the variant is included in the build
     
  30. OhiraKyou

    OhiraKyou

    Joined:
    Mar 27, 2012
    Posts:
    259
    The bokeh example is a neat effect, but the implementation (via mip mapping) is significantly affected by screen resolution. A shader-based solution (e.g., interpolating between a sharp and blurred texture) may be required for consistency across all resolutions.
     
    Last edited: Aug 5, 2018
    popupAsylum likes this.
  31. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    Is it possible to generate normal on billboard like the particle system in unity?
    I using a particle surface shader, which needs sphere normal on particle billboard.
    I want to modify it and use it in PA particle field.
    But I can not find where it can change the normal.

    upload_2018-11-10_16-42-54.png
    This is the normal setting in the particle system.

    I take a look in shader of PA particle field.
    And just find normal is set up by particle facing when rendering billboard.
    Please help me. Thanks!
     
  32. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @popupAsylum have you tried PA particle field with Enviro? I'm wondering if Enviro can work to direct snow density, angle from wind and duration etc
     
  33. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    Hi @clagrens, just to check, do you need the normals pointing away from the center of the particle?
     
  34. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    Hi @Ascensi
    I've not tried Enviro, the documentation doesn't say if its easy to access wind direction etc but as long as it does I imagine it wouldn't be too hard to create a class to take the values from Enviro and plug them into PAPF's particle count, force and noise properties.
     
  35. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    I check the document, It says that:

    Normal Direction:
    The bias of lighting normals used for the particle graphics. A value of 1.0 points the normals at the Camera, while a value of 0.0 points them towards the center of the screen (Billboard modes only).

    When I use this shader, I need to change the value to 0.1.

    Thanks!
     
  36. shapesandlines

    shapesandlines

    Joined:
    Oct 9, 2015
    Posts:
    2
    Just purchased, great stuff! I'm in Unity 2017.2.1p3 I can not seem to get the spin field to do anything. I am using the system to create clouds, and want the billboards to spin slowly clockwise/counterclockwise to give life to the cloud without moving the particle around in the volume of the emitter. Any help would be greatly appreciated.
     
  37. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    2017.2.3 spin works well
     
  38. FrogMedic

    FrogMedic

    Joined:
    Nov 15, 2011
    Posts:
    4
    I love PA, thank you!

    But did the "custom vertex program demo" make it into the asset? I can't find it.

    (The AssetStore page writes: "The package comes with 7 demo scenes... plus a custom vertex program demo and a comparison scene showing PA Particle Field handling 195000 particles with ease.")
     
  39. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    Hi @FrogMedic, glad you're liking it, the custom vertex program is the SineField demo, it uses a custom vertex shader to add a sine wave to the field
     
    FrogMedic likes this.
  40. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,238
    We're investigating a performance problem with PA Particle Field -- when the effect (snow) is playing, we get big CPU spikes every 26 frames, on Update.ScriptRunBehaviorUpdate > BehaviorUpdate>PAParticleField.Update() -- typically 70-80ms spikes. This is in a build, Windows 10, GTX 1060 and comparable CPU, using Unity 2018.3.8. Any suggestions on what could be causing that or how to eliminate it?

    EDIT: Hmm, there's also a constant 4-5ms CPU load from PAParticleField.Update. Is that expected?


    thanks
    Dave
     
  41. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,013
    I would say that's probably a bug, probably related to Unity version. I've run PA Particle Field on Unity 5 and Unity 2017 on the Wii U and it runs as if there is no impact whatsoever, which is quite a feat since the Wii U is certainly no powerhouse.
     
    Last edited: Mar 29, 2019
    gecko likes this.
  42. OhiraKyou

    OhiraKyou

    Joined:
    Mar 27, 2012
    Posts:
    259
    Do you have rebuild at runtime set to true? Without that enabled, I've seen some major performance issues.
     
    gecko likes this.
  43. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,238
    that was not selected, so I'll select it and try again. Thanks much for the tip!
     
  44. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,238
    Darn it, no better in a build. Here are my settings -- anything else that I need to tweak?

    pa snow.PNG
     
  45. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    The performance problem was related to modifying the particle count every frame which caused an expensive mesh rebuild, a similar effect (for billboard particles) could be achieved by setting the particle count to the max value you'd want to show and tweaking the "particle count mask" to hide a number of particles without requiring the mesh to be rebuilt.
     
    magique and gecko like this.
  46. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,238
    Yes, that CPU cost was entirely from our scripts; we've revised it based on Mark's suggestions, and now CPU cost is 0.03ms -- thanks much, fantastic now!
     
    hopeful likes this.
  47. marcus_unity998

    marcus_unity998

    Joined:
    Jan 7, 2019
    Posts:
    10
    Hi @popupAsylum ,
    I have a few questions about your asset:
    1. I'd like to know if I can use your asset for an AR game. I want to have a moving starfield around me. Is that possible?
    2. Also I noticed you have the PA particle field and one called PA starfield. Is PA starfield just an asset made with PA particle or is something completely different? What's more suitable for my use case?
    3. How flexible is your asset? Can I control the speed, rotation, scale of the particles. What can I do with this?
    4. Can I easily take an already made default particle system from Unity and incorporate to PA Particle field to use the GPU or do I need to reimplement the particles using your system? Basically, does it work together with unity's default particles or is it something completely separate?
    5. Lastly, is it compatible with Unity 2019? Are you still supporting this asset? On the asset store the latest Unity version said to be supported is 2017, so I'm a little wary.

      Thank you for your time!
     
    Last edited: Jun 6, 2019
  48. iGames

    iGames

    Joined:
    Oct 3, 2014
    Posts:
    3
    Hi,
    Is PA particle field compatible with the Lightweight Render Pipeline?
    Do I need to do something to make it work with LWRP?
     
  49. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    422
    @iGames Just started using this asset in a LWRP project on Unity 2019.1. I did initially get an error but commented out the problematic line in PAParticleField.cs (line 1411: shouldUseSoftParticles &= Camera.current.depthTextureMode != DepthTextureMode.None;) and it does work for me.

    However...
    @popupAsylum Not sure if it's 2019.1 or LWRP or VR related but using the snow demo prefab, I have intermittent streaks coming off the particles:

    Video:


    I don't have the problem in other VR projects (2018.4.1) using the standard render pipeline.

    Can you help in any way?
     
  50. popupAsylum

    popupAsylum

    Joined:
    Apr 7, 2014
    Posts:
    119
    @iGames LWRP is not supported right now, but the unlit material variants will work with LWRP as does the code (except for the null reference on line 1411 jeromeWork mentioned, to do with soft particles)

    @jeromeWork I've not been able to reproduce that streaking but I'd suggest changing the fields random seed if you haven't already