Universal Model Converter development

Hey everyone :slight_smile:
I hope you don’t mind if I talk big for a moment,
but I’m here to bring you a program which can more-easily support 3D Models of ANY format.

Universal Model Converter (UMC) was simply built for nothing more than what it’s name states.
(“was” because now new ideas have been uncovered which are working to completely restructure the program)

in it’s history UMC started out as a console api, which later worked it’s way into GL by version 3.0a.
it was never really able to properly convert models up until v3.0a dev4.
now I’m working on dev5 and trying to completely restructure the system to take all the complex work of model transformation off the developer’s hands.

what is it capable of?
UMC supports it’s model formats based on the scripts which are written for it.
a script can support as many file-types for a format as needed, and does the work of transferring the data to UMC’s internal interface.

a script can also be used in tandom with a pre-built library for the format.
a Library can supply a single function to take all of the work of dealing with the file off your hands.
all you have to do is call the library in the header.

all of UMC’s external interfacing is done in Python,
but for scripts, it doesn’t exactly handle like Python.

UMC deals with the file data internally using supplied functions to read and write data of any size and return the results.
then UMC supplies functions which supply model data to and from a multi-buffered interface.

unlike blender which uses complex classes and logic to handle a model to/from memory,
UMC supplies all of it’s functions on the same level, so there’s less confusing clutter.

for more information, you can find UMC’s official development thread over at:http://smashboards.com/threads/334292

for previous images of UMC’s development, you can check: http://picasaweb.google.com/tcll5850/umc


I will be working on this from time to time…
if any mods have a better way of stating something they feel I could’ve stated better,
please feel free to edit :wink:

oops…
I forgot line breaks didn’t work on this forum XDD

EDIT:
nvm… I have to edit to get them to work…

so here’s to some progress on my scripting language:

I’ve finally figured out functions:
http://lh3.ggpht.com/-raJPfR59h7I/Uh9rCSaqqTI/AAAAAAAAE4g/EgXNME1TbA8/functions.PNG

a function is simply a call to a block block of code.

function inputs have been ruled out due to a function’s (or more respectfully stack’s) structure in ASM
if a function contains variables using “set” with “get” on outside variables or values,
those variables are considered inputs.

return variables were also ruled out because of structure.
if an outer variable uses a “set” with a “get” on an inner variable,
that inner variable is considered a return variable.
(this also applies to return data instead of variables)

I will draw up a few examples in my next post

for older images and development progress on UMCSL, you can check out:
images: http://picasaweb.google.com/tcll5850/UMC
previous development progress: http://www.blenderartists.org/forum/showthread.php?256747-The-Hive-system-version-0-91-released&p=2221812&viewfull=1#post2221812

don’t worry sjoerd, I won’t be posting anymore abount my project in your thread. :wink:
sorry for what was previously posted, I didn’t consider it a valid project at that time,
and wanted to inform you of my ideas to help you out with your structure.

ok, so I’ve finished the drawings…
here’s the examples:

return variable:
http://lh4.ggpht.com/-sBHq9rz8rvE/Uh_wyG_YRkI/AAAAAAAAE50/KbnSFoKGzfQ/function.PNG

return value:
http://lh5.ggpht.com/-vCBMV-pfUJ4/Uh_wyLQxY8I/AAAAAAAAE50/Qpo5hVf8Isc/function2.PNG

pointer:
http://lh5.ggpht.com/-qUx-yZdxK-E/Uh_wyDQF9ZI/AAAAAAAAE50/Mok7tTzmD7I/function3.PNG
^I fixed up the declaration order in this one to mimick how it should look when imported.

EDIT: I was wrong
the nodes in last one do NOT simulate a pointer…
they simulate a global variable.

a pointer is a different type of variable not simulated above which goes by a different name referring to the main variable.
(then again, I’m not quite sure how pointers work in ASM)

well that wasn’t all too difficult to implament…
though a few changes had to be made…
try not to get confused. :wink:

1: added a data size input to the value node (by byte size)
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Vl.gif
^ why here? that will be explained later.

2: added a data output for the variable’s dynamic address. (should precisely mimick &var)
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Va.gif
(a variable’s address won’t change unless it’s data size increases)

3: defined the DeReference node as Pt with local get and set connectors.
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Pt.gif

so why the Vl having a data size instead of the Va?
well, as explained under the Va, python is able to dynamically change variable types.
to implament this feature accordingly, the variable’s address is defined based on the dynamic memory it’s allocated with.

note that defining a variable allocates a new area in the virtual memory space,
the value itself is not defined in the virtual memory space.

once a variable is defined in memory, it tries to stick with it’s allocated area.
I’m not sure about all the circumstances of dynamic memory allocation…
for example changing a variable’s value from an int to a string.

but this method works best with my knowledge so far.

the fun fact about this language is that it is a dynamic language
simulated using a dynamic language rather than a static language like C++
so anything can be made possible. :wink:

