[ iClone 7.4 ] Showcase of Python API for iClone


https://forum.reallusion.com/Topic397524.aspx
Print Topic | Close Window

By animagic - 2 Years Ago
It seems to me it is now best to focus on what can actually be done with Python.

As I have pointed out before, other 3D packages also use Python (Blender , Houdini), so it can't be all that bad. Checking out Udemy courses, I'm noticing a wide variety of areas where Python is used as well.
By Kelleytoons - 2 Years Ago
Yeah, actually you'd want to make it so that an offset could be applied (so a variance as to when each motion actually started -- hell, you could also have a time variance so some motions could be faster/slower over the range).  That way a mass scene would be convincing (you don't want everyone to move in exact unison -- that's impossible even for the Rockettes :>Wink.

Easily programmed, I would suspect (I can do that in Blender, right now).
By Kevin L - 2 Years Ago
Thank you kelleytoons for your response I was never required to learn it for work, so you kinda stick to what you know I should have learned it when I was a little younger, but its never to late to learn something new.
As long as you can smell the roses and not see the roots.
      
                      
By RobertoColombo - 2 Years Ago
I always suggest the free Python course at coursera.org from Rice University: very well done, really Object Oriented thinking, and quite fuunny because they are based on creating video games (from card games, to, pong, to asteroids)

Cheers

  Roberto
By dogged2003 - 2 Years Ago
mr_vidius (12/18/2018)
this is all well and fine. but my question is.. will RL fix some of the issues that are current? like the persona issue. or will they 
make some sort of upgrade to the persona so it works in iclone? would be interesting to find that out.
vidius

They do something. But Not in hurry.
Did you write obout error in Feedback Tracker?
We will be happy to vote about error!
Let me remind you about the mirror: Add a functioning mirror. The greatest number of votes 34!
By RobertoColombo - 2 Years Ago
Tony (RL) (12/24/2018)

Said this, you previously mentioned that the GUI is based on QtPy: they have an integrated IDE for the GUI development.
I wonder whether at least this one can be use to build up the GUI before the actual code that takes the control over iClone internal element is run.

Regards

  Roberto


Hi Roberto,

Unfortunately, we don't support the integrated IDE for QtPy in the first version of iClone Python API.
But the team already realized that this function is important by your suggestion, and we will consider adding it in the future.
Thank you for the suggestion and please feel free to let us know if you have any question.


Hi Tony,

good news that something might be added in future, thanks.
I am waiting for the release (few days, right? WinkWinkWink) and then I will surely report any suggestions that can help to improve your amazing product.

Regards

  Roberto
By AutoDidact - 2 Years Ago
Maxon Cinema4D studio has python module,
in fact even SmithMicro Poser has Python support, and for a while, talented third parties
were making some excellent  add ons for the program, such
as the poser physics/ragdoll plugin that I used for years before migrating 
from Mac to Windows and natural motion endorphin for ragdoll.
(poser python physics)
Sadly its full potential in poser was never realized but that
is another subject entirely. :-/
By Dr. Nemesis - 2 Years Ago
Man, that joint morph script is a lot like what I needed to automatically drive wrinkle maps.
I was exited before but after seeing the examples, I’m losing my mind. Good work!
+1 for early documentation. I’d love to dive deep into this as soon as humanly possible.
You already have 2 sample scripts. Can you show us the code? Even copy/paste on the forum would be fine.

One of the things I’m curious about is how the GUI is written. Is it Qt? I’ve seen some references to qt in the Iclone files previously I think.
Or are we gonna have to brush up on our Tk? All the interfaces we’ve seen so far have been simple so I’m really curious.

Again, I’m seriously excited. When I saw the batch renderer my first thought was “That’s not good enough, lacks features”. And therein lies the awesomeness of this. It was made to work exactly as reallusion designed but those who don’t find that enough no longer have to plead for improvements... at least not where scriptable tasks are concerned. If I feel the plugin doesn’t do enough I can simply add functionality or write my own.
Far too often I’ve found myself in this situation and I’m seriously glad to now have at least limited power to change that.

