PDA

View Full Version : Interactive programming for Maya ?


hibigibees
10-14-2006, 08:49 AM
Hi all,

I just want to share some ideas regarding this programming thingee which is happenning in the cg field, i.e. about MEL, C++ API, Python, Black Mamba's, King Cobra's etc... Everyone knows that how maya UI is user friendly and to how much its customisable, then why is the same not possible in programming !

I was wondering what if, If the whole programming thing is made into a interactive network of picture elements where the user can go connect things like a 2020 Maya's Hypergraph.
I mean I had a chance to work with PLC for automating many things in an Industry, such as preparing a coke bottle or washing a metal part from the beginning to the end. Usually the whole thing is automated through several computer programs and PLC programming is one such example which I would like to discuss here. A diagram named Ladder Logic is created on a interactive software which internally codes stuff based on the diagram and it does the operations based on the diagrams I/O connections.

Now if the maya/max/cg package user is provided with a interactive stuff which enables him to draw stuff based on his requirement. (Something related to shake nodes and noodles)

Example; Like VB or a circuit maker software - ie. I can drag a For Loop Node and connect it to My Cmd Node whose output is given to another If Node which has a condition user defined. I mean, nowadays almost everyone is familiar with computer programms and I believe its time for us to use the pc's power to write a optimised code for itself based on out node layout created by us. Its something like FrontPage/dreamweaver where we design stuff and the HTML code is ready for the user to tweak anything.

When we compile a C++ program example a simple cout statement, the interpreter converts the cout statement to the machine code and then the request is done ! which simply means that the interpreter does the job for us to avoid all the confusion in writing the machine code. If there is a interpreter which is smart enough for understanding the picture elements created by the user and creating a cool c++ code or a direct machine code, then its a different way 2 work for us with complex programs. We just need to understand the algo and build the graph nodes as per the algo... ! Again making the graphnode software should be as userfriendly as possible, we can't expect the end user to create 10 nodes for adding 2 Numbers. It should be both codable, connectable and the source of a given node should be changable too.

A computer program can be created in many ways for a single requirement and its really not user friendly anymore to sit and code a 1000 line C++ program for exporting skin weights or to mirror blend shapes. If we have the algo fully and clearly written, we should be able to use it and build our graph network Interactively and simulate the overall result without the Maya scene file itself...

Pls correct me If I am wrong, If there is such a thing already available for maya or max then its really cool for the end user to Program through Graph nodes...

sriram.

hibigibees
10-18-2006, 03:45 PM
hi, last post is continued here ...

I was thinking of this Interactive programming for a long time and I was having a lot of questions in my mind, thought of sharing it here...
I was asking this question to myself !
"What is the need of Interactive programming, what are its uses over normal programming ? "
And I just got the following answers !

1. By just having a single interface for programming instead of C++ Api, Python and MEL! For maya its will be a good useful thing for the artist who need not worry about the confusing programs and complex syntax!

2. By having direct picture elements which are connected to each other like a simple flow chart which avoids the following;

a. Syntax error is avoided to a higher level
b. Its very easy to debug, review, simulate etc

3. The code corresponding to each picture element can be edited or even the whole code can be edited. I mean we will still have the features of scripting on top of the picture elements

4. tracking a particular information is easier, I mean we can just go thro the whole graph and tell the code 's; whereas if a code is given, even the guy who has created the code 3 months back can't say it without those comments ( i mean most of them)

5. In case of special codes/commands we can create our own buttons/customized picture elements. Like a ready made customized item...

6. I just thought of it, this is not specific to maya, its in general !

Technology must not be stopping anyone from using their knowledge to do their own pc programs for the same reason why we do...
Since most of the picture elements are well defined, we can even extend the programs creation for people who have no vison, they can just speak out thro a microphone for a particular word named 'expression' or a word like 'change path' for creating a picture element on screen where they read out their expressions and the pc speaks back to them telling the expression to reassure them. Its assumed that they speak english and they can understand back what is said to them. Its similar to the speach to text engine but putting it to use in programming too !

For people who can't hear can still learn/do programming through the graphical elements allowing them to still sit and watch a sample program's flash vdo which has a text information on the side explaining each slide. This is provided they read english and are intersted in programming... Then they can drag on items and make their own programs like us !

The above point requires intense hard work by the software industry to get things work in this case. I believe there are many software orgranizations already involved in this, but I am not sure about the level of sucess. Moreover there is a huge amount of home work involved in making a guy to learn programming who has no vision, I am talking about the audio tutorial...

7. I believe that there is good amount of work involved in thinking and optimizing our algo, while the program part must be the simplest.
We should not be worring about which is the input type, output type, syntax, data structures etc... what must be the function returning, what should I be optimizing in the program to bring down the resourses used down to 50%... etc... All we should be worried about is how the algorithm is done and what picture elements should I be connecting to finish that. If needed we can go into the program and find out for our if condition and change the == to <= etc.