I’ll probably have a few usage examples up in a little bit :slight_smile:

EDIT:
also when simulating a pointer…
when using the set/get connectors from a Pt,
the addressed variable it’s allocated with will display with blue edges when the Pt is active.

and when a dereference error occurs, the Pt will display with red edges

a list of the nodes for reference
(alot of the images are unfinished, they’ll update automatically when I add them)

http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Vl.gif - Value
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Va.gif - Variable (and function)
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Pt.gif - Pointer (De-Reference)
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Cl.gif - Call
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Ar.gif - Array
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Di.gif - Dictionary
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Id.gif - Index
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Eq.gif - Equation
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Cs.gif - Class (not available yet)
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/If.gif - If/Else
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Sw.gif - Switch
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Ca.gif - Case
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Wh.gif - While
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Fo.gif - For
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Br.gif - Break
http://tcll5850.hostoi.com/Universal_Model_Converter/nodes/Cn.gif - Continue

I’m doing stuff completely wrong.

the name of the function is a variable within itself, and varuables can be set with a variable containing a function,
which can in turn be called using that variable.

as well as a pointer to a “function” can be set which is the data location of that function’s type

so in short:

  • the variable gets the data type, instead of the value…
  • the variable is the only node that has an address.
  • the variable can also be called if containng a callable object

this however poses a problem with strings, which I need to look into…
I believe a string is nothing more than a character array.

and there is also a problem with openly changing a variable’s data type as done in Python.

I suppose that could just be done by creating a new Va node of the same name…
where it’ll go about allocating a new memory space for it

ok, so I’ve fixed up the variable to have a function control option

when you use a call on the variable, it’s just like calling a normal function.
and when using a return, all you have to do is set the variable with that data.

because the variable has a call, this variable is now considered a function
(the variable’s Set input now becomes a Return input)

you can still set that variable and use it as a variable…

though when you call it again, in Python this is basically re-defining the function, as such:

def F(): return 1 # Va[ F ]

V = F() # Cl -- Va[ F ] -- Va[ V ]

F = 3 # Vl[ 3 ] -- Va[ F ]

# Cl -- Va[ F ] -- Va[ V2 ]
def F(): return 1
V2 = F()

I’m not sure if this is compatible with C++ like this…

but yea, this language WILL do everything it can do grant you a working code which mimicks the node layout…

though yea, duplicating the function is not very decent…
and trying to set another variable with F will just recreate the function as that variable:

V3 = F

which means you can now call V3 which will initiate F

could I get some help here… :confused:

I keep seeing this but one is this a separate program from Blender? If yes then will it be free? Also I tried your link to learn more but it kept failing.

1: yea it’s seperate
it pertains to blander as I’m trying to work on a script to export models directly to the Blender249b format.

the thing that’s keeping me from working on it is that file rewind feature which is not getting along with UMC’s function interface.

and 2: of course it’s free :slight_smile:
only the best programs are free and open source.
in which UMC is written in py27 and distributed with it’s own interpreters.

meaning UMC is as open source as it can get ;D

though right now the latest release is a bucket of trash.
(GL-Direct, with a horrible CPU controlled UI and only supports geometry with a mis-directed function system)

the next release (dev4.5) aims to fix alot of that, though it still uses the function layout interface.
the last release I’m working on (dev5)(not literally the last) is completely redone with loads of new implamentations such as PyStream shaders.

also, which link is broken??
SmashBoards or Picasa?? :confused:
thanx.

I’ll be moving SmashBoards data to my forum, when I can…
they are undergoing some DDOS attacks along with various other forums around the smash and MKWii communities… >_>
so if it’s SB, that could be why.

EDIT:
yep…
they seem to be undergoing one at this very moment

why to blender 2.49???

and will it convert .max files??

I figured I’d start with a somewhat simpler format…
plus I use 249b for modelling as anything above 253 (I think) seems to have an annoyingly noob-ish viewing system.
(plus you have to implament when you click on a movement arrow to where it keeps moving when you release)
^ very useful for clicking, then typing the movement value for X,Y,Z

as for .MAX support, that’s a script that someone can pick up.


UMC bases it’s file support off of it’s scripts and libraries.

a script simply adds and converts files,
while a library defines custom support for scripts and also allows custom interfacing between it’s data and UMC’s data.

I’m working on a library for Minecraft support which turns the model into a MC statue.
(current pose and all, when I support animations)

as for coloration…
I’ve requested that someone work on a 3 dimentional array over at SWF (Smashboards, or Smash World Forums).
but nobody seems to be working on it.

ID,Data = block[R][G][B]

Yes its SmashBoards When you have something meaning the program or such to share I will be interested to see it. I am sure there will be plenty of others also interested. Good luck and good work.

thanks :slight_smile:
you can download the dev4.5 pre-release here:
tcll5850.hostoi.com/UMC30ad45.7z (R-click/Save-As)
(unlinked, file deleted by host)

