• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

Universal Model Converter - Side Development Thread

left or right? (a 20x20 toggle at the top of the window)

  • Left (under the window icon)

    Votes: 23 53.5%
  • Right (under the X button)

    Votes: 20 46.5%

  • Total voters
    43
  • Poll closed .

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
ok, so I need ideas...
I want to make UMC as moddable as minecraft...

the purpose of mods are pretty much downloadable/extendable modifications to UMC's backend and frontend interfaces.
these mods (if done well enough) may actually be implemented directly in UMC

this was something I'd planned for a while, but didn't exactly have the means nor knowledge to pull off.


so anyways, I'm trying to figure out every possible use for mods so I'm sure not to leave anything out :)

if anyone was to mod UMC, how would you mod it?? :)
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
just to update, I'm currently working with gribouillis to get all the info I need for SIDE's Go button
https://www.daniweb.com/software-de...-do-i-make-a-class-instance-act-as-a-class/3#

nearly got a full-out interpreter to gather debug info :)

I'm also redesigning a few interfaces taking mods into consideration using a global moddable decorator.

I'll likely get more in-depth later with moddable sub-decorators, but what I'm conflicted with is using multiple sub-mods to 1 function.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
idea for some new data types for UMC

mtx22( t=bf32 )()
mtx33( t=bf32 )()
mtx34( t=bf32 )()
mtx43( t=bf32 )()
mtx44( t=bf32 )()
mtx( r,c, t=bf32 )()


idk why I hadn't thought of that before

this should make things loads easier :)
(especially with a matrix being it's own data type)

I'll include vectors as well:

vec1( t=bf32 )()
vec2( t=bf32 )()
vec3( t=bf32 )()
vec4( t=bf32 )()
vec( d, t=bf32 )()


EDIT:
the `t` is for the data type.
by default this is `bf32`

EDIT2:
just to note, this is a very easy implementation, so it should be available by the release :)

EDIT3:
[11:44:27 PM] DarkPikachu: in 3.0 you'll have extended functionality:

v = vec(4)

#vert:
v.x
v.y
v.z
v.w

#normal
v.i
v.j
v.k
v.h

#UV
v.s
v.t
v.r
v.q
[11:44:52 PM] DarkPikachu: v.x == v.s
[11:46:24 PM] DarkPikachu: that's the limit though as the 5th dimention is either not solid or unnamed
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
just got an idea for an in-line switch/case method for use with automation :)

switch( test, cases={}, default=None )

at the very moment the method is a tad complex and dirty, but it should work as so:
Code:
switch( test, {
    0: *code object*,
    1: '''
        #code
    ''' })
not exactly "simple"... IK

to obtain a code object, just use a function to hold your code:

Code:
def case0():
    if myTest==3: pass

value, myTest = 0,3
switch( value, { 0: case0.__code__ } )
yea... not exactly clean...
I'm trying to figure out a better method than using a multi-line string, but that seems to be it so far... heh

ok, screw the __code__ method...
it's the exact same thing as calling the function, which I intend to implement:

Code:
def case0():
    global myTest
    if myTest==3: pass

value, myTest = 0,3
switch( value, { 0: case0 } )
so everything you'll have available:
def func(): # func must be executed with no arguments.
....# your code here.
....pass

switch( bu8(), {
....0: func,
....8: '''
# your code here.
pass
'''
} )

