You'll have to modify all references to rendermap to find/call ultimapper 
instead.  That includes the parameters which are adjusted dynamically such as 
the output filename.  You can get that information by setting your scene 
explorer to show all parameters ('all nodes' filter), use script names, show 
parameter values, then inspect the property in the scene explorer.  The names 
you see will be the names you use in code.  Select/mark the parameters to see 
their values.  To get the commands to call, you can click the generate maps 
button and see what pops out in the script log, then convert that to the 
scripting object model if you want to learn.

For example, changing the output filename parameter for rendermap would dump 
something like this to the script log:

SetValue( "cube.rendermap.imagefilepath", "c:\\tmp\\my_image.tga", null );

If you have a reference to the rendermap property in your code, the object 
model equivalent would be this:

oRenderMapProperty.Parameters( "imagefilepath" ).value = 
"c:\\tmp\\my_image.tga";

Notice the parameter name is the same, but having the reference to the 
rendermap property simplifies your code so you don't have to deal with absolute 
paths and strings.

The generate maps button calls the RegenerateMaps() command, so no object model 
equivalent for that.  But since it requires a rendermap property as an input 
argument, you can pass the value from the rendermap property reference than 
having to deal with strings, as illustrated in my example.  Compare that with 
what you see in the script log for comparison.

Ultimapper will have a few extra wrinkles than rendermap, such as distance from 
surface to probe with rays, and so on.  It's not a difficult task, success is 
purely based on whether you account for all the details.

Matt



From: [email protected] 
[mailto:[email protected]] On Behalf Of Nicolas Esposito
Sent: Thursday, January 09, 2014 12:29 AM
To: [email protected]
Subject: Re: Batch function for Ultimapper and Render Map

Wow Matt,
Thanks for spending time writing the script, I'll test it out together with the 
Mapify plugin to see which one could suit my needs

Sorry to ask the same question as before, but based on your Jscript for 
Ultimapper I'll just need to replace the function with the Ultimapper function, 
add the maps variables ( normals, albedo, depth, AO ) and change the specified 
ultimapper property to be "what is called Ultimapper thingy" at the end of the 
script

I'll start experimenting with the SDK editor to see if there are some usefull 
informations ;)

Thanks again Matt for the script, amazing how you guys could come out with a 
solution within few minutes just writing it down! :)

2014/1/9 Matt Lind <[email protected]<mailto:[email protected]>>

// Jscript - will need some tweaking to be functional
RenderMapSequence( 1, 100, "C:\\tmp\\my_sequence.CURRENTFRAME.tga" );

function RenderMapSequence( FrameStart, FrameEnd, FileName )
{
var oPlayControl = Dictionary.GetObject( "PlayControl" );

// get eligible objects from selection
var aFilterNames = new Array( siPolyMeshFilter, siSurfaceMeshFilter );
var oObjects = SIFilter( null, aFilterNames.join(","), true, siQuickSearch );

If ( !oObjects || oObjects.Count <=0  ) {
                LogMessage( "nothing selected", siError );
}

for ( var i = 0; i < oObjects.Count; i++ ) {

                var oObject = oObjects(i);

var oProperties = oObject.Properties.Filter( "rendermap" );
if ( oProperties.Count <= 0 ) {
                // rendermap property not found
                continue;
}
var oRenderMapProperty = oProperties(0);

for ( var j = FrameStart; j <= FrameEnd; j++ ) {

                var FrameCurrent =  j;

                // advance timeline
                oPlayControl.Parameters( "Current" ).value = FrameCurrent;

                // update the parameter defining output image file name
                var ImageFileName = FileName.replace( /CURRENTFRAME/, 
FrameCurrent );
                oRenderMapProperty.Parameters( "imagefilepath" ).value = 
ImageFileName;

                // execute specified rendermap property
                RegenerateMaps ( oRenderMapProperty.FullName );
}
}
}


From: 
[email protected]<mailto:[email protected]>
 
[mailto:[email protected]<mailto:[email protected]>]
 On Behalf Of Nicolas Esposito
Sent: Wednesday, January 08, 2014 3:19 PM
To: [email protected]<mailto:[email protected]>
Subject: Re: Batch function for Ultimapper and Render Map

The same script functionality to execute every frame and update the output file 
could be applied to Ultimapper as well, am I correct?

Sorry but I'm not too familiar with scripting, but looking at the manual looks 
nothing super-complicated ;)

2014/1/9 Nicolas Esposito <[email protected]<mailto:[email protected]>>
This is gold!
Thanks Matt and Alan ;)

2014/1/8 Alan Fregtman <[email protected]<mailto:[email protected]>>
You might find Sajjad's Mapify plugin useful as it can rendermap a sequence:

http://www.sajjadamjad.com/plugins.html#Mapify


On Wed, Jan 8, 2014 at 5:42 PM, Matt Lind 
<[email protected]<mailto:[email protected]>> wrote:
Set up the rendermap property as usual, then write a few lines of script to 
execute rendermap every frame while updating the output file path.

Matt




From: 
[email protected]<mailto:[email protected]>
 
[mailto:[email protected]<mailto:[email protected]>]
 On Behalf Of Nicolas Esposito
Sent: Wednesday, January 08, 2014 2:40 PM
To: [email protected]<mailto:[email protected]>
Subject: Batch function for Ultimapper and Render Map

I remember there was backburner for Softimage once but I suppose has been 
removed...

So, I need to use ultimapper and render map to render out each frame of my 
animation, and if I remember correctly this was doable with backburner

With Soft 2013 there is a way to achieve that?

I'm trying to replicate the effect done by Blur in this video @1.59
http://www.youtube.com/watch?v=38wh5Fn4WEs

The system or the dynamic tassellation/normal map is what I'm trying to 
achieve, but I will need the maps in order to test something else

Cheers




Reply via email to