FX
Stand for Effects.
Also stand for dynamic value functions f(x).
Inspired by
What’s about the f(x) ?
For various effects the game may require. Need customable, extensible way to declare input-process-ouput:
-
dynamic generic Data, which can be procedure by various sources, signals, services
-
dynamic generic declaration of operations
-
dynamic generic declaration of output order
Last but not least, it should be resuable, generative and composable.
In Java?
About the implementation, such as language should be under considered!
These all requirements fit to an DSL, functional and lazy like groovy scenario, but what about java - a traditional grown as imperative language? It’s like we going to implement all its core language elements for god-sake… Umh, not like that. With the help of Guava, we do it properly acceptable and scalable! But read it carefully first or mislead later!!!
Focus in effects
Of course we not going to do a whole language enhancement here but use a functional ultilities to get start up quick and go straight to the “real-time effects part later. But remember the base concepts of it, which really to be extend and custom for your own needs.
Now Let’s see how does it work?
Interface & Abstract
We need dynamic Data, which can be procedure through various sources, signals, services… let call the abstract which provide the data IValueProvider:
interface IValueProvider <x,y>{ y value(x) return new y }
Function <x,y> is the default implementation
Function <x,y>{ }
Input
So what can be the input?
Single<Value> or any primitive
List<Value> . String
more
Time factor & Real time application
An important factor of a real time system is … time, indeed. Imagine a physic world functioning with f(t) is the primitive law. Our effects system also. Almost every effects envolve time and almost modify or procedure several positions values. It’s a very common case in this scenario.
In fact almost of the F(x) features are actually f(t) which t is the time provided by the system via update cycle.
Now consider this very simple physic xample :
S = V.t
pos = startPos + S
→ pos = startPos + V.t
We have:
-
startPos is a Vector3f (can be localTranslation of a jme3’s Spatial!).
-
a parameter vector V, basicly stand for the Speed
-
t is time provided by system
-
plus and multiply is numberical operations
→ We can compute the new pos which we can use as a slide of a ball!
In this simplest example, we should reads a mathematic equations as a “procedural process in our fx system with time as an essential key. Which later will help us build up extraordary complex effect!
Animations concepts
Here we will revised some animation concept. Kinematic and functionals.
Timeline
Keyframe
Sequence
Track
Operations
Single operation
Math
Add remove
List operation
Add remove
Transfrom
Indexing
3D Geometric operation
Curve . Interpolator
IValueProvider
Layout
Shape and formation
Steering
Effects
…
Text Effects
One of the most under rated part in almost every 3d game engine I come across is the Text effect. We DO need Text effect but it didn’t have any native support. I’ve started by doing a lot of After effect’s text effects and plugin, then trying in 3DSMax, Cinema4D, later in Processing… but I can not find one that make me feel easy to use and powerful. From some ideas borrow from those applications, I try to implement some in this framework.