I'll try to make SIDE identify these and apply syntax highlighting
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
speedup: (it was known logging was slow, and I've finally found and figured out how to do something faster) :)

converted:
__LOG("%s: read 0x%s as %s%s'%(p,''.join([__hx__[v] for v in DATA]),str(val),label))
to:
__LOG('%s: read 0x%s as %s%s'%(p,(("%s0%ix"%('%',5))%556).upper(),str(val),label))

same thing I was doing for SIDE's hex viewer line addresses :)
 

premwill

Smash Rookie
Joined
May 20, 2015
Messages
1
Hello, I saw that your program allows .dat files to be imported and then exported. However I'm not using ssbm models, I'm using .dat from naruto on gamecube. Is there a way for me to get this to work on this because I ultimately want to get the models out to brawlbox. heres my error: http://imgur.com/mOs9xmn.png
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
and then exported
eh... even to this day (being a noob and all) I'm having issues achieving that, but as for back then, the export would not have been what you were expecting.

take note of the version you've downloaded (dev 4.5)
that version is packed full of issues which have now been resolved, however new implementations have caused even more issues.

the update to 3.0a is soon to be released, however I'm currently having issues trying to get an accurate MTX44 from Nintendo's LRS coords from DAT, MDL0 and now even VBN (from Sm4sh)...
from everything everyone's told me (Brbx's src is correct), I'm still getting non-invertable matrices from the supplied data.

5 sources still have yet to respond to me on this issue. (I have no idea what I'm doing when it comes to this area)

once that's resolved though, you can expect a few more easy implementations before the first release of this 3.0 function port :)
 
Last edited:

tatatat0

Smash Journeyman
Joined
Jan 28, 2015
Messages
412
Heres what I suggest you do.

Trying to make it be able to convert all these obscure formats is going to take forever.
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
heh, thanks, but tbh, the actual support for everything there comes from the scripts themselves...
what I'm working on is providing a single backend common interface with the little 3D knowledge I have...
(think of it as if I'm rebuilding OpenGL for a conversion environment)

as of dev5, the extended support is already beyond possible for many more formats to come.

my interface provides a simple and extendable scripting frontend (similar to OpenGL's FFP), which gives me the freedom to do what I need while keeping things simple for people who want to write scripts to extend UMC's support.

my only problem... I never made it to geometry class in school... heh
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
so in recent news, I've made a massive collaboration interface update using Sublime Text with Floobits, which seems to currently be alot more reliable than Nitrous.io

I've been told and told from coutless developers that Sublime Text is by far the best IDE to use with any programming language, and to a point I can agree...
like UMC, Sublime's extendability gives it it's power.
if I can find a plugin that works as well as Python Tools for VS2010 (intellisense specifically), then I'm 100% sold on it.
the good thing about intellisense alot of developers seem to under-rate is not having to go through and constantly profile your massive code,
and is the reason I complain when python IDEs don't have decent intellisense (Eclipse + PyDev sucks)


so what's the whole point of floobits?
basically, imagine 5 people working on the same file with you, where you can actively see and review their edits while making yours.
it's hundreds of times faster and more productive than Git or SVN.
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
btw guys if I ever start to unknowingly fall into a realm where my development starts to take a turn toward corruption, please, by god, let me know!

I freakin hate money for the very reason of corruption, and it's exactly why I hate Windows (above XP), among other things.

if you start seeing things in UMC that look like gimmicks or anything (which I personally would never knowingly do),
please tell me because I'd be blind by some other idea!

hopefully it never happens where something isn't right (it's highly unlikely as is), but this is just in case I'm blind to something.

please explain too because it'll be hard to steer me off a set goal without it, with it though, I'll most likely jump right off the bad path. :)

I don't want to build something bad and be just another disease like the many developers on the internet.
I'm building UMC because I want to do something good for everyone and provide something w/o a lack of common sense (like many programs have, especially on linux).
originally, yes, I wanted to build UMC for myself, but what good would it be if I was like the other losers out there and didn't give myself any gratitude by not sharing it.
(I freakin hate selfish diseases like Sarah Harp with her Melee converter you had to buy, and she wouldn't share her knowledge)
^ she had a working Melee converter before Jahra!n started his (the brute-force one I dissected to start MAV)

there's many more people I could name off who don't deserve a computer, or the knowledge they have, but I'm not one to pursue revenge for it.
as such, I'm not naming anyone. (please don't pick on Sarah either, I only named her as an example)
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
well, after Copy's stupid web UI confused me to the point of accidentally deleting my entire repo folder, I've had to restore everything with Copy's nice undelete function.
unfortunately this means I've also restored all of the corruptions Win7's self-infecting services did to UMC, so I've been going through the work of restoring everything and am almost finished :)
I'm pretty much back to where I was, but with the added corruptions... heh

so I'm finally getting somewhere thanks to transformations.py:
PT: HAL Labs

UT: HAL Labs 2

I have no idea why the bones are in different locations... the supplied data is supposed to be the same :/
I also have no idea why the verts are still in their default locations with the UT script >_>
I can only assume 0-matrices

but yea, all of this didn't come w/o issues... heh
first off, I've found a name error in my GUI which crashes UMC:
Code:
Traceback (most recent call last):
  File "Z:\media\tcll\copy\Tcll\UMC_workspace\UMC_v3.0a\API.py", line 62, in run
    VIEWER.Init()
  File "Z:\media\tcll\copy\Tcll\UMC_workspace\UMC_v3.0a\data\VIEWER.py", line 1009, in Init
    __GUI.__Motion(x,y,rx,ry)
  File "Z:\media\tcll\copy\Tcll\UMC_workspace\UMC_v3.0a\data\GUI.py", line 2219, in __Motion
    if not W.hasFocus: W.gainFocus(); recompile = True
  File "Z:\media\tcll\copy\Tcll\UMC_workspace\UMC_v3.0a\data\GUI.py", line 661, in gainFocus
    def gainFocus(this): _Widget.gainFocus(this); layer(this.l).stack(this.p4).primitives[this.sbsbbna].Color(*theme.BGTActive)
KeyError: 'ScrollBoxDisplayScrollBarButtonQuad'
and secondly some priority issues between COMMON and FORMAT causing ugeSetImageData() to cough:
Code:
Error! Check 'session-info.log' for more details.

Traceback (most recent call last):
  File "Z:\media\tcll\copy\Tcll\UMC_workspace\UMC_v3.0a\data\VIEWER.py", line 742, in _ImportModel
    script.ugeImportModel(filepath.split('.')[-1].lower(),None)
  File "scripts\MDL02.py", line 426, in ugeImportModel
    ugeSetImageData(Texture_Name)
  File "Z:\media\tcll\copy\Tcll\UMC_workspace\UMC_v3.0a\data\FORMAT.py", line 1161, in ugeSetImageData
    d = _glob.glob("%s\\%s.*"%(COMMON.__d[COMMON.__c],Data)) # continue with the first supported format
AttributeError: 'module' object has no attribute '__d'
so yea... I got alot of cleaning up to do... heh
guess that's what I get for continuing to work on a trashy backend :p
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
found the GUI issue:


those display panel hitdefs are supposed to be disabled!
hovering over any one of them will crash UMC.

how to break:
- close the display panel (hitdefs disable properly)
- open a file dialog (hitdefs still disabled)
- close the file dialog (the hitdefs are wrongly enabled at this event)
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
ok, fixed both issues and something new happened:

^ never got the bones before

KAR City Trial also has a few differences where a few textures draw better, though it's nothing significant
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
ok, I really need someone with 3D game development knowledge to help me out D:

I'm getting impatient and all of my sources aren't responding...

anyone know a good place I can ask for help??

I may just pop a Q on the OpenGL forums >.>
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
ok, so I've managed to get HAL Labs 2 to match the bone outputs from HAL Labs

the problem in the earlier images was the order in which the data was applied, so now it's applied the EXACT same as in HAL Labs

Hal Labs 2:

........ugeSetBoneRot(*bf32(['']*3)) ##
........ugeSetBoneSca(*bf32(['']*3)) ##
........ugeSetBoneLoc(bf32(['']*3)) ##


Hal Labs:

........ugeSetBoneLoc([LX,LY,LZ])
........ugeSetBoneRot(RX,RY,RZ)
........ugeSetBoneSca(SX,SY,SZ)


however, I have a new problem being that my functions don't work correctly...
* can't find HL_Bones.png *
ugeSetBoneRot( RX, RY, RZ ) works different compared to ugeSetBoneRot( [RX, RY, RZ] ).
most of the bones are positioned quite differently, for example, Pichu's ear bones are farther apart when using a list.

gotta love it when you have no idea how your functions are even working... time to scrap and rebuild all 3 of them. 9_9

EDIT:
just to show off what's going on exactly:

Hal Labs:


Hal Labs2:

^still not sure why UMC's not transforming the model... I can only guess the weights aren't being supplied >_>
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
ok, so I'm changing UMC's functions using a new registration method to help fit the functions to the new 3.0 interface:
Code:
register( 'myfunc', 'args', '''
    x = None
    return x
''')
I might actually do this to 3.0's interface as well, this is much more automated, where I was doing twice the work in the new interface :)

also, apparently things are working properly with both my MDL0 scripts as I get the same error when trying to import Brawl Pika, which is the same issue I had with Pachirisu... heh

anyone think they can help me fix the MDL0 script??
I just need the weights explained to me (been trying to get help from BJ for a few months now, but he's been too busy... heh)

yea, my code in my MDL0 scripts is completely wrong, and shouldn't have worked before... lol
I'm amazed it took it this long to start not working XD

EDIT:
IDEA FOR NEW SCRIPT TYPE!
might be implemented by next update as it's a very simple implementation :)

Encoding scripts (for strings or data)
F python's encoding interface, mine will be much more easily extendable ;)

EDIT2: well forget that whole register() function above, apparently a decorator is all I needed.
(I thought decoraters were referenced on call, not on definition)
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
so I've started integrating fonts using pillow instead of pygame.
yes, I'm working towards replacing SDL with GLFW so things can be much nicer like they were with GLUT.
the fonts were the hard part, the rest is just tedious... heh

the only problem I'm having is pillow doesn't seem do be able to do transparency or antialiasing like pygame, so I'm stuck with bitmap characters with no transparency...
so for the first test, everything looks like this:

adding transparency manually is as easy as testing if the glyph pixel is 1 or 0 (there is no in-between because this is basic bitmaps)
^OpenGL might be able to do this for me, along with antialiasing.

oh yes, and the alignment... lol
that should be fixed quickly ;)

either way, once released, it should look nearly the same as before :)
may or may not anti-alias for performance >_>
it's in a display-list though, so it might not matter... heh

EDIT: here we are, much better:


the code:
Code:
    glyph = F.getmask(s,'L') # 'L' for antialiased glyph
    GW,GH = glyph.size # inner glyph size

    data_w, data_h = F.getsize(s) # max image size (TODO: test if glyph width is larger)
    data = [[0,0]]*(data_w*data_h) # full size image

    OH = data_h-GH # get overflow height to push the glyph down by

    if GW<=data_w: # if the glyph is smaller than expected
        for y in range(OH,data_h): # fit glyph in image
            for x in range(GW):
                data[(y*data_w)+x] = [glyph.getpixel((x,y-OH))]*2

    else: print "'%s' glyph is larger than allocated data"%s

    data = bytearray(sum(data,[])).__str__() # turn the data into a large string for the OpenGL IA-image
in the first image, I was only getting the glyph sizes, not the full text sizes, which is why the characters jump around like they do

but I'm still having a few issues:

'j' glyph is larger than allocated data
'ε' glyph is larger than allocated data
'∩' glyph is larger than allocated data
'°' glyph is larger than allocated data

looks like it's all unicode glyphs, but it still needs to be fixed :p
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
good news, UMC's viewer might soon be getting an update to support animation! =D

I've recently gotten in contact with the developer of freetype-py
(reporting an issue regarding failure when loading freetype.dll from a portable location)
anyways, we got in a convo, and he's interested in UMC and helping me with it =D
turns out he's all about the new modern OpenGL interfaces and hardly knows anything about the FFP.
so with his help, we just might see animations (actions and shapes) fully supported in 3.0a =)