it’s a pre only because it’s a scrapped version of my last dev5 project built up from dev3.
I lost the original files to a dead Flash Drive.

but for the advantages it has over the dev4 release,
it has a portable python 275 installation both x86 and x64, though x64 is incomplete so it’s forced x86.
(I have an x86 compy running a 2.9GHz Celeron Single-Core with 2GB of RAM and onboard intelGFX)
^ free from the trash, and runs Windows XP Black (SP3 with dot-NET 4.5E) as I refuse to get Win 7

I currently don’t have any documentation for it as that’s also gone with the last dev5 project…
though I do have some documentation for the new dev5 project :slight_smile:

but if you know how to use blender, then you already know how to view in dev4.5 :wink:
Ctrl+I = import
Ctrl+E = export

UMC works for it’s scripts to provide simple and easy functions that work as you would expexct.
though there is a formatting issue which I’ve fixed in dev5.
(another reason for bad documentation)

if you’d like to work on a script for dev4.5, feel free :wink:
you’ll find all the functions you need in COMMON and FORMAT in UMC’s data directory,
and to use them, simply use the other scripts as examples.

if you find any UMC functions that could use an improvement, please let me know and tell me your needs or ideas ;D

UMC has it’s own internal file handler to make file management extremely easy.
the first file initializes the scripts based on your selection, though because it’s a tkinter dialog,
if 2 scripts share a file-type, you will need to manually select the type from the console.
(I’m a horrible GUI programmer) XD

dev5 uses Qt as a forewarder and replaces the python console with it’s own interactive console.
it also will no longer use tkinter, and implament many other things including a working animation system.

I intend to have dev4.5 support basic texturing by it’s actual release.
(due to poor structuring knowledge on the internal format, it’s impossible to make it support full materials)

EDIT:
found some of my old dev4 function documentation…
alot has changed since this was written, but this should suffice for now. :confused:
http://tcll5850.hostoi.com/Universal_Model_Converter/dev4Doc/

I’ll create a board in my forum for discussions about the dev4(.5) function format.
(I’ll post a link here when I have enough info)

for dev5, it’s catagorization is completely different, though still has alot of similar functions.
you can view the dev5 formatting layout here:
https://gist.github.com/Tcll/4748851 (moved to forum, will update in a few)
these are actually slightly outdated as well…
some updates can be found on the UMC thread at SWF, but there’s still a little more I’ve done that I havn’t logged yet.
(in building the system)

I’m working on an interactive function description on my forum, so I’ll have that up when I have some decent progress on that. :wink:

well, textures are finally supported, but the interface is so noob-ish, I can’t release it yet…

I know very little about materials and textures when it comes to GL, but for what I have so far:
(I may as well post starting from objects, just in case I’m missing anyting)
object - [ObjectName, Viewport, transforms, Sub_Data(Rig, Mesh, Light, Cam, etc.), Parent_ID]
mesh - [Identifier, Mesh_Name, Material, (Verts,Normals,Colors,UVs,Weights,Primitives)] = Sub_Data
material - [MaterialName, AddOn, MatColors, Textures, Reserved1, Reserved2]
texture - [TexName, TexParams, Reserved1, Reserved2, ImageName, Reserved3]
image - [Name, W, H, Pixels, Colors]

am I missing anything I’d need in the format??
(that’s what the reserves are defined for) :stuck_out_tongue:

thanx for any help in return :slight_smile:

also
in GL, how does one multitexture using the same UV channel??
(using the Fixed Function Pipeline)

reason for the FFP was from bad direction, such as NeHe basics.
I indend to completely rebuild the interface to support shaders…
(it needs a restructure anyways, as using a structured list for the model format was a horrible idea)
^ the rebuild will use classes to hold the data.

but until then, I need to know this :stuck_out_tongue:

well, I’ve been making progress on the backend, getting this next release to support the scripting format of the official release
(the official release is completely different from this next release in just about everything)
scripting for v3.0 is about 2x simpler and more refined than the noob-ish v3.0a structure.
(I really did not know much when I wrote the v2.0b rebuild, which still applies here)

sorry this thread kinda died, I’ve been putting things together to update on my forum,
and link everyone to it with a small post everywhere else.

one thing I’d like to post about here is that Blender (today) still uses the OBJ plugin that doesn’t know how to use Normals.


kinda surprized this hasn’t been fixed yet… :confused:
though then again… scripting for blender did get 2.5x more complex… heh

I’ve exported an OBJ with the normals shown on the right, then imported the OBJ into Blender…
you can see how it broked the tail.
(the OBJ contains the normals directly exported as shown in UMC’s Viewer)

the image was a test of the new simpler export interface

also, the model doesn’t have textures in Blender…
I’m working on functions to get the materials and such from the interface.
(I’m actually doing that as I type this) :stuck_out_tongue: