|
|
« Reply #15 on: February 10, 2013, 04:59:56 AM » |
|
Does it the programm makes the normals ready for brawl?
|
|
|
Logged
|
|
|
|
|
|
|
« Reply #16 on: February 10, 2013, 07:39:52 AM » |
|
dev5 will have a normal recalculation function, but that's implamented as a GUI control. (the buttons on the bottom bar)
as for the mdl0 script, I'm not exactly sure how to apply the normals to it...
I'm having trouble understanding brbx's src for normal transformations, (mainly due to bone influencing) and BJ's bad at explaining things when it comes to complexities like this...
commented src would at least be helpful (UMC's src actually explains the process and what's needed at every particular part of it's src (as of dev5))
that aside though, I am getting offered quite alot of help from Ian Mallet (aka Geometrian) who's helping me understand the procedures toward OpenGL
UMC's viewing control system has been largely fixed. (switched from GLUT to pygame (SDL)) ^although I've just recently been told Qt is even better because of SDL's limitations. (although Qt is much more complex, so I think I'll hold off on it for now...)
anyways... UMC now supports joysticks because of SDL, and I'm working on configuring it to my GCN controller. (I'll work on my PS2 controller as well, but really it's up to UMC's options to configure it)
as an up-side, UMC might also support archives and game-scripts/logic (if not then it'll be in a future dev-release)
EDIT: if I must ask though... please get used to contacting me via my email... (at least until I get a better connection)
I can't view kc-mm or even google search on my wii...
I'm currently posting from a friends connection...
|
|
« Last Edit: February 10, 2013, 07:50:30 AM by Tcll »
|
Logged
|
|
|
|
|
|
|
« Reply #17 on: February 12, 2013, 12:49:37 PM » |
|
now that I'm able to get on kc-mm, and have time, I can write up some notes on current progress for you guys.
but first though, I must mention that I can't use the IRC client chat here... sry T_T (even through VTunnel, I still can't get any further than the loading screen)
now for what you guys want:
UMC has basically been scrapped and rebuilt since dev4. (you can probably tell by the new formatting functions)
I've been getting quite alot of good notes from Ian Mallet, aka Geometrian, who's been telling me alot of the stuff I should be doing that I'm not in dev4.
I'm no longer using the GLUT windowing system, which has been restricting me from the advenced methods... now I'm using SDL through pygame.
I've built a matrix class (yes, an actual class) to handle the viewing tranformations through a matrix, then applying them to the model before drawing.
the class was needed for ArcBall view rotation, which allowed viewing transformations via the mouse. (yes you can now view around the scene with the MMB)
scene transformations also now work from a local view. (a big problem I was having before)
I've recently gotten fonts working (just last night actually ), and implamented into the GUI... though I'm scrapping the old GUI to define a widget class which will allow for better control over widget events. (the functions won't change, but everything they contain will)
you won't notice a difference with the GUI look and layout, other than widget additions and control.
scripts have been changed (well, the header anyways)
every script type now uses the same "Header" function from COMMON. the script types are defined by a variable placed in the function: UGE_*type*_SCRIPT: - MODEL - ANIMATION - IMAGE - COMPRESSION - MODULE future: - ARCHIVE
I also plan on implamenting the "EXECUTABLE" script type once UMC becomes UGC
anyways, I'm working on library support in FORMAT as well... this will allow libraries to modify UMC's internal data in real-time.
a good use for that is minecraft conversion. when playing an animation, you'llbe able to see the model update the cube positions and colors for each frame. this will be done through the NBT (minecraft) library.
NOTE: I have 2 scripts planned to use this library: - handle a .scematic file (had this working once...) - handle a full minecraft level (a warning will be thrown by the library if the height exceeds 256 blocks.)
another thing I'll soon be working on is widgets for scripts.
UMC imports models using a file browser, but exports models using the export tab on the model panel.
both of these will contain a small area for script settings through a UI. (all the script needs to do is add the widgets, and define logic for them (if needed))
the values for these will be returned to the I/O functions when handling the data. (this will be explained in the release)
I can't promise script/library uploading/downloading and updating yet...
I also can't promise themes for UMC yet... (the GUI needs much more work)
these things are coming though, and WILL be available in the official release.
also, I'm not changing UMC's name until either 4x or 5x.
EDIT: I forgot to mention, SDL also made it easy to implament joysticks.
I'm now getting button and axis feedback from both my GCN and PS2 controllers. >:3
because of this, another addition is "ini" configuration settings.
I'm still working on getting the controller feedback implamented into UMC... but it's working
EDIT2: forgot to mention... SDL isn't exactly all gliss and glamour >_> so far, the only downside is that the Video Resize event completely clears the GL context. ... this means that all display lists, vertex arrays, and VBO's must be rebuilt. (meaning it will take a little time for the display to update after the event)
that issue is something I won't be able to fix...
I do intend to use PyQt later though to basically build my own window manager.
another addition to UMC is fullscreen mode is now available. (it was available in GLUT, but it would get stuck until you closed the process... (Ctrl+Alt+Delete and end the process))
now, simply hitting 'Esc' toggles fullscreen. (NOTE: a video resize event is performed)
|
|
« Last Edit: February 13, 2013, 11:08:51 AM by Tcll »
|
Logged
|
|
|
|
|
|
|
« Reply #18 on: February 13, 2013, 06:32:45 PM » |
|
I haven't looked at enough of this, but I'm kinda in a rush. Quick question. Does this program have the ability to export animations from games? Cuase if it can, I'd try to rip animations from Sonic & SEGA All-Stars Racing (Wii) and Space Channel 5 + Part: 2 (PS2)
|
|
|
Logged
|
You and I can be poor, but neither of us can be cheap.
|
|
|
|
|
|
« Reply #19 on: February 13, 2013, 07:39:57 PM » |
|
No, it does not.
|
|
|
Logged
|
FC: 2191-7379-6272
|
|
|
|
|
|
« Reply #20 on: February 13, 2013, 07:59:15 PM » |
|
I haven't looked at enough of this, but I'm kinda in a rush. Quick question. Does this program have the ability to export animations from games? Cuase if it can, I'd try to rip animations from Sonic & SEGA All-Stars Racing (Wii) and Space Channel 5 + Part: 2 (PS2)
wait until UGC, then wait until a script for this is built, then you can import the game into UGC.
can you wait that long??
UMC is simply a model/animation converter... it can't handle any of the advanced stuff yet. <_< (this is as of dev5)
it is in the works though and intended to be added
Post Merge: February 14, 2013, 10:13:42 AM hey guys... I've just had a new idea for UMC...
Q: would you like me to implament this into dev5, or dv6?? (if you answer dev6, the functions will be implamented in dev5, but won't do inthing) ^def function(): return None #pass
about the idea: since I've started working on the animation system, there's been quite alot to deal with...
there are 2 buffers for vertices and normals. the native vertex buffer, which stores the vertices and normals in their native format (untransformed by bones) and the pre-transformation buffer which contains the vertices and normals after being transformed once by the bones.
the pre-transformation buffer stores the data used by the display system... (since the pre-transformed data has to be re-transformed by the bones which are transformed by a keyframe)
the idea itself is functions which will inject vertex and normal data directly into the pre-transformation buffer. (very useful for nintendo's vertex and normal formats)
the functions will be an alternate usage for mesh-objects. (since currently you have to work to untransform the model before sending it's data to UMC) ^QUITE a pain
the "Dolphin" library was supposed to take this work off your hands, but since the animation system requires this, why not
don't worry about sending pre-transformation data and not getting native data when exporting. UMC makes sure to manage both buffers as needed (since the native buffer is used by FORMAT (the UMC formatting functions) and has to supply it's data)
sounds like alot of lag right? don't worry, the animation system uses PyOpenCL to manage it's data before it's displayed (the keyframe tranformation data is managed by the GPU)
|
|
« Last Edit: February 14, 2013, 10:13:42 AM by Tcll »
|
Logged
|
|
|
|
|
|
|
« Reply #21 on: February 17, 2013, 08:39:01 AM » |
|
sry for not much progress...
I'm still experimenting with new GUI features, and trying to get mouse motion and KBd input to cooperate with the widgets...
also... I think I'll just implament those functions by the release of dev5... (it'll help me with Nintendo's formatting)
so this means dev5 will take even longer to release, but hey... I'm still working on FORMAT anyways, so it's better to hit it when it's still incomplete...
if anyone else has any ideas for UMC, I'll gladly accept them
you can find me on KCMM's chat if you'd like to discuss anything. (or would just like to chat)
Post Merge: February 17, 2013, 11:25:52 AM something else I'd like to add... the pre-transformation functions:
these are really the same as the basic functions... the olly difference is the buffer the data is stored to:
Set:
-ugeSetPTVertArr ( list/tuple ) -ugeSetPTNormalArr ( list/tuple ) - ugeSetPTBiNormalArr( list/tuple ) #SESv2 - ugeSetPTTangentArr ( list/tuple ) #SESv2
--ugeSetPTVert ( (float/int)/(list/tuple), float/int, float/int, float/int ) -- ugeSetPTNormal ( (float/int)/(list/tuple), float/int, float/int ) # is always 3D -- ugeSetPTBiNormal( ^ ) # SESv2 -- ugeSetPTTangent ( ^ ) # SESv2
Get: # I'll work on the Get functions later, but they should be the exact same
honestly, I'm not exactly sure if NBT values are transformed in the same way as normal values...
also... this is the reason the format needed an update... not so pre-transformations could be added, but so new functions could be added w/o bamf-ing the current functions.
EDIT: oh yea... I forgot about this rediculous post merging >_< (well the timer thing anyways) ^ I might not edit until I'm on a compy... (they won't listen to me when I say it's a pain on the wii)
Post Merge: February 18, 2013, 05:50:19 PM should I turn UMC into somewhat of an editor??
you know like, moving stuff around into different scenes, or aloowing animation edits...
|
|
« Last Edit: February 18, 2013, 05:50:19 PM by DarkPika »
|
Logged
|
|
|
|
|
|
|
|
« Reply #23 on: February 25, 2013, 12:07:35 PM » |
|
because of the post merge issue, I've had to delete the last thread... (can't copy the info)
anyways... I've posted a poll for people to vote for placement of a new GUI feature.
http://smashboards.com/threads/334292
|
|
|
Logged
|
|
|
|
|
|
|
|
« Reply #25 on: March 19, 2013, 05:00:39 PM » |
|
Since it's an animation converter (right?), would I be able to export animations from 3DSMax to BrawlBox? Is there a script?
I tried using BrawlBox 0.67 animation converter/MaxScript, but it seems that the script doesn't recognize the bones in 3DSmax.
Could you make a script for 3DSMax that converts animations to BrawlBox, but it selects helpers and/or bones? I use 3DSMax 2013 - Student Ver.
May I ask why were you warned?
|
|
« Last Edit: March 19, 2013, 05:01:44 PM by Ulala »
|
Logged
|
You and I can be poor, but neither of us can be cheap.
|
|
|
|
|
|
|
« Reply #27 on: March 23, 2013, 10:07:40 AM » |
|
so as I've stated in Diddy's thread, I can read 5-byte floats, but I can't write them...
I had some help with float conversion from Gribouillis, with his anyfloat class, but that uses the struct module limited to 64bit floats...
I've already gotten the sectioner finished which determines the length of the exponent and mintissa fields based on a given byte-size. (credit to PyTony for speedups) but that only gives us the slots for the values...
here's a code I modified from a search to give me a good binary representation: search: http://arancaytar.ermarian.net/2010/01/25/ieee-754-encoding-floating-point-numbers
my code: def enc(f, byte_size=4): #defaults to a 32bit float #my code: e=((byte_size*8)-1)//(byte_size+1)+(byte_size>2)*byte_size//2; m,b=[((bytesize*8)-(1+e)), ~(~0<<(e-1))] S,E,M=int(f<0),0,0
#Aran's code: (modified) #find the exponent (adding the bias) while f>=2: exp+=1; f/=2 while f<1 and exp>0: exp-=1 if not 0<= (exp<2)*(b+1): raise ValueError ("Exponent overflow: Absolute exponent must be smaller than %d."%(b+1))
#encode the exponent (binary operations) for i in range(e): E=(E<<1)|(exp%2); exp/=2
f-=1 #remove the leading 1 bit
#encode the mantissa for i in range(m): f*=2; t=int(f>=1); M=(M<<1)|t; f-=t
return (S<<(e+m))|(E<<m)|M #join everything together
this code seems to work, but it's off slightly...
|
|
« Last Edit: March 23, 2013, 01:51:27 PM by DarkPika »
|
Logged
|
|
|
|
|
|
|
« Reply #28 on: March 23, 2013, 01:33:05 PM » |
|
Sorry about posting this in the wrong thread earlier; here's some code to convert a single-precision float "val" into a 32-bit unsigned integer encoding "enc". You should probably only have to change a handful of values for different numbers of bytes. Pseudocode: unsigned int enc = 0; if (val == 0.0) return enc; //00000000if (val < 0.0) enc += 2^31; // sets first bit of 32-bit to 1 if negative val = val*-1; int exp = 0; while (val < 1.0 || val >=2.0) if (val < 1.0) val *= 2.0; exp -= 1; else val /= 2.0; exp += 1; // val is now scaled so that 1 <= val < 2enc += 2^23 * (exp+127); // adds exponent bitsenc += round((val-1)*2^24); // adds last 23 bitsHere's the .exe file I made, if you want to test it further. EDIT: and here's the actual C++ code I used. The bottom for loop basically just prints the number in hex form.
|
|
« Last Edit: March 23, 2013, 01:36:19 PM by jdaster64 »
|
Logged
|
|
|
|
|
|
|
« Reply #29 on: March 23, 2013, 04:18:50 PM » |
|
well... I've built your script in python, but it doesn't exactly work perfrctly... (could be due to 64bit input getting converted to 32bit)
here's what I'm getting: 'enc' is your function (I'll show what I have afterwards) 'dec' is my function (copied from the part of UMC's __BIT function) 'hex' is python's function
dec(enc( 0.35 )) >>> 0.44999998807907104 hex(enc( 0.35 )) >>> 0x3ee66666
dec(enc( 0.2 )) >>> 0.30000001192092896 hex(enc( 0.2 )) >>> 0x3e99999a
your function in python: def enc(f): i=0
if f==0: return i if f<0: i+=2**31; f*=-1 #set the sign #NOTE: 2^31 = 29; 2**31 = 1<<31
e=0 while f<1.0 or f>2.0: if f<1.0: f*=2.0; e-=1 else: f/=2.0; e+=1
i+=(e+127)*(2**23) #add the exponent i+=round((f-1)*(2**24))
return int(i)
EDIT: round(((f-1)*2)**24) #add the mantissa
0.35 >>> 0x3e800000 >>> 0.25 0.2 >>> 0x3e00004f >>> 0.12500117719173431
|
|
« Last Edit: March 23, 2013, 04:26:16 PM by DarkPika »
|
Logged
|
|
|
|
|
|