Hi,
I would like to make my own custom field node to represent a spherical sector which starts propagation from an inner radius also. I would like to be able to use it for culling as well as applying falloff damage. It looks simple enough to do (extending the FFieldNode<float> class and implementing the appropriate values), however I am stuck when it comes to serialization. I would need to extend the FFieldNodeBase::ESerializationType enum as well as the FieldNodeFactory function. I would also like to know if there are any considerations I would need to make if I make the field available to the GPU (e.g by passing bIsGPUField as true to the UPhysicsFieldComponent::AddCommand function).
I would not really like to make changes to the engine if I can avoid it, however if this is the only way then I will need to do it.
Thanks,
James
Hi James, Unfortunately adding new field nodes is requiring modifying the engine code above all if you want to add support for GPU physics field.
We will need no upgrade the system to be more plugin oriented in order for you to easily add nodes. In the mean time yes you are right you will need to create the UFieldNode (FieldSystemObjects.h/cpp), the matching FFieldNode and factory (FieldSystemNodes.h/cpp), the sertialization (FieldSystem.h), the gpu code (PhysicsFieldEval.h) and the dataflow nodes (GeometryCollectionfieldNodes.h/cpp). Quite a lot of code unfortunately. But you can follow what is the code adde for WaveScalar or any other to have an example. For the serialization yes you will need to extend the FFieldNodeBase::ESerializationType enum as well as the FieldNodeFactory. if you are facing any issue or if something is not working as expected please let me know.
Thanks
Michael