Profile Picture

Project: Set Prop Diffuse Color Keys

Posted By jlittle 5 Years Ago
Rated 5 stars based on 2 votes.
Author
Message
jlittle
jlittle
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 1.9K, Visits: 17.1K
Wanted to show some details of my first script I have been working on since I decided to dive into python for iClone which turned out to be a deep, deep dive.
I've worked out most of the issues but am waiting the next iClone python update to fix some functions that are not working so that I can complete this.


On the right is the color change list where you would create a list of color changes.
Each color change has a starting color and transition and a duration.

Clicking on the color box brings up a color dialog to select your color.

So you would end up with a list of color changes:

For the color changes you can REORDER them by dragging and dropping them within the list, REMOVE them, or ADD another color change.
You can also SAVE the list to a file and LOAD a previously save list from a file or CLEAR the current ist.
At the bottom of the list is the total duration time, for all color changes, in seconds and frames as well as the number of changes in the list.

On the left is the prop list.

This list will automatically update as props are added or deleted from the scene.
As you select props in the scene the they will also be selected in the prop list.
I plan on having selections in the prop list also select the prop in the scene but ... waiting on updated python API.

Once you've created a color change list, selected your prop(s), you would then select the start and end time (via spinbox or slider), select the number of times to repeat the changes and then click the ADD button to add the diffuse color keys.

The "Remove all keys prior" will delete any color diffuse keys (once that function is exposed) prior to adding the new keys.

This project is about 90% completed and already pushing 950 lines.
Doing this project covered many aspect of python and the RL API, which was the point of this project: Learn Python and the iClone API.
It even uses Qt ui files for the layouts (main dialog and color change).
There is still some cleanup to do and then the final coding, once the functions are fixed and exposed.
It was an interesting experience and there is still much to learn about this.

Jeff





Get my Plugin Manager and TaskNotes plugins for iClone.
Check out EZColors and Other products for CTA/CA. EZColors: the easy way to change Render Styled (RS) colors!
See my CTA Tutorials on the YouTube channel CTAStepByStep

luke (RL)
luke (RL)
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)Distinguished Member (1.3K reputation)

Group: Power Developer
Last Active: 6 days ago
Posts: 245, Visits: 5.3K
wow, very useful tool, any issue found when you do this kind of tool?
toystorylab
toystorylab
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (15.7K reputation)Distinguished Member (15.7K reputation)Distinguished Member (15.7K reputation)Distinguished Member (15.7K reputation)Distinguished Member (15.7K reputation)Distinguished Member (15.7K reputation)Distinguished Member (15.7K reputation)Distinguished Member (15.7K reputation)Distinguished Member (15.7K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 4.4K, Visits: 28.8K
Nice, as far i understand what it is doing Wink
Would this be possible with diffuse JPEGs/PNGs?



Toystorylab on Vimeo : https://forum.reallusion.com/uploads/images/ce44ea78-6984-47d8-9bf4-b783.png    Crassitudes (my "Alter Ego") on Youtube: https://forum.reallusion.com/uploads/images/fcc4df30-b3a8-40a5-a427-0735.png

jlittle
jlittle
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 1.9K, Visits: 17.1K
toystorylab (1/18/2019)
Would this be possible with diffuse JPEGs/PNGs?

Well, the framework of my script would definitely handle that.
Could easily change the color to a tile and the transition to a channel selection.

I have not tried the AddUvDataKey function yet and am unsure of the format of the kUVTile parameter.
I'll look into it some.

Jeff




Get my Plugin Manager and TaskNotes plugins for iClone.
Check out EZColors and Other products for CTA/CA. EZColors: the easy way to change Render Styled (RS) colors!
See my CTA Tutorials on the YouTube channel CTAStepByStep

jlittle
jlittle
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)Distinguished Member (6.7K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 1.9K, Visits: 17.1K
luke (RL) (1/18/2019)
... any issue found when you do this kind of tool?

There was a little learning curve, for me, on using python but being a looong time programmer it was just a matter of finding where everything was at.
Mostly the issues have been missing API functions that are needed or questions about constants:
  1) How do I get a list of all the material keys?
  2) How do I delete all, or just one, material key?
  3) How do I add a material transition key?
  4) Why are there 36 transition types (ETransitionType_<type>Wink listed in RLPy.py but iClone only shows 16 transition Curve Presets?
  5) What format is the kUVTile parameter?

I haven't gone thru all the functions yet since as my first project I pretty much just stuck to the one area of materials mostly.

Jeff




Get my Plugin Manager and TaskNotes plugins for iClone.
Check out EZColors and Other products for CTA/CA. EZColors: the easy way to change Render Styled (RS) colors!
See my CTA Tutorials on the YouTube channel CTAStepByStep

RobertoColombo
RobertoColombo
Posted 5 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)Distinguished Member (10.2K reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 1.6K, Visits: 3.0K
Hope RL will improve the doc in order to fill the gaps...

My PC:
OS: Windows 10 Pro English 64-bit / CPU: Intel i7-9700 3.6GHz / MB: ASUS ROG Strix Z390  RAM: 32GB DDR4 2.6GHz / HD: 2TB+3TB  /  
SSD: 2x512GB Samsung 860 EVO + 1x2TB Samsung
VB: Palit GTX2080 TI GamingPro 11GB / AB: embedded in the MB and VB (audio from the MOTU M4 I/F) / DirectX: 12

Edited
5 Years Ago by RobertoColombo



Reading This Topic