Commit Graph
216 Commits
Author SHA1 Message Date
itsmattkc 526f07ba08 implemented demonstrative dip to black transition 2019-12-12 19:00:49 +11:00
itsmattkc 76c0399b75 implemented base transition support
While very much incomplete, transitions can now be created and will render
correctly.
2019-12-12 15:21:39 +11:00
itsmattkc 79c2953662 implemented track locking in the timeline widget 2019-12-11 16:34:38 +11:00
itsmattkc 7117616635 allow track muting 2019-12-11 13:54:40 +11:00
itsmattkc f46b1245c4 reduced the output of some nodes
Some nodes don't need to provide all their inputs merged as outputs.
2019-12-10 00:37:06 +11:00
itsmattkc 2fb4047e6f moved all shader code out of C++ source and into external shader files
General code cleanup and easier maintenance.
2019-12-10 00:10:00 +11:00
itsmattkc 26b3993b9d made vast improvements to rendering engine and node structure
This was many changes that were largely fundamentally related. They included:
- More const modifiers to enforce read only node graphs
- Support for fragment and vertex shaders from the nodes
- Support for node code loaded externally (embedded into the binary)
- Fixed issue preventing two textures from being used in a shader
- Removed several unused functions and cleaned up code
- Fixed video media node misreading its matrix input
2019-12-09 23:50:52 +11:00
itsmattkc 5819b451fd enforce read-only/stateless structure of new rendering system
Most if not all Node references are const now, so their state is entirely
held in the renderers rather than the Nodes themselves.
2019-12-09 23:48:25 +11:00
itsmattkc 5affc37699 added custom category and data types to transition base class 2019-12-09 23:46:50 +11:00
itsmattkc c1b96927a2 this files were actually renamed in an earlier commit but i forgot to add them 2019-12-09 23:46:15 +11:00
itsmattkc cc8aeea672 started pair of transition derivatives
These will serve as stock transitions and as a reference implementation for
hardware accelerated transitions.
2019-12-09 23:44:27 +11:00
itsmattkc 0448451bc2 fixed alpha over algorithm and node recursion issue 2019-12-09 23:43:47 +11:00
itsmattkc 4bb874a154 fix sigfpe on timecode function if the timebase isn't valid 2019-12-09 23:43:03 +11:00
itsmattkc 110c479954 Merge branch 'master' into transitions 2019-12-08 21:48:19 +11:00
itsmattkc 58bcbca4c5 wrote mechanisms that allow the tracks to be resized from the trackview 2019-12-08 15:14:43 +11:00
itsmattkc 0c6ec926b6 started base transition type
Like the base "Block" type, the "Transition" type will not be a node used on its
own, it will have to be derived. This type defines some basic behavior for a
transition (e.g. how much it overlaps its "from" and "to" blocks).
2019-12-07 02:49:30 +11:00
itsmattkc eac89cd685 fixed qobject warning emitted when TrackOutputs are destroyed 2019-12-07 02:02:44 +11:00
itsmattkc 351d4a246e use NodeInputArray for tracks as well
These were introduced for the new Block system and make just as much sense for
the Track system. They've now been implemented for both.
2019-12-06 20:34:19 +11:00
itsmattkc 9140479940 Merge branch 'master' into track-arrays 2019-12-06 19:42:26 +11:00
itsmattkc 5227e10f39 render one frame per thread for increased parallelism
If the nodes are now stateless, there's nothing stopping the renderer from
rendering multiple frames at once. Earlier since the nodes held some of their
input/output data (and that data could change per frame), it was not possible
to render multiple frames at once without conflicts. Now that the node state is
held in render threads, they can do whatever they want at any time.
2019-12-06 15:37:31 +11:00
itsmattkc a8f435bc5c started removing track_input from track 2019-12-06 04:34:03 +11:00
itsmattkc c32a1c8be2 removed last of the NodeOutput dependencies
Since all Nodes have an output that provides all output values now, we now
never need to add an output from a Node derivative. These changes remove the
last of them and disable the ability to add more outputs from a derivative.
2019-12-06 04:21:55 +11:00
itsmattkc d6247078b4 improved various functions to support nodeinputarrays 2019-12-06 03:42:53 +11:00
itsmattkc 50f7fac156 fixed signal/slot connections which had been renamed and weren't resolving 2019-12-06 00:43:51 +11:00
itsmattkc d25dda5275 removed all dependence on NodeOutputs
If Nodes only have the one output, we don't need to do so much differentiation
between them. Previous iteration used outputs as like a distinct function
within a Node (e.g. length output would return one result, buffer output would
produce a different result - each run different code to produce their results).
Now in this iteration, it's more accurate to say a Node is just one function
(which seems more appropriate for a node system anyway).
2019-12-06 00:23:26 +11:00
itsmattkc f424d8b44e rewrote renderers where necessary for new node structure
Largely conforming renderers to new NodeValue system. Code seems a lot cleaner
this way which is a nice advantage. Likely non-functional as this won't
compile just yet and still needs probably another day or two of testing to get
it back to where it was before.
2019-12-05 03:53:52 +11:00
itsmattkc 88c3bd44a5 rewrote node data types as or flags
The data types can now be or'd to match broader data types.
2019-12-04 20:26:43 +11:00
itsmattkc bae448fc32 adjusted tracklist class for new node value structure
We use references to the node directly rather than references supplied by the
object. This should be more robust anyway and will fit better in the new node
structure.
2019-12-04 20:14:49 +11:00
itsmattkc 6e49eaef9e removed data storage from input/output parameters
These will be held in the renderer structure from now on, not in the nodes
themselves. The nodes will serve more as a blueprint.
2019-12-04 20:12:31 +11:00
itsmattkc 0ad003a7f6 added new nodevalue types to cmake 2019-12-04 20:11:55 +11:00
itsmattkc bc0f01d9a3 make nodes more const friendly and prepare their functions for stateless work
Since the nodes won't be holding any rendering data themselves in this system,
we may as well enforce some level of non-write access by setting all the
functions to const. They were already const-friendly, they just weren't
labelled as such.
2019-12-04 20:10:42 +11:00
itsmattkc 9aa50175ac use existing IsTrack() function for checking type instead of dynamic_cast 2019-12-02 01:39:45 +11:00
itsmattkc 7503542286 use existing IsBlock() function for checking type rather than dynamic_cast 2019-12-02 01:37:54 +11:00
itsmattkc 07cb0bc44a disconnect input signals when destroying
Fixes a "pure virtual method" crash. The inputs will try to send invalidate
cache signals through the node while it's being destroyed if these are left
connected. There's no purpose to sending invalidate cache signals since any
nodes affected by this one will automatically invalidate the cache from its
outputs being disconnected and the node being destroyed so this shouldn't
cause issues.
2019-12-02 01:32:16 +11:00
itsmattkc 49ba65917f removed decoder and frame from Media node
The Media node hasn't been responsible for decoding in quite some time so
these objects were pointless.
2019-12-02 00:44:55 +11:00
itsmattkc 79ee3bc3df implemented new block system
Fixes recurring design issue that the Blocks were a frequent exception to the
DAG concept. The Blocks connecting to each others inputs/outputs while not
necessarily being "dependent" on each other to produce an image continually
causes issues while trying to create a rendering code path. This redesign
should provide a more "directed" approach to the directed acyclic graph.
2019-12-02 00:37:03 +11:00
itsmattkc 6314c80cbc deleted unused files
Old files that are never referenced or used anymore.
2019-12-02 00:16:08 +11:00
itsmattkc 24091f9810 explicitly destroy NodeParams in Node destructor
NodeParams used to be destroyed automatically through the QObject system, but
now that NodeParams perform actions that access the parent Node object in
their destructor, the NodeParam destructor needs to be called before the Node
has been fully destroyed. By destroying explicitly in the Node destructor we
accomplish this.
2019-12-02 00:14:33 +11:00
itsmattkc 87ac4dc357 Automatically disconnect all edges when a NodeParam is destroyed
If a NodeParam is destroyed (presumably as the result of its parent Node being
destroyed), any edge objects connecting to another param should be destroyed
or else the edge will be floating referencing a now destroyed object.
2019-12-02 00:12:45 +11:00
itsmattkc e3fdb96281 added convenience functions for working with NodeInputArray
NodeInputArray has to work a certain way internally, but it can still provide
array-like convenience functions to the rest of the program.
2019-12-02 00:11:45 +11:00
itsmattkc ef18980e7c removed connect/disconnect block functions that are unnecessary now 2019-12-01 01:38:52 +11:00
itsmattkc 8b1dab8296 moved track to take an array of blocks rather than a non-directed graph 2019-12-01 00:03:59 +11:00
itsmattkc da680094bf created NodeInputArray parameter type
It seems unwise to let NodeInputs take more than one value, but at times
it makes sense to create a list or array of inputs. This class will create
sub-parameters as an easy way to provide variable inputs while also enforcing
one connection per input parameter.

