Issues.00053 - lordmundi/wikidoctest GitHub Wiki
Summary: Allow nodes to be dynamically added (and maybe even deleted)
Created: 2007–08–20 14:25
Status: Submitted
Category: Request
From: smermel
Version: 1.1
Released_In:
Description:
I know there's likely a lot more code to it than just the front-end, but EDGE's capabilities would grow considerably if we could add a little bit to the tree editor.
I'd like the ability to dynamically add (and possibly delete) nodes to the node tree. This would make scene creation a lot easier (for those few who want the ability to create scenes). From a user perspective, I could understand it being a definite nice thing. From a coder perspective, I can imagine there would be some challenges. Still… sure would be nice.
The popup panel that you'd need for a new node input would probably not be too tough, but if you all are strapped for workers, within a few days, I can whip out a prototype for y'all to tweak. Just let me know if you want it. Actually, I could take care of all the UI stuff. All I'd need is the ability within Tcl/Tk to have functionality a la: doug add_node {parent} <span style='font-size:83%'>model file_name] [-xyz x y z] [-pyr p y r] [-order PYR|PRY|YPR|YRP|RPY|RYP] [-layer BACKGROUND|SCENE|FOREGROUND] [-priority val] [-lod SIZE|DISTANCE|SELECT|TIME size|dist|obj_id|duration file_name]
. Does this functionality already exist? If so, then consider this a request very quickly satisfied. *:
I believe dynamic tree modification (meaning adding or deleting) is one of the things Brad sacrifices so that his tree traversal math can be more optimized. I'll check, but I believe this sacrifice was made long ago and has roots into the deepest DOUG rendering code. — frankie August 20, 2007, at 03:14 PM
You are correct Frankie, it comes from the fact that on the old SGI's for which DSP "DOUG" was originally developed, the best performance was obtained by organizing the data into linear arrays, this made the best use of board and cpu level caches. Also since DSP was originally designed as a real-time display driver it did not need the extra overhead of dynamic node creation/deletion. It might be possible to enable some kind of editing ability by having a donzen or so nodes of each type defined with names like USER_MODEL1 USER_MODEL2 … USER_MODELn that could be remapped to user specified names inside of a builder gui of some kind then when the scene graph is written out the user supplied names would be substituded instead. A list of deleted nodes could be maintained so they could be turned off so they are not rendered and not outputed when the user goes to save off the scene graph, there would need to be some code development especially if the dsp_speedtest renderer is used since it builds a large data buffer containing all the scene's geometry that gets downloaded to the video card's local video memory before rendering begins, it would need to be able to rebuild and download that data whenever the user attempts to add a model node at run time. Possible (all things are possible) but not trival to implement. — brad August 21, 2007, at 01:20 PM