8. As we start using such a software like this, we will find a lot of drawbacks and the respective software industry will continue releasing the newer versions, updates etc for improving the userfriendlyness, reducing the no. of bugs, performance improvement, healthiness in documentation etc... So it will be a slow start for any industry but its good for future of programming in graphics!

There is another gr8 advantage which is nothing but asking the pc to explain the program back to us. As the picture elements are already defined and each one does its own coding, the end user can just ask the system to explain any program. Apart from the userdefined commands and pictureelements, all the rest can be explained with audio !

Reply Please... I need someone to explain the pro-s and con-s of this idea... ! Thanks in advance !

sriram

Robert Bateman
10-18-2006, 05:07 PM
err, code generators for UML?

ashishdantu
10-19-2006, 04:21 AM
hi fusaaaa,

hows u man ! gud that u put this thread here.. ! i'm sure some one has started working on somethig like this..

this is what i was talking to u about.. MAXYA (http://forums.cgsociety.org/showthread.php?t=414972) and check this thread maya, mel, api, python, king cobra (;)).... (http://forums.cgsociety.org/showthread.php?t=410454)

more coming soon..
-rgds,

hibigibees
10-19-2006, 10:05 AM
hi ashish,

I m fine, hows the tool dev goin on ? ... Reg the MAXYA, its awesome work ! I did not use it, but saw the UI in the forum - Thanks to butcherhell ! Exccccellent .. !
But imagine the same MAXYA programming UI which is full of nodes/picture elements ! I mean the reason for me to struggle explaining it is to find a software where I can connect my customized or predefined Picture elements which do the program for me. I have learnt a few programming languages and obj ori'ted languages too but Lets assume I dont know how to write a computer program. Then for example ... How do I write a simple program for Listing all the joints in the scene?
I believe the mel cmd in general is ...
ls -type "XYZ"; // XYZ IS TYPE OF THE NODE EXAMPLE JOINT OR TRANSFORM

Instead of all this I can simply create a List Node and select 'joint' within its menu and connect its output to something else if necessary... I mean MEL/ C++/Python has it all inside but the end user who is mostly a artist, should be learning a lot of rules, syntax etc to do it which is a lot of waste of time...sometimes it even changes the goals or job designation .. a job of a vfx artist today will be 70 % programming and 30% VFX instead he should be atleast 90 % involved in VFX while his Interactive tool should help him to get his ideas done into programs!

You can ask me a direct question "By the time the end user understands the Picture elements and gets used to it, he can start learning MEL cmds and use it"... But my answer for this is "There is a huge difference between writing a book and making a video"... In our case, making a video is easier, faster, productive and its very useful to go thro the video for our mistakes or to make corrections to it... The one and only pain we have is to make the pc convert that vdo to machine language instructions and do the job for us... I know that its - [time/money/talented man-power] -consuming thing to attempt this!

Still I dont say that we should be stopping something like typing our own codes ! It should be a interface where i can graphically connect nodes/picture elements etc but still go and edit code for each one of it if necessary or the whole of it ... Something like a Frontpage sort of thing...

Thanks for the reply ashish... ! Let me know if you have more ideas reg this !
sriram.

hibigibees
10-20-2006, 02:47 PM
Hi,

I was thinking of the demerits of programming through the Interactive Programming method, here are a few of them...

1. The end user has to get used to the new method of programming althought it might not be so different from the hypergraph 2020 of maya... ;)

2. For very simple programs/requirements sometimes we need to create 3 to 4 nodes, example to print the list of referenced items in a given scene... user can simply type
ls -type "reference";

if he has to use the interactive programming method then he has to create a List Node and a Out Node and Specify the Type "Reference" in the list of items of the list node and also specify the "print" in the list of items in the Out Node... Then after that he has to connect the list nodes out to Out nodes in...

For creating Very Long Programs, the User has to Navigate the Graph Nodes Like Google Earth ( u know what i mean).... I mean if the user does not have the habit of organising things in the interactive thing then its very painful to debug later. OR the "auto-organize" option should be available in that software itself to organize our program automatically based on a given template either History based or Node Priority Based or etc.

3. Another painful thing to the eyes, i mean usually when I do my simple programs I try to use notepad/some editor where my background is black and text it white. Ofcourse the syntax highlights are available but i believe its comparitively less eye stain to read text information on a black screen than graphical elements. While the same thing is not usable in the graph nodes, we will confuse a lot of things when we see items in black and white...

more demerits on the next post... kindly help me in finding out more merits and demerits of this idea !! Once I am convinced that if this idea is not worth trying, I might stop this documentation on that point else I might continue till some kind of a solution is seen ...

sriram.

CGTalk Moderation
10-20-2006, 02:47 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.