EDIT:
here's one of his works btw ;)
https://www.youtube.com/watch?v=ZypYJshzQEA
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
ok, so the port to GLFW was a success :)

all I have left to work on now are the events.

also, I've been having issues with fonts on my secondary...
I thought the port to GLFW would fix it, but apparently not...
so I've gotten the window to display while the fonts now reference an empty display list.
(actually the reference is None with a size of 0,0)
not sure if this will be fixed before the release, but at least it doesn't crash now...

EDIT:
on linux it's fine... it's just on my secondary that there's no fonts.
Intel sucks
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
success!

NO MORE PyGame/SDL!

I've completely deleted the folder, so the pygame window manager is no more ^_^
resizing UMC's window no longer needs to re-create the GL context!

GLFW actually has alot more support than I thought, such as scrolling using a touch pad.
I'mma have to make a few changes to the GUI's event handler before I can support that properly

I no longer have mouse buttons 4 and 5 >_>
instead those are mapped to a scroll callback with Y-coords being 1.0 or -1.0

I've also had to redo the mouse movement as I no longer have relative coords, used by the GUI
so yea, I'm doing those manually as well...
but on the bright side, scroll-boxes are now much more accurate when dragging the scroll button :)
I'm tried to throw the thing off, and now I can't :)
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
ok, so I actually managed to get an import on windows:

