Another UMC side-thread - Printable Version +- The VG Resource (https://www.vg-resource.com) +-- Forum: Creativity (https://www.vg-resource.com/forum-126.html) +--- Forum: Other Creativity (https://www.vg-resource.com/forum-130.html) +--- Thread: Another UMC side-thread (/thread-26342.html) |
Another UMC side-thread - Tcll - 12-13-2014 Short Description: Universal Model Converter (UMC) is a simple tool for allowing noobs and hackers alike to write SMALL scripts for importing and exporting 3D model formats. It's designed to help port models between programs while being much easier to write scripts for. more info here ^the OP is oudated 3.0a is the current version I'm working on which has been deemed as scrap. (this version supports models, images, and compression) ^animation is not entirely possible in this build, though the interface-format CAN roughly support it. 3.0 is the future intended version which claims it's scripts are so easy to build, you need at least 73% less code than a Blender26 script. anyways, not trying to advertize or anything, this is just a side development thread for anyone here who's interested in my project. (no hastle or stress from having to post over at SB or my forum) the documentation for building scripts for UMC can be found here: (it's still very much unfinished and only lists the functions supplied by the interface) http://tcll5850.proboards.com/thread/182/layout make sure JS is enabled, everything visual is done via forum-plugins regarding trackers and blocked web content, all I have is harmless tracking and advertising done by google and PB (my forum's host) (I'm not one to do malicious acts or provide malicious content) what can UMC do currently? here's a few images showing off a few things for the next update to 3.0a my favorite star from Kirby Air-Ride: my favorite fighter from SSBM: ^ignore the lines, those will be removed on the release here's a better image: (older) ^not sure what's causing the texture problem, though it will be found SSBM Bump maps: (WIP) ^NOTE: SSBB does not have this I've described the HAL-DAT format pretty well here: http://wiki.tockdom.com/wiki/HAL_DAT_(File_Format) my best fighter from Brawl: ^again, ignore the lines PNG images: (and ~50 other formats) the displayed import buttons and scrollbars currently do nothing. (the GUI is a piece of trash in this build, partly because of SDL) the top panel is the only thing with working widgets. Ctrl+I to import and Ctrl+E to export I'm sorry this update doesn't do more. the viewer can't be easily made to support animation w/o a major update to the internal format. (I was a noob when I wrote it) 3.0 aims to fix alot of the stuff that plain can't be done w/o alot of hastle in 3.0a but 3.0 won't be out for quite a while as I'm learning new tricks every day. so 3.0a is just to give everyone a solid interface to work with until 3.0's release I hope UMC will really make a place here as it's designed for both noobs and pros for 3D hacking/programming. RE: Another UMC side-thread - Tcll - 12-13-2014 just wanted to note, if you have any questions, feel free to ask and also keep in mind, your ideas matter and will always have an effect towards UMC's development if you have any feedback what so ever, even if you think it sounds dumb, feel free to post this is a side development thread, so anything goes here. EDIT: also wanted to note I have a skype group discussion, if you'd like to join in for anything on: - helping out with UMC (any aspect of it, not just scripting) - learning a good portion of how to program in python, and roughly OpenGL (my knowledge here is very choppy and based on old interfaces) - any other discussions (such as advanced technology) that randomly go on in the chat (it's not a boring limited chat) all you have to do to join is add me to your skype contacts, and notify me that: - you're not a bot - you'd like to join the UMC Group Discussion my skype is rather obvious Tcll5850 (DarkPikachu) again though, let me know you're not a bot or you may get spammed to the point of crashing your skype client... heh (I've had at least 8 bots try to contact me) RE: Another UMC side-thread - Struggleton! - 12-13-2014 This is coming along quite nicely. Very good RE: Another UMC side-thread - Tcll - 12-14-2014 thanks also wanted to note, when I said to "ignore the lines", here's why ^it displays the bone parent/child relations in negative color (I figured out how to do it easily) code from the bone display-list function: Code: those lines were the bone-tails, which were meant to display bone rotation and scale. while 3.0a now currently has bone head/tail settings, displaying that data is still not well known. (3.0a's interface is scrap for just that reason, the data handled must be in world relation for everything) RE: Another UMC side-thread - Tcll - 12-15-2014 hey nub, I'm redesigning UMC's module interface to support the new header functions. I need a Tkinter popup dialog with selection buttons for shared filetypes, kinda like something I had before: think you could do better than me and actually make something that works?? (have the buttons return a feedback and close the dialog) I can't do crap with Tkinter... heh EDIT: in the mean-time I'll just do a console selection... heh EDIT2: hey nub, forget my request! I'mma reverse-engineer askopenfilename and asksaveasfilename and make my own classes by revising the current src askopenfilename will be changed to Open() and will return the filter name along with the file(s) EDIT3: so much for that... T3T command = "tk_getOpenFile" s = w.tk.call(self.command, *w._options(self.options)) tracing that back, 'tk' is part of a root module _Tkinter, which is imported in Tkinter.py >3< meaning what I need access to is compiled into the interpreter's backend >3< so I can't make Tkinter's file dialog return the filter... ugh I'll see if I can find an alternate tomorrow... (something small that can do what askopenfilename can do AND return the filter) this sucks and blows >3< EDIT4: for anyone who's interested, I've posted my revers-engineered code here: https://www.daniweb.com/software-development/python/threads/489079/prompt-for-file-with-filter-return it should work just a tad better than the original functions as you're not forwarding through 3rd-party interfaces, and have a little more control. EDIT5: you know what... WTF am I doing... I've been wanting to make UMC's import button work for so long now, and having to redo the way scripts are handled give me the perfect opportunity to do so. so UMC's UI will handle opening and saving files. RE: Another UMC side-thread - Tcll - 12-17-2014 fixed up a little issue with the GUI: nothing looks different right? think again... earlier with UMC's Layering update to the GUI, I'd previousely ran into an issue with the font: (textured quads as display lists seems to be a standard for OpenGL font display) this issue was previousely fixed by using a quad on the active stack-layer as the BG for that font: but that in itself was the problem I've fixed now, so I don't need that extra quad the issue was the priority, or the stack-overlay-layer the font was drawn on, which should've been the base priority and instead was the widget priority, which Z-clipped the panel quad causing a transparent-BG appearence of the text. EDIT: though I must mention, this fix is almost irrelevent as I'm redoing the GUI so I can have a little more ease towards building it... right now, every small little action the GUI does has to be manually scripted as the interface is controlled with functions. what I'm doing to update the GUI is turning the widgets into classes and automating things a bit better, which should also cut down on the amount of scripting needed for GUI.py EDIT2: this issue is not related to this forum RE: Another UMC side-thread - puggsoy - 12-17-2014 Post that forum error in the Errors thread, along with your OS and browser. RE: Another UMC side-thread - Struggleton! - 12-17-2014 (12-15-2014, 09:56 PM)Tcll Wrote: hey nub, I'm redesigning UMC's module interface to support the new header functions. I can surely try to create something. Do you want me to do it in PyQt? or Tkinter? btw he refers to me as BrawlNub on the chat edit: saw edit5 RE: Another UMC side-thread - Tcll - 12-17-2014 thanks, and while I could kinda get a PyQt gui going, I asked for Tk but even still, screw that ;P I'm going full-out with OpenGL, I just need a little help porting the widgets to classes so I'll have less work to do. (all I need to know is the hierarchy for building a proper GUI and I'll be set) but as for right now, here's the code for my simplest widget: (the Toggle-Button) Code: def __RemoveTButton(Na,priority=0): yea, everything's just functions, except for the main layer and widget classes. the original design of the GUI (as those 2 classes are modifications) consisted of nothing but functions as I didn't know how to work classes, or even decorators back then. decorators are easy they're just special wrapper functions: def wrapper(f,v): f(*v) # I think this is right?? >.> @wrapper def func(v): pass func(1) is the same thing as: def wrapper(f,*v): f(*v) # I think this is right?? >.> def func(v): pass wrapper(func,1) EDIT: also, some useful info for functions >>> def f(a,b,c): print a,b,c >>> d={'a':0,'c':1,'b':2} >>> d {'a': 0, 'c': 1, 'b': 2} >>> f(**d) 0 2 1 >>> I don't always syntax highlight, but I often try to. that syntax style can be found in IDLE, Python's native IDE RE: Another UMC side-thread - Tcll - 12-18-2014 good news, my awesome brain came up with something Code: class _SelectBox(_Widget): it's far from finished, but should work better than before I'mma see if I can cut down on the CPU usage a bit more the draw-code is gonna be the hardest part here. you see the parts with this.layer[0].stack[this.p2] take a guess at what parses that. the reason that's gonna be hard is because I'm already removing what's not drawn... so the best I could possibly do is optimize. one big area that needs alot of work is the update code, as that's about half the current CPU usage... heh why CPU and not GPU if GPU is so much faster? because I was a noob when I built the interface and followed tuts on GLUT and SDL... so the interface currently CAN'T run on the GPU any more than it already is... wait for 3.0 where I'll have shaders to hopefully pass the whole draw-code to the GPU btw, SDL sucks. it clears the GL context on a video resize event, forcing you to have to rebuild it. it also gimps your mouse usage, but luckily I've worked around that. what's better? take a look into GLFW it's SDL+freeglut (no limitations) I can't promise I'll have GLFW support on the next release of 3.0a, but I'll try for it. EDIT: btw, if anyone wants to watch me code the new GUI, it's actively sync'd from my compy here: https://copy.com/vBWPp0VGzmk6dWuK ^ every Ctrl+S I make goes there, so you get the src fresh from my compy for the old GUI (which still works), you can find that here: https://copy.com/p6N0xfn6oA3plh3O good luck trying to understand it though NOTE: in UMC3.0 this will be a plugin, meaning it can be removed, and UMC will still run w/o it. WIDGETS.py won't work w/o GUI.py though which provides the widgets for UMC-scripts. basically, that's what the CMD var in the import/export functions will be used for RE: Another UMC side-thread - Tcll - 12-27-2014 first test of the GUI remake: (I ported it so that now it uses classes instead of in-line functions) ^ makes event handling a crap-load easier and takes quite a load off the CPU yea... there's alot to be fixed... first thing you'll notice is that hit-defs don't resize properly... next you'll notice the buttons have no BGs something you won't notice by image is the gainFocus() event (hover your cursor over a widget) breaks the UI this is all being worked on and will be fixed (and then some) by the release EDIT: update: everything works so far except fonts. what you're seeing in yellow is an active hitdef EDIT2: update: finally got the fonts working I'm a freakin retard... heh SDL sucks because it clears the GL context on video resize, which was causing each font character to have a list ID of 0L. what was I doing? I had the font creation code in the GUI-init code which was being deleted by the initial window creation. so I moved the code to the GUI-resize code. if SDL worked properly, I could keep the font creation in the GUI-init code this is why GLFW is better (for being as limitless as SDL in not hijacking your run-loop) RE: Another UMC side-thread - Struggleton! - 12-29-2014 As of now, we're working on a way to allow users to get updates in a nice way RE: Another UMC side-thread - Tcll - 12-29-2014 no this isn't the updates system you're seeing in my screenshot... that's a different interface for UMC-scripts and such what we're talking about is just the UMC run-time interface and data/ modules... I don't think it's possible to make this update to version 3.0 though, but beyond that we'll be as free as needed EDIT: just posting some GUI progress before I call it a night everything works properly so far except: - bottom and top panels don't yet resize when side panels are closed - panels are not yet hidden when options/updates are open oh and an old issue that's been for quite a while... heh - VIEWER controls are active while options/updates are open but a video resize event resizes the panels properly RE: Another UMC side-thread - Tcll - 01-01-2015 finally working on the import dialog I'd planned since dev4 though I won't say the layout will be the same as planned... tbh, I never really had a solid plan for the layout, so for now I'm just gonna do something very basic and keep it quite similar to Tkinter. though the scrolled dialog for selecting your files will just be made of buttons. it's kinda sad to realize just how pointless this update is though when everything will be ported to shaders in 3.0 (that should say something about just how simple my GUI really is) would be nice if display lists weren't deprecated already... but using them very inefficient on your MBd as is... heh EDIT: lol every time I break this thing, I keep making it better XD my code for my UI class is getting to be a bit bulky and hard to edit, so I've decided to split up the panels... in doing so, I broke the very framework that handles the GUI-layering... the problem was I had to define each layer and stack before I could use it, otherwize the interface would throw a KeyError exception. so what I've done now was automated that part and removed the limitation of a fixed order. meaning you can do this: layer(1).stack(0).AddQuad( ... ) # this draws last layer(1).stack(5).AddQuad( ... ) # this draws next layer(0).overlay(2).AddQuad( ... ) # this draws first normally this would throw a major key-error and cause the interface to cough, even when recompiling the UI display list. but now everything is automated and you no longer need stacks 1 through 4 or overlays 0 and 1. all the stack does is determine the position on the current layer and draws from top to bottom. (5 to 0) RE: Another UMC side-thread - Tcll - 01-29-2015 this is starting to look more like a legit file dialog now and oops, I messed up with the text and used the widget names... lol that's a simple fix soon enough this thing will be functional, and I can start working on the rest of the UI |