View Full Version : How would you script texture change?
Daitoku 10-03-2006, 05:23 PM Here is an interesting puzzle. Formerly this job was done in Maya with python scripting to make it go smoothly. How can it be done in C4D
A client of mine, a fabric manufacturer, asked if I could render a single frame but change the texture each time. They come out with new fabrics every quarter and a streamlined solution is my goal.
Here is an example of the picture I will be changing the texture on, and the texture swatches I will be given.
http://www.rgbdesignstudio.com/chair_ext.jpg
http://www.rgbdesignstudio.com/swatch.gif
My only thought right now is to change the name of the files to a create an image sequence but this would add a lot of work as they would have to be renamed afterwards to match an xml file for the flash interface.
Thanks,
Eric
|
|
You can use Xpresso to animate the texture file name in a bitmap shader.
Using a condition node conencted to a time node (frame) you can easily render this as an animation where each frame uses a different texturefile.
Cheers
Björn
Daitoku
10-03-2006, 05:41 PM
Can I get xpresso to check a folder in the finder (on mac here), and create one frame per file in the folder?
No, i think this would require a real plugin. Why is it important that the files are saved in a different folder then the project folder?
Cheers
Björn
Daitoku
10-03-2006, 06:27 PM
The save location does not matter, forgive me if I was unclear.
The main challenge will be taking the 200+ swatches and rendering them onto the 3D models in the pictures. Since the only thing changing will be the swatch I was hoping to automate the process so I want C4D to look at the folder, read that there are 212 swatch files and then render out 212 pictures.
As an aside there are 4 categories and they change every quarter so I am actually looking at 500-1000 final pictures, thus the request for help.
In this case it is pretty easy if you are able to simply give the bitmap files in question incrementing numbers, preferably starting with 0 (Texture0.tif, Texture1.tif, etc.)
Then the Xpresso setup boils down to some realy primitive stuff
Hope this helps
Björn
Per-Anders
10-03-2006, 09:27 PM
If it's jsut the color changing then i would have thought the easiest way would be to make a movie or frame sequence out of all the textures and load that into your color channel, then just render.
If it's jsut the color changing then i would have thought the easiest way would be to make a movie or frame sequence out of all the textures and load that into your color channel, then just render.
Hm, somehow i have the feeling i just solved something realy simple and straight forward with 100% to much Xpresso :)
Daitoku, go with Pers suggestion, you can even leave out the movie assembling. CINEMA 4D will accept a series of numbered images as an animated texture just fine.
Cheers
Björn
CGTalk Moderation
10-04-2006, 05:57 AM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.