^I freakin pulled my hair out guessing the files and scripts (they're not in the same order as linux),
but I actually printed out the directories to the console

I have NO IDEA why fonts aren't rendering... GL returns an invalid value when creating the texture images for the fonts...
I think it's because I'm using Intel, but IDK...
I've gotten it working once before, I can do it again
 
Last edited:

dfanz0r

Smash Rookie
Joined
Jun 1, 2015
Messages
3
So hello everyone, my name is Matthew(or Matt don't really care which), I might be helping out with stuff here and there on this project. I'm not completely sure how much time i will be have to work on this since I have quite bit of stuff in general to do.

Currently I have looked at getting the code running natively on more than just windows. Up until now it's been mainly running through wine for Linux. Overall there hasn't been many issues in my efforts so far. Here is a screenshot showing it running on Mac OS X. Main thing that doesn't work yet is importing but the UI works flawlessly (after the GLFW port :p).
 

dfanz0r

Smash Rookie
Joined
Jun 1, 2015
Messages
3
Oh and something i forgot to mention i'm not "the" developer of freetype-py only an occasional contributor :p
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
so UMC has been undergoing a little restructuring and now has an app/ directory where data/Python/ is no more.
app/ is strictly for UMC's interpreters and is actually optimized with minimal pyhon specifics.
what's good about this is it'll be alot easier to add an x64 interpreter :)
so easy in fact that x64 support might be available by the release ;D

I currently have to rebuild my launcher (UMC.exe) due to the change, so I've back-stepped to using a BAT for now... heh

note: just like data/Python/, app/ is also not for users...
anything here will not be updated normally, as it's not likely I'll need to update UMC's interpreters.

also, I've gotten freetype-py working portably, so no more ugly fonts coming soon :)
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
oh ok... I just found out portable python is win32 only >3<

so I've just requested win64 and linux and mac x86 and x64.

yes, linux, when mos linux distros come with python pre-installed.
take note, linux CONSTANTLY changes, so just because linux includes python27 now,
that doesn't mean it won't be removed in a distro 2 years from now.

another good thing about including the interpreters is the use of less space.
in python, Lib/ is the biggest folder, which is removed from each of UMC's interpreters and placed in a common location used by all interpreters.
basically, a win interpreter is only 18MB with only the base libraries.
all of the unneeded stuff, such as IDLE, has been removed.

Q: well why not download what's needed instead of bloating your download.
A: downloading the requirements, with all that's needed would actually take a few minutes, up to 30 or so depending on your (uninterrupted) connection.
plus again with the space requirements, if you're not going to use python, why install it, with all the junk it has (including the extensions), just to run UMC?
I find it better, with less use of overall space just to include everything needed and get rid of the junk.

UMC's repo size is only around 150MB
I could estimate the actual release size being around 80MB

so yea, I'm doing things as smart as possible :)

later on I intend to optimize even more and have UMC auto-detect your OS and replace the current interpreter, which will save even more space ;)
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
well here's a little surprise, something that used to give me issues now works perfectly:



I have no iea what fixed it >_>
 
Last edited:

dfanz0r

Smash Rookie
Joined
Jun 1, 2015
Messages
3
Alright, so yesterday i went and fixed all of the issues in having umc working on mac os x. It loads models now. The rendering corruption still needs to be looked at though.
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
it's because it's a crummy intel chipset :p

just look at the fonts on my windows compy.
good luck XD

^ intel chipset :p
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
here's some nice info

ideas for a new more intuitive UI layout

the model panel will become the I/O panel
there will be radio buttons to select your script-type:
- model
- animation (disabled)
- image
- archive (disabled)
- script (disabled)

and exporting will allow you to select what data is exported.
(this was planned already, which was the purpose of the first scrollbox in the model export tab)

the animation panel will become the data management panel.
I'll throw in features to swap and re-arrange items if I can.
basically this will be what I had planned for the model manage tab, except now it will be able to handle:
- models (duh)
- textures
- animations (disabled)
among other things to come.

the data panel is only meant to show you what links to what and where (even showing you invisible objects or improper data)
it's not meant to edit the data, that's what the bottom panel (which I earlier called the control panel) is for.
but heck, R-click editing options and click-drag re-arrangement can be done :)

I'm keeping the UI light because:
- of how much I plan to add
- I want to keep things easy for noobs (not implementing too much magic clutter like 3DS Max's overwhelming UI)

hey things will get good, just gimme time to figure out how to put 2 things together into 1 gorgeous thing. ;P
lol

ideas are always helpful :)
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
if anyone wants to help, I need ideas for a simple archive system.

the basis is easy, but the problem I'm having is a solid method to associate the data with a specific script...

here's an idea I've currently got:
Code:
def ugeImportArchive( FT, CMD ):

    archiveName = ugeGetFileName()

    for i in range( bu16() ):
        dataName = string( bu8() )
        data = string( bu32() )

        File = ugeTempFile( dataName )
        string( data )

        ugeRegisterFile( File, UGE_MODEL_SCRIPT )
        # ^ if more than 1 script is associated with the file format (extension), you will be prompted to select a script
        # if the format can't be identified, you will be prompted to select a script from every avalable script

        ugeSwitchFile( archiveName )
I can't reference a script by string because the interface is for noobs, where the name would constantly change in some cases.
(I'm known for horrible naming myself and would be one to change a script name after releasing) :p
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
fixed the CPU usage issue =)
apparently I was drawing roughly 1000 frames or so... lol

so I've limited the redraw to your primary monitor's refresh rate:
time.sleep(1./mode.refresh_rate)

the good thing about this is I can now re-implement 3D shutter display :)
(should work with BT/USB shutter glasses)

my CPU usage is about ~35% now with chromium and other things going :p
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
well, time.sleep() was bad and very inaccurate.

matt had a method which made shutter display updates alot more accurate with the screen refresh, however now my CPU usage is no different from before time.sleep()... heh

I'm also working on fixing up fonts and attempting to display the unicode refresh character properly.

I also want to note (as I've not stated this earlier) UMC loads up alot faster than before ;)
 

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
finally got raw freetype fonts through freetype-py working properly:

^ looks more like PyGame now: :3


the only problem I'm having with it is the time it takes to load everything >_>
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
welp... my brains are officially all over the walls:

found out the final matrices weren't rotated or scaled...
wanna know why?

for the functions:
ugeSetBoneLoc()
ugeSetBoneRot()
ugeSetBoneSca()

you MUST set the first argument as a list for it to work correctly
( [X,Y,Z] )

so the matrix creation works perfectly, it's my LRS functions that are screwed up.

I should have this fixed by the release, but I'm alot more at ease now knowing that's the only issue ;)
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
ok, first official test of UMC's transformer:

not sure if this is caused by the Hal Labs 2 script (how I'm supplying the weights) or if it's a programming error in the internal transformer.

I've done a few things to array()() as well, which I intend to port over all data functions to make things much easier for automation...
here's the code:
Code:
weights_list=(
     [
        array(
            [bu32,bf32],
            label=' -- [ Bone_Offset , Weight ]:' #NEW
        )(
            offset=WO[0]+32 #NEW
        ) for WO in array(
            [bu32],
            label=' -- [ Weight_Offset ]:' #NEW
        )(
            offset=weights #NEW
        )
    ] if weights>32 else []
)
^take note this is all on "1 line" :)
automation is meant to get rid of almost all stand-alone variables

anyways, I'll get more in-depth tomorrow... lol
it's nearly 3AM as I'm posting this :p

in the mean time, see if you can guess how that small code works :3
it's actually final too, not planned like earlier things :p
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
well here's an update :)
wrote a nice little hacky model script which exports all imported images as png images :)

I'll include this with the release ;)

EDIT:
here's the script btw:
Code:
ugeScriptType(UGE_MODEL_SCRIPT)
ugeScriptFormats('PNG Textures', ['dummy'])

def ugeExportModel(T,C):
    while ugeImagesExist(Global=True):
        name = ugeGetImageName()
        ugeGetImageData('%s.png'%name, isfile=True)
probably my smallest script yet :p
 
Last edited:

Tcll

Smash Lord
Joined
Jul 10, 2010
Messages
1,780
Location
The Gates of Darkness
NNID
Tcll5850
so, Wii Channel TV data is supported.

let this be the first HAL format I've seen that actually uses strings >.>
(the script doesn't support the strings due to the old methods, but they're there) ;)

here's the string table of MiiIcon.dat:
Code:
....AnimL.Bottom
RightL.Dragging.
FocusEnd.FocusLo
op.FocusStart.HA
LGCMaterial2.HSD
_AObjDesc1.HSD_D
ObjModelDesc.HSD
_FObjFCurveDesc2
.1.HSD_GCAttrDes
c2.HSD_JObjDesc6
.HSD_MtxExpUnivD
escMayaTexCoord.
HSD_PObjSimpleDe
sc.HSD_SceneDesc
6.MailAttachL.Mi
iColor.MiiL.Push
.TopL.TopLeftL.p
Plane14.
strings are read until 0x00
 
Last edited:
Top Bottom