This is also the primary motivation for the previous commit (disambiguating
when a NodeParam's parent is a Node vs some other type).
2019-12-01 00:01:25 +11:00
itsmattkc 092d76f41a disambiguated whether NodeParam::parent() would return a Node* or a QObject*
Old code assumes that a NodeParam's parent will always be a Node. The function
has been separated off and tweaked in the event that this is not the case.
2019-11-30 23:58:56 +11:00
itsmattkc a478b11fd0 removed "previous_input" param from block
It was becoming inevitable to get rid of this, it was continuously an exception
that had to be made to the DAG concept seeing as blocks are never really
"dependents" on each other, i.e. the images they produce have nothing to do
with other blocks. The only exception is a transition which will also be
easier to accomplish with this slightly different design.
2019-11-30 23:24:01 +11:00
itsmattkc 7c5b50c5e7 fixed gross misusage of sampler2D
This particular compile issue should be solved, however the majority of its
function remains untested for the time being.
2019-11-30 18:29:46 +11:00
itsmattkc 44d649903c copy values whenever the cache is invalidated
Since we're now working with a separate proxy copy of the original node graph,
if the user changes a parameter in one of those nodes (triggering an
InvalidateCache signal), the values in our copied graph need to be updated
with these new values too.
2019-11-23 17:06:49 +09:00
itsmattkc 1bc8a20425 never send signals while nodes are still locked
A signal emitted and received in the same thread will call other functions
before returning to the one that emitted the signal. If these other functions
try to lock a mutex while a mutex is already locked by the emitting function,
we get stuck in a deadlock. These changes ensure that a signal is never emitted
by any function until all the nodes locked by it are unlocked.
2019-11-23 17:04:33 +09:00
itsmattkc 2cfccbfbef copy node graph before rendering
Previous iterations would use mutexes to prevent changing of the graph
mid-render, however several user actions would need to capture these mutexes
causing the main thread to hang until the current render job (frame/range of
samples) was complete. We now copy the nodes necessary as part of the "compile"
process so that the main thread shouldn't need nearly as much blocking while
caching occurs.
2019-11-23 08:53:52 +09:00
itsmattkc b233aa5319 added signal for an edge changing that can ripple through the graph
Useful for detecting when a graph needs recompiling, in tandem with the
"InvalidateCache()" signal when necessary, this signal ripples through the
nodes when any of the connections change which will likely need handling by
the renderer.
2019-11-23 08:51:15 +09:00