Difference between revisions of "Frooxius Notes"

From Neos Wiki
Jump to navigation Jump to search
m (Added "Asset Reuse and Deduplication")
Line 72: Line 72:
  
 
[6:55 PM] Frooxius: The active gets if it's currently active at all within the hierarchy. It can be inactive because one of its parents is inactive. The Active Self is more direct, tells you whether the slot it set to active or inactive itself.
 
[6:55 PM] Frooxius: The active gets if it's currently active at all within the hierarchy. It can be inactive because one of its parents is inactive. The Active Self is more direct, tells you whether the slot it set to active or inactive itself.
 +
 +
=== Fire On True / On Changed User Input Handling ===
 +
 +
29-03-2020
 +
 +
[9:12 PM] Frooxius: @H3BO3 If the Fire on True doesn't have an user, it will try to use heuristics to determine for who has the change occurred. This works ok in most cases, unless the changed value depends on something that updates out-of-sync, like a stream or is local value that differs for everyone.
 +
[9:12 PM] Frooxius: If Fire On True is under an user, it will use that user for detecting updates. That way when it's on an avatar or it's an item or tool, it will also work well without plugging a particular user.
  
 
== Components ==
 
== Components ==

Revision as of 07:58, 10 May 2020

Presented below are a section of notes copied from public conversations between Froox and the Neos community. They share useful hints and tips and answers to questions which may otherwise get lost. Eventually we will adapt these notes into full blown documentation but for now they may be helpful to you in the impromptu manner presented here. If you'd like to add/edit any entries please do so.

General

Render Queue Values

[11:04 AM] ToMo (DelVR): Heyo, doing some User interface design in Neos and in desperate need of render queue values, is this documented anywhere?

[11:06 AM] Frooxius: Hello! Neos is using the same Render Queue values as Unity, so you can use their reference for this.

[11:06 AM] ToMo (DelVR): Ah that's great! Cheers Froox

[11:06 AM] Frooxius: Essentially 2000 is opaque, 2450 alpha clip, 3000 transparent.

[11:06 AM] Frooxius: Some materials use a bit different ones though to get around certain issues.

[11:07 AM] ToMo (DelVR): Got it :poi_hisalute:

Computing Look Rotation

Frooxius on 2020-01-08: You can compute the rotation for look at very easily. Subtract global position of the looking object from the target, transform that as direction into the parent's space and then feed that to the LookRotation node to create a quaternion.

Driven Nodes Synchronization

The way Neos works is that anytime you make a change to any part of the data model (e.g. change position field or color) the change is synchronized from the person who changes it to everyone else.

However when you drive a field, you're essentially telling the system "Don't sync this value, it can be computed from other values/data that are synced", so everybody computes their own version on their end and saves a lot of network traffic.

Normally this works fine. But if you use the value itself in the computation (e.g. when simulating movement, you take the previous position and alter it), this is a problem, because you're using driven (non-synchronized) value to determine the new one. Any subtle differences in the computation will cause it to drift between users. This is a divergent feedback loop.

In such scenario you'd just use the write node to write a new value on the user controlling the vehicle for example and let Neos sync the new state to everyone else.

You can also have convergent feedback loops. SmoothLerp is actually example of one. It takes the existing value as input, new target and time. Even with subtle differences in calculation, it's still going to end up the same (new target, which is synchronized) value for everyone, so the feedback loop is ok in such scenario.

Gray Fog Volumes

@GearBell Switch it from Additive to Alpha. Then set the base color to gray with zero alpha (e.g. [0.5, 0.5, 0.5, 0] and the accumulation color to just alpha (e.g. [0, 0, 0, 1]). That way you have a static color whose alpha is being accumulated.

Child Order and Order Offset

@LeonClement Neos doesn't guarantee child order unless you specifically force it to. You can use the OrderOffset property to shift them around for now, make sure they all have one assigned, otherwise it'll default to sorting by allocation ID's when order is requested. Alternatively you need to specifically scan for the child you want, rather than depending on it being one with particular index.

PBR Material Textures

Aegis 2019-12-16:

   The metallic roughness map is comprised of the metallic which ranges from white(metallic) to black (non metallic), 
   the roughness using the alpha channel is from completely transparent(rough) to opaque(smooth)
   

Frooxius 2020-01-29:

   If you're using the PBR workflow then a lot of it will translate, but you have to make sure they're correct. 
   In Neos specular maps are combined with the gloss map, which is in the alpha of the specular.
   If you're using roughness map then you need to invert it to get smoothness.

Asset Reuse and Deduplication

2020-04-15

Yes. The assets are hashed. If there's already one with the same signature uploaded, then it won't upload it again. This applies for caching too. E.g. two worlds by different creators who share assets will use the same cache entry. [1]

LogiX

The difference between Get Active and Get Active Self

[6:50 PM] Parker: Does anyone know the difference between, the LogiX nodes, "Get Slot Active" and "Get Slot Active Self"?

[6:55 PM] Frooxius: The active gets if it's currently active at all within the hierarchy. It can be inactive because one of its parents is inactive. The Active Self is more direct, tells you whether the slot it set to active or inactive itself.

Fire On True / On Changed User Input Handling

29-03-2020

[9:12 PM] Frooxius: @H3BO3 If the Fire on True doesn't have an user, it will try to use heuristics to determine for who has the change occurred. This works ok in most cases, unless the changed value depends on something that updates out-of-sync, like a stream or is local value that differs for everyone. [9:12 PM] Frooxius: If Fire On True is under an user, it will use that user for detecting updates. That way when it's on an avatar or it's an item or tool, it will also work well without plugging a particular user.

Components