Substance Painter
In this start to finish texturing project within Substance Painter we cover all the techniques you need to texture the robot character.
# 1 24-11-2014 , 04:40 PM
Registered User
Join Date: Nov 2014
Location: Grand Rapids, Michigan
Posts: 4

Offset Xgen Archive animation

I've created a cilia (essentially a little tentacle) that whips back and forth, which I've saved as an animated archive. I then populate a surface with these cilia. They currently are set to animate but they do so simultaneously across the surface. I'd like to offset the animation a frame every few units along the X axis, so that the cilia move in "waves". Is there way to do this, using expressions perhaps?


# 2 24-11-2014 , 06:50 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
I did a quick search and came across this: https://support.solidangle.com/displ...+a+Texture+Map
What you could try is create a ramp texture that defines your wave motion by animating the ramp positions, and then map that to the xgen animation. I don't know xgen really, so I'm not sure if there's any attribute that defines the start or timing of the archive animation.

# 3 24-11-2014 , 11:59 PM
Registered User
Join Date: Nov 2014
Location: Grand Rapids, Michigan
Posts: 4
thanks stwert, I've been trying this. Something about the way I've been writing expressions into the frame field is not working though. I'll keep at it.


# 4 26-11-2014 , 04:05 PM
Registered User
Join Date: Nov 2014
Location: Grand Rapids, Michigan
Posts: 4
Okay, I've got the animation offsetting correctly. The link stwert provided works perfectly - my earlier error was due to corrupt archives that weren't importing properly.

So I created a map in the "frame" field of the xgen description, then added an expression. It looks like this:

$a=map('${DESC}/paintmaps/TestFrame');#3dpaint,200.0
$a=20*$a+$frame+1;
$a

This offsets the animation properly. But what if I want the animation to loop - that is, when I get to frame 420 (which is the final frame of animation imported with the archive object) I want the expression to start over at frame 1. As currently written, when it gets to the value 420, it just stops animating.


# 5 26-11-2014 , 04:39 PM
EduSciVis-er
Join Date: Dec 2005
Location: Toronto
Posts: 3,374
I believe you'll want to use the modulus operator (%) which takes the remainder.
So, you could do 20*$a+(($frame)%420) + 1. On frame 20, the inside part will evaluate as 20, on frame 450, the inside part will evaluate as 30. Hope that works for you.

# 6 01-12-2014 , 08:06 PM
Registered User
Join Date: Nov 2014
Location: Grand Rapids, Michigan
Posts: 4
This works great! The (hopefully) last problem I'm struggling with now is that the archive objects that I've brought in don't render like the original. I think its because the shader is a surface shader that combines two different textures and is set to apply them based on UVs. However, when i look at the materialRef that maya creates when you import archive objects, the original object's UVs are not there. Instead there are UVs for a simple unfolded cube. Do you know where the original UVs are or why they aren't imported in?


Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads