Search Unity

Question Position space: None

Discussion in 'Visual Effect Graph' started by Qriva, May 18, 2023.

  1. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    What exactly space set to None does? (documentation is missing)
    Does it assume space to be the same as space of system?
    upload_2023-5-18_22-0-41.png
     
  2. JulienF_Unity

    JulienF_Unity

    Unity Technologies

    Joined:
    Dec 17, 2015
    Posts:
    326
    Space "None" will bypass any automatic space convertion (when pluggin a port in local space to a world space system for instance) so it effectively considers the input is in the space of the system (as not conversion is performed)
     
    Qriva and PaulDemeulenaere like this.
  3. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    Isn't that still either world or local space? Or am I misunderstanding something?
     
  4. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,314
    I get the logic and consistency behind this ("None"), but in this case shouldn't that be perhaps "System Space" instead of "None"? In any case we need updated docs.
     
  5. PaulDemeulenaere

    PaulDemeulenaere

    Unity Technologies

    Joined:
    Sep 29, 2016
    Posts:
    154
    Yes, none space is only a new mode for spaceable slot. If you choose None on a input slot from a block, then, the block won't apply any space conversion and implicitly use the same space than system.

    This option isn't only used in block, you can use the operator "Add" with a spaceable type:
    _spaceable_none.gif
    N.B.: In this gif the name of the operator "Position - Local" is supposed to be updated, we will register an issue ⏳

    Indeed, the documentation should be updated and exhaustive about this behavior and usage, meanwhile, in case of operator, how it works:
    - The output Space is chosen based on inputs Space
    - There is a priority order, from highest to lowest priority, we have World, Local, None.
    - If an input space doesn't match the output space, then, the input property is converted to output space before operation content.

    For example, in that case:
    upload_2023-5-22_15-24-41.png
    We are mixing Local, World & None, the World Space is the highest priority.
    Before the addition of A + B + C, we will have:
    - The input A will be converted from Local To World.
    - The input B won't be converted (World To World).
    - The input C will be converted from None To World (which is a None Operation, it acts like C is a Vector3 or already in World).

    Side notes:
    - A particle system can't be in None space, we still have to specify how to render and update particles.
    - The spawn system doesn't handle any space because it can feed values to a system in World or Local System.
    - The input spaces in subgraph block content are expected to be in None Space, the usage defines the space.
    - Since 2023.1.0a19, the expected space of an exposed property is available by script with VisualEffectAsset.GetExposedSpace
     
    Last edited: May 22, 2023
    DevDunk, OrsonFavrel and Qriva like this.