So please don’t be shy with videos and samples. I want as much info as you can give.
By Tony (RL) - 2 Years Ago
Kelleytoons (12/12/2018)
I think everyone (including RL :>Wink knows how excited I am about the possibilities of this.  In the demo video for batch rendering it seemed to show that either a user input was needed immediately after the second render (where it wanted to know if the project needed to be saved).  Can you elaborate on that?  Does batch rendering mean you have to babysit after each render?  Why did that prompt come up and is there any way around it?

And while I've expressed this before, I'm still more concerned about the internals of iClone -- for example, currently you cannot select multiple materials and, say, add a map to a slot that propagates across all the selections (even if they are linked).  This is a prime target for a Python routine.  Hopefully such exposure will be available to us.


Hi Mike,

Batch Rendering Plugin should be able to automatically render, export, and save multiple projects, so users don’t need to change its settings a during rendering process. However, the version of the plugin in the demo video is still a work in progress, so there are some bugs which the team is fixing now. Thank you so much for good observation and report this issue to us.
By gerdich - 2 Years Ago
Me too! I can't wait!

Is the API accessible through .dll calls so that I can access it with Delphi?

I would like to have components that I can redistribute. This would allow me to integrate interactive little iClone animations in my Desktop and Mobile applications.
By animagic - 2 Years Ago
Thank you for bringing the mirror again into the spotlight. Smile

I have tried since iClone 6 (Issue #329, 54 votes, 3838 views), and then made a new entry for iClone 7, which has 34 votes as you pointed out.

So even a large number of votes is no guarantee for implementation or at least a comment from RL...Crying

I have never found an explanation why an adequate mirror surface could work under DX9 (not perfect, but usable) but not under DX11. 
By Tony (RL) - 2 Years Ago
RobertoColombo (12/24/2018)
Tony (RL) (12/24/2018)

Said this, you previously mentioned that the GUI is based on QtPy: they have an integrated IDE for the GUI development.
I wonder whether at least this one can be use to build up the GUI before the actual code that takes the control over iClone internal element is run.

Regards

  Roberto


Hi Roberto,

Unfortunately, we don't support the integrated IDE for QtPy in the first version of iClone Python API.
But the team already realized that this function is important by your suggestion, and we will consider adding it in the future.
Thank you for the suggestion and please feel free to let us know if you have any question.


Hi Tony,

These are good news, thanks.
I am waiting for the release (few days, right? WinkWinkWink) and then I will surely report any suggestions that can help to improve your amazing product.

Regards

  Roberto


Maybe just few hours Cool

By Kevin L - 2 Years Ago
Although I've been programming for years I've never used python before just c++ c c# java javascript boo basic darkbasic visual basic.
is python an oop language?
If vertex information is exposed we could create all sorts of effects ocean waves terrain damage vehicle damage if the rendering engine is exposed we could create vertex shader effects like tank track marks, craters, erupting volcanoes, earthquakes.
By dogged2003 - 2 Years Ago
Time to take up the textbooks and practice while in Blender. The forum has a topic with a selection of materials on Python:

Python - what is a good tutorial or course
By Tony (RL) - 2 Years Ago
RobertoColombo (12/15/2018)
Hi Tony,

one question: which IDE is going to be supported ?
Will we have a real-time debugger that helps us to step-by-step check our code while iClone is running ?
Maybe connected to Visual Studio ? Smile

Regards

  Roberto


Hi Roberto,

We won't have an IDE or other debugger environments in iClone, but iClone will have a console report function which can let you trace problems.

By donald.dade - 2 Years Ago
will2power71 (12/18/2018)
I have a question about the Joint Morphing Plugin. The question that comes to mind is where will we need to locate the morphs in order to take advantage of this? Right now, you can have morphs loaded in 3Dxchange, or you can add them later on to the morph animation section? As of right now, you can't easily transfer the morphs from one location to the other so I'd like to know how to construct my figures  to take advantage of it. Another question that comes to mind is whether or not the Joint Morphing plugin is only available for CC3 Characters or will we be able to use this feature with DAZ characters or custom characters you import? 


I'm really interested in knowing this, as well. It's disingenuous at best to say you can import Genesis characters if you leave behind everything that makes a Genesis character great. Without the JCMs, a G8 is just a mesh like any other.
By Kelleytoons - 2 Years Ago
Tony (RL) (12/24/2018)


Maybe just few hours Cool



That would be a great Christmas present!
By Tony (RL) - 2 Years Ago
Dear iCloners,

I’d like to share some showcases of upcoming Python API for iClone which is the major feature of iClone 7.4.

The following iClone plugins are made by Python API.

1. Batch Rendering Plugin


  • The plugin can automatically render selected projects one by one.
  • The render export setting can individually depend on each project’s original setting.

2. Joint Morphing Plugin


  • The plugin can calculate the angle between two bones and automatically morph nearby skin at the same time.
  • This can let a character’s morphing result naturally correspond with its movement and gesture, instead of manually adjusting many morph sliders one by one.

We hope Python API for iClone can become a Scripting Tool for Artists. This tool can help them to easily create useful plugins by themselves without consuming much effort and time, in order to extend iClone’s functions. 

Please feel free to let us know if there is any suggestion.

Thank you!
By RobertoColombo - 2 Years Ago
Hi Kevin,

yes, Pythom is OOO, you can create classes and code in "OOO-thinking".
What is special with this language is several ready-made data structures but also the so-called "phytonized" lines of code where with one single line of code you can do what would require many lines if code in other languages.
Anyway, if you know all of these languages you will be able to jump in very easily.

Cheers

  Roberto
By Tony (RL) - 2 Years Ago
Dr. Nemesis (12/12/2018)
Man, that joint morph script is a lot like what I needed to automatically drive wrinkle maps.
I was exited before but after seeing the examples, I’m losing my mind. Good work!
+1 for early documentation. I’d love to dive deep into this as soon as humanly possible.
You already have 2 sample scripts. Can you show us the code? Even copy/paste on the forum would be fine.

One of the things I’m curious about is how the GUI is written. Is it Qt? I’ve seen some references to qt in the Iclone files previously I think.
Or are we gonna have to brush up on our Tk? All the interfaces we’ve seen so far have been simple so I’m really curious.

Again, I’m seriously excited. When I saw the batch renderer my first thought was “That’s not good enough, lacks features”. And therein lies the awesomeness of this. It was made to work exactly as reallusion designed but those who don’t find that enough no longer have to plead for improvements... at least not where scriptable tasks are concerned. If I feel the plugin doesn’t do enough I can simply add functionality or write my own.
Far too often I’ve found myself in this situation and I’m seriously glad to now have at least limited power to change that.

So please don’t be shy with videos and samples. I want as much info as you can give.


Hi Leo,

This is a nice question!
Users can write GUI for iClone by Qt.
By RobertoColombo - 2 Years Ago
Tony (RL) (12/18/2018)
RobertoColombo (12/15/2018)
Hi Tony,

one question: which IDE is going to be supported ?
Will we have a real-time debugger that helps us to step-by-step check our code while iClone is running ?
Maybe connected to Visual Studio ? Smile

Regards

  Roberto


Hi Roberto,

We won't have an IDE or other debugger environments in iClone, but iClone will have a console report function which can let you trace problems.




Hi Tony,

mmmh... that´s interesting... so we will have a tracing feature but not a step-by-step debugger capability.
It´s probably a bit limiting and I hope that in future RL can integrate something.
Of course we are at the "baby-born" stage, so I am sure you will be interested in all the suggestions and feedbacks coming from the people using these API to improve the whole framework.

Said this, you previously mentioned that the GUI is based on QtPy: they have an integrated IDE for the GUI development.
I wonder whether at least this one can be use to build up the GUI before the actual code that takes the control over iClone internal element is run.

Regards

  Roberto
By dogged2003 - 2 Years Ago
donald.dade (12/19/2018)
I'm really interested in knowing this, as well. It's disingenuous at best to say you can import Genesis characters if you leave behind everything that makes a Genesis character great. Without the JCMs, a G8 is just a mesh like any other.

Prompt good documentation on the JCMs.
Thank.
By Data Juggler - 2 Years Ago
RobertoColombo (12/12/2018)
Hi Kevin,

yes, Pythom is OOO, you can create classes and code in "OOO-thinking".
What is special with this language is several ready-made data structures but also the so-called "phytonized" lines of code where with one single line of code you can do what would require many lines if code in other languages.
Anyway, if you know all of these languages you will be able to jump in very easily.

Cheers

  Roberto

phytonized - Just because something can be accomplished in one line, doesn't mean that is the best way to write it.


By Kelleytoons - 2 Years Ago
I think everyone (including RL :>Wink knows how excited I am about the possibilities of this.  In the demo video for batch rendering it seemed to show that either a user input was needed immediately after the second render (where it wanted to know if the project needed to be saved).  Can you elaborate on that?  Does batch rendering mean you have to babysit after each render?  Why did that prompt come up and is there any way around it?

And while I've expressed this before, I'm still more concerned about the internals of iClone -- for example, currently you cannot select multiple materials and, say, add a map to a slot that propagates across all the selections (even if they are linked).  This is a prime target for a Python routine.  Hopefully such exposure will be available to us.
By Kevin L - 2 Years Ago
Thank you, Roberto, I guess I better start learning python it sounds like a very versatile language.
By Tony (RL) - 2 Years Ago
dogged2003 (12/12/2018)
Will we have access to movements? finally we can properly impose, combine movement? So that the root does not fly away and there were no horrendous flights of characters and jerking on the places of gluing? And change the names of the bones for the unification of skeletons and movements?

We will be able to write: come to the table and take a mug?


Hi dogged2003,

Yes, you can access, impose, and combine movements by Python API. You also can control bone rotation and root bone RTS, but can't rename the bone.
By mr_vidius - 2 Years Ago
this is all well and fine. but my question is.. will RL fix some of the issues that are current? like the persona issue. or will they 
make some sort of upgrade to the persona so it works in iclone? would be interesting to find that out.


vidius
By Tony (RL) - 2 Years Ago

Said this, you previously mentioned that the GUI is based on QtPy: they have an integrated IDE for the GUI development.
I wonder whether at least this one can be use to build up the GUI before the actual code that takes the control over iClone internal element is run.

Regards

  Roberto


Hi Roberto,

Unfortunately, we don't support the integrated IDE for QtPy in the first version of iClone Python API.
But the team already realized that this function is important by your suggestion, and we will consider adding it in the future.
Thank you for the suggestion and please feel free to let us know if you have any question.
By Data Juggler - 2 Years Ago
Kelleytoons (12/13/2018)
It's now the #2 programming language (Java is first).  Although it does depend on the polls (but all in in agreement about the top five).

As was said, it's a remarkably efficient language -- I can do things in five lines it took 100 lines of C# code.  So it's worth knowing (and using).

Please give me an example of something that does 5 lines in Python, versus 100 in C#.

I am paid by the hour, so this sounds horrible, but for my own knowledge I would like to know what you are talking about.

I just looked at the code for the hand puppeteering sample, and I am about to not bother learning python from looking at it.
It looks you are expected to know the names of all these objects, is that correct? 
You might not be the person to ask this, but is there something like an Object Explorer that I can find all the objects in project that are available to me.

Without Intellisense, this seems like going back to punch cards.

I have yet to see anything C# can't do, people have tried to show me F# and R and convince of some reason why C# couldn't do that, and I have never seen a convincing argument other Microsoft wanted to not use C# for something.

I will go back to my high paying open source development; I am too old to learn new tricks.

By RobertoColombo - 2 Years Ago
Hi Job,

100% agree.
Python is widely spread and today used world-wide, so something good should be in there...
RL made a choice and considering that also Blender uses it, I am ok to dig more into it: I already made a Python training in the past so now I can go one step further with Pyside2 lib which I do not know yet.

Cheers

  Roberto
By RobertoColombo - 2 Years Ago
Hi Tony,

great news that Python baby is about to be churned out! Smile
It seems that more features have been added in this first round of API  and it´s great that there is also the possibility to create a real-time GUI!!
I can´t wait for this... 

I imagine the request is probably difficult to be taken, but, still... would it ever be possible to release the documentation ahead of the 7.4 release so that people can start to get a hold of what can it be done ?

Regards

  Roberto
By Kelleytoons - 2 Years Ago
If I could learn it at MY age, ANYONE can <g>.

(And truth be told, if I had known about this language sooner I never would have stopped programming.  It's really FUN to program in Python, no more long routines to code just to do things you can do in one line.  It's truly the language I wish I could have had 40 years ago).
By Tony (RL) - 2 Years Ago
Dr. Nemesis (12/12/2018)
Man, that joint morph script is a lot like what I needed to automatically drive wrinkle maps.
I was exited before but after seeing the examples, I’m losing my mind. Good work!
+1 for early documentation. I’d love to dive deep into this as soon as humanly possible.
You already have 2 sample scripts. Can you show us the code? Even copy/paste on the forum would be fine.

 


Hi Leo,

The team is still working on polishing these showcases now.
The code of the showcases will be published when iClone 7.4 launches.
By Postfrosch - 2 Years Ago
Let me remind you about the mirror: Add a functioning mirror. The greatest number of votes 34!



And despite the high number of votes there is still no such functionAngryCryingSadWhistlingDoze
Greets from Germany
Postfrosch
By Tony (RL) - 2 Years Ago
gerdich (12/14/2018)
Me too! I can't wait!

Is the API accessible through .dll calls so that I can access it with Delphi?

I would like to have components that I can redistribute. This would allow me to integrate interactive little iClone animations in my Desktop and Mobile applications.


Hi gerdich,

Yes, you can. Please check out this Documentation to get further information.
By dogged2003 - 2 Years Ago
Will we have access to movements? finally we can properly impose, combine movement? So that the root does not fly away and there were no horrendous flights of characters and jerking on the places of gluing? And change the names of the bones for the unification of skeletons and movements?

We will be able to write: come to the table and take a mug?
By Tony (RL) - 2 Years Ago
RobertoColombo (12/12/2018)
Hi Tony,

great news that Python baby is about to be churned out! Smile
It seems that more features have been added in this first round of API  and it´s great that there is also the possibility to create a real-time GUI!!
I can´t wait for this... 

I imagine the request is probably difficult to be taken, but, still... would it ever be possible to release the documentation ahead of the 7.4 release so that people can start to get a hold of what can it be done ?

Regards

  Roberto


Hi Roberto,

I'm sorry to let you know Developer Guide will be available at the same time when iClone 7.4 is launched.
We can understand releasing it ahead of 7.4 would be the best situation, but unfortunately, the team is just too busy now for polishing Python API itself and don't have extra time to accelerate writing the guide. Crying
By RobertoColombo - 2 Years Ago
Hi Tony,

one question: which IDE is going to be supported ?
Will we have a real-time debugger that helps us to step-by-step check our code while iClone is running ?
Maybe connected to Visual Studio ? Smile

Regards

  Roberto
By justaviking - 2 Years Ago
animagic (12/19/2018)
I have never found an explanation why an adequate mirror surface could work under DX9 (not perfect, but usable) but not under DX11. 


"Not perfect, but usable."

That would be vastly better than "nothing."

And please, nobody say Iray is a replacement for a "usable" mirror in the native renderer.  That is a choice we should not have to make.

By RobertoColombo - 2 Years Ago
SmileSmileSmile

Personally I will be back home in 2 days, no way to check it before but in the meanwhile I can study the docs

  Roberto
By Postfrosch - 2 Years Ago
Maybe someone can realize via a Phyton script that you can mark several avatars with a mouse click and assign these marked avatars the same move command.
Would be very practical in connection with the LOD avatars for mass scenes

I am not a programmer but would be a user of such plugins
Greets from Germany
Postfrosch
By Kelleytoons - 2 Years Ago
It's now the #2 programming language (Java is first).  Although it does depend on the polls (but all in in agreement about the top five).

As was said, it's a remarkably efficient language -- I can do things in five lines it took 100 lines of C# code.  So it's worth knowing (and using).
By rollasoc - 2 Years Ago
Kevin L (12/12/2018)
Thank you, Roberto, I guess I better start learning python it sounds like a very versatile language.


I need to learn it too.  There was a freebie Python course on Udemy, which I need to go through.  Not sure it is free anymore.

The guitarist in my band, picked python up quickly on the raspberry pi and he is not a coder.   We had a student in at work, earlier in the year, he picked up Python in less than a week and he had never coded before. 

So hopefully, I can pick it up in a day or two (given I have been coding since 1983).
By will2power71 - 2 Years Ago
I have a question about the Joint Morphing Plugin. The question that comes to mind is where will we need to locate the morphs in order to take advantage of this? Right now, you can have morphs loaded in 3Dxchange, or you can add them later on to the morph animation section? As of right now, you can't easily transfer the morphs from one location to the other so I'd like to know how to construct my figures  to take advantage of it. Another question that comes to mind is whether or not the Joint Morphing plugin is only available for CC3 Characters or will we be able to use this feature with DAZ characters or custom characters you import? 
By Tony (RL) - 2 Years Ago
will2power71 (12/18/2018)
I have a question about the Joint Morphing Plugin. The question that comes to mind is where will we need to locate the morphs in order to take advantage of this? Right now, you can have morphs loaded in 3Dxchange, or you can add them later on to the morph animation section? As of right now, you can't easily transfer the morphs from one location to the other so I'd like to know how to construct my figures  to take advantage of it. Another question that comes to mind is whether or not the Joint Morphing plugin is only available for CC3 Characters or will we be able to use this feature with DAZ characters or custom characters you import? 


Hi will2power71,

The Joint Morphing Plugin is just a showcase for demonstrating Python API for iClone. It can automatically morph characters by applying the morphs you created in iClone.
By RobertoColombo - 2 Years Ago
Let me ask you a simple question: what's your goal for this crusade against Python?
You don't like it? Fine... don't use it.
I also personally prefer C++ or C# vs. Python but RL has chosen Python, so that's ok... no need to waste time to beg for another language.
Anything more important to discuss here?