Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question [SOLVED] Set particles on Sphere ( opaque sphere)

Discussion in 'Visual Effect Graph' started by gregjdf, Dec 5, 2022.

  1. gregjdf

    gregjdf

    Joined:
    Jul 23, 2022
    Posts:
    11
    Hello

    I'am struggling on the following problem.

    I have some particles representing stars that are located on a sphere, a 2D sphere.
    The idea is to visualize the stars on a 2D sphere that I can rotate, zoom etc...
    For that I already have the coordinates in a point cache from wich I can extract coordinates and set position.
    It works well: my particles are displaying properly on a "invisible" sphere in the sense that I do not materialize any actual sphere object (game object or vfx sphere geometry). It is just by construction from the point cache coordinates that I obtain a sphere.

    Here my main issue is that I'd like to make the sphere opaque to avoid seeing all the stars but only the ones that would be on the visible "face" of the sphere. As I don't have an actual sphere object it cannot work.

    I'am not sure how to proceed.
    Ideally I'd like to put the particles on a Sphere (object? or VFX object) that can be rendered and change opacity to be able to see only the visible face.
    Thanks for any hints !
    gregory


    In the screenhost linked, it is not very visible but we can see stars at the opposite location of the sphere
     

    Attached Files:

    Last edited: Dec 5, 2022
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,350
  3. gregjdf

    gregjdf

    Joined:
    Jul 23, 2022
    Posts:
    11
    Thanks my particles looks at camera, but it would not solve at all my issue to change this parameter (Unless I miss something here ) . The thing is really to kind of use the particles (all of them) and put them on an opaque sphere (maybe a gameobject sphere ?)
     
  4. gregjdf

    gregjdf

    Joined:
    Jul 23, 2022
    Posts:
    11
    Ah I see your point. Make the particle only one sided ... Not sure how to do this I'll check and see :)
    Thanks But then particles should face outward the center of the sphere
     
  5. gregjdf

    gregjdf

    Joined:
    Jul 23, 2022
    Posts:
    11
    It seems that non double sided particles are only relevant to more complex meshes , so here it does not work.
    I have impression I'all have to use a game object and add particles on top of it to mimic the effect.
     
  6. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,291
    So instead of this
    upload_2022-12-5_22-52-10.png

    You want this?
    upload_2022-12-5_22-55-34.png
    (downside - particles are not looking at you)
    upload_2022-12-5_22-56-30.png

    or maybe this one?
    upload_2022-12-5_23-15-56.png
    upload_2022-12-5_23-21-40.png
    About last one - probably you would get the best performence if you move Set Alive to Update and don't set lifetime to particles or disable ripping, so they are culled before mesh is even constructed. Ah and output would require "compute culling" enabled.
     
    gregjdf likes this.
  7. gregjdf

    gregjdf

    Joined:
    Jul 23, 2022
    Posts:
    11
    @Qriva Yes thanks you so much This is exactly what I need ! I'll try this and let you know.
     
  8. gregjdf

    gregjdf

    Joined:
    Jul 23, 2022
    Posts:
    11
    @Qriva It works !!! Strange thing is that I had to put cull mode to front instead of back, something not dramatic but I'am wondering why. In any case it is solved!
     
  9. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,291
    It depends what you need, in fact what you can see above (second img) is rear of sphere, not front. My direction is driven by position:sphere, maybe you got your own, custom.