Profile Picture

Automate changing accessories and materials

Posted By stevew 2 Years Ago
You don't have permission to rate!
Author
Message
stevew
stevew
Posted 2 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)

Group: Forum Members
Last Active: 3 Months Ago
Posts: 244, Visits: 1.2K
Can I load a character and changed the above than save the character?
Data Juggler
Data Juggler
Posted 2 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 1.7K, Visits: 5.4K
Hi, not sure if this will help you, but maybe it will

Breaking this down into parts, because I can only answer what I know / read.
1. Load a character.
I don't know if this works, but this Python script of mine which I am sure I copied from a Reallusion example, reads the registry to load a box.

Build Chair
https://github.com/DataJuggler/PythonScripts/blob/main/Build%20Chair.py
  
# make sure to include winreg at the top of your file to read the registry as shown below

import os, RLPy, math
from winreg import *
from PySide2 import QtWidgets
from PySide2.shiboken2 import wrapInstance
from PySide2.QtCore import *
    
    #-- Get iClone 7 default template path --#
    Registry = ConnectRegistry(None, HKEY_LOCAL_MACHINE)
    RawKey = OpenKey(Registry, r"SOFTWARE\Reallusion\iClone\7.0")
    ic_template_path = os.path.abspath(QueryValueEx(RawKey, "Template Data" )[0])
    
    fileName = ic_template_path + "//iClone Template//Props//3D Blocks//Beveled//Rounded_Box.iProp"
    #-- Load iProp --#
    chair = RLPy.RFileIO.LoadObject(fileName)

I have never tried an avatar, but you could try getting the path to the character you want to load. If the character doesn't work as with the ccProject extension, you can rename it as iAvatar or iProject, I forget which one.

As per the accessories, if you turn them into a prop, the above should work. Just save the item in your Custom folder and right click Find File should give you the path.

As per changing the material, this can be done. If you are referring to changing it during a running video, this can't be done, but you can fake it out.

This python script: ImageRotator.py
https://github.com/DataJuggler/PythonScripts/blob/main/ImageRotator.py

Lets you appear to change out textures, by making a clone of the object and then showing or hiding the right one on the timeline.

Here is a short video of it if you want to watch:
https://youtu.be/1CofuIXuxVg



If that doesn't help when I get some tomorrow I can try. What exactly are you trying to do?

Corby


Creator of the free website:
PixelDatabase.Net
A Free Online Text Based Image Editor
https://forum.reallusion.com/uploads/images/6e6663e2-0ecf-447a-ab3d-d49d.png

stevew
stevew
Posted 2 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)

Group: Forum Members
Last Active: 3 Months Ago
Posts: 244, Visits: 1.2K
Hi Corby,
Using Mason G6 Char.
I want to be able to load in an this then change materials eg jeans colour from blue to grey (either changing the hue etc ) or load in a new material for the jeans. Swap a hat / glasees etc then save out the new Mason (Mason1.iAvatar) and also render the  Image (Mason1.JPG) for each change.

I have manage to load in Mason via the script above:
RLPy.RFileIO.LoadFile(ic_template_path + "//iClone Template////Character//01_G6 Character//Mason.iAvatar")

I'll have a play with changing the materials and let you know.


Data Juggler
Data Juggler
Posted 2 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)Distinguished Member (12.5K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 1.7K, Visits: 5.4K
Thanks for the update.

I haven't done in anything with accessories. My biggest wish list for API improvements is the ability to get child props for an object or character in your case.

I have written and consumed API's. The only way to make an API good, is if the development team that builds the product, has to use the same API as end users (with different abilities for internal and external use).

When a company uses C++ for their own work, and then "Exposes" an API for end users, it never gets updated with enough features.

IClone programmers can put socks on a character, between their feet and their shoes, and I wouldn't know where to start, so smarter people than me write 3D software.


Creator of the free website:
PixelDatabase.Net
A Free Online Text Based Image Editor
https://forum.reallusion.com/uploads/images/6e6663e2-0ecf-447a-ab3d-d49d.png

stevew
stevew
Posted 2 Years Ago
View Quick Profile
Distinguished Member

Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)Distinguished Member (7.9K reputation)

Group: Forum Members
Last Active: 3 Months Ago
Posts: 244, Visits: 1.2K
If I created a Moro slider can I automate the sliders through python ?



Reading This Topic