www.BinaryAlchemy.de :: View topic - RR can't find files rendered with Clarisse/CNODE
 SearchSearch   RegisterRegister  ProfileProfile   UsergroupsUsergroups   Log inLog in 
If you create a new post, please use a topic that describes your problem
Documento sin título
 
RR can't find files rendered with Clarisse/CNODE

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.BinaryAlchemy.de Forum Index -> old - RR Questions - v6.x
View previous topic :: View next topic  
Author Message

Arvid



Joined: 17 Dec 2010
Posts: 36
Location/Company/Country: Stopp Stockholm Sweden

PostPosted: Thu Oct 17, 2013 9:22 am    Post subject: RR can't find files rendered with Clarisse/CNODE Reply with quote

Output paths in Clarisse are generally written like this: "//path/file.####", without an explicit file extension.

This causes RR to never finds the written files, and the render never completes as far as RR is concerned even though the files have been written successfully. This is because CNODE adds the file extension at render time, but I think RR assumes the file shouldn't have an extension because it's not part of the output string.

This becomes a problem because, if you do add the extension explicitly in Clarisse, it will tack on a second extension if you render locally, giving you "file.0001.exr.exr". So whatever I do, files rendered with RR and files rendered locally doesn't get the same file name.

I talked to Isotropix about it as well here: http://forum.isotropix.com/viewtopic.php?f=18&t=314&p=1059#p1059

What do you think is the best solution?
Back to top
View user's profile Send private message Visit poster's website

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Thu Oct 17, 2013 12:38 pm    Post subject: Reply with quote

Hmm, then there was something changed in CNode.

The fix would probably just be that the <ImageExtension> is removed from the render config file.
I have logged the issue.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Arvid



Joined: 17 Dec 2010
Posts: 36
Location/Company/Country: Stopp Stockholm Sweden

PostPosted: Thu Oct 17, 2013 12:58 pm    Post subject: Reply with quote

Thanks Holger!
Back to top
View user's profile Send private message Visit poster's website

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Thu Oct 17, 2013 2:09 pm    Post subject: Reply with quote

Edit:
I misunderstood.
The double extension is produced if you render without RR.
And you have to specify the extension in clarisse that RR finds the output.
The clarisse xml reader has to be updated.

There is some glitch in the current version. But there is a workaround for the bug.
Please use
file.#####
instead of
file.####
in your Clarisse file.

(Don't ask, but our test files has 5 paddings and somehow a function part was not tested with other paddings)
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Arvid



Joined: 17 Dec 2010
Posts: 36
Location/Company/Country: Stopp Stockholm Sweden

PostPosted: Thu Oct 17, 2013 3:29 pm    Post subject: Reply with quote

Interesting! Yes, it does in fact render as expected with 5 hashes. Smile
Back to top
View user's profile Send private message Visit poster's website

Arvid



Joined: 17 Dec 2010
Posts: 36
Location/Company/Country: Stopp Stockholm Sweden

PostPosted: Fri Oct 18, 2013 5:29 pm    Post subject: Reply with quote

Another thing, it seems that I get a double period before the frame numbers, ie. file..00001.exr.
Back to top
View user's profile Send private message Visit poster's website

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Fri Oct 18, 2013 5:40 pm    Post subject: Reply with quote

Does the error appear in rrSubmitter or at render time?
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Arvid



Joined: 17 Dec 2010
Posts: 36
Location/Company/Country: Stopp Stockholm Sweden

PostPosted: Mon Oct 21, 2013 8:58 am    Post subject: Reply with quote

As far as I can tell, it appears in the submitter only. I can change the fields and get a correct render.
Back to top
View user's profile Send private message Visit poster's website

Arvid



Joined: 17 Dec 2010
Posts: 36
Location/Company/Country: Stopp Stockholm Sweden

PostPosted: Mon Nov 04, 2013 1:40 pm    Post subject: Reply with quote

I just installed 6.02.21_7a, just wanted to say that the problems are still there. I can't get the same output from an RR render Vs. a local Clarisse render.

If I leave hashes out entierly, I get a working RR render, ie "file.####.exr", but then local renders end up like this: "file#####.ext".

If I explicitly say "file.#####" in Clarisse, RR wants to render to "file..####.exr". What I do at the moment is to manually remove the extra dot that appears in the submitter before sending the job.
Back to top
View user's profile Send private message Visit poster's website

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Mon Nov 04, 2013 2:42 pm    Post subject: Reply with quote

I will recheck it with the double point.
But the extension problem should be fixed now.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Arvid



Joined: 17 Dec 2010
Posts: 36
Location/Company/Country: Stopp Stockholm Sweden

PostPosted: Mon Nov 04, 2013 3:16 pm    Post subject: Reply with quote

Yes, the only remaining problems is that RR always renders with 4 hashes regardless of the number entered in the string, and the double dot.
Back to top
View user's profile Send private message Visit poster's website

Arvid



Joined: 17 Dec 2010
Posts: 36
Location/Company/Country: Stopp Stockholm Sweden

PostPosted: Mon Nov 04, 2013 6:35 pm    Post subject: Reply with quote

I'm thinking about whether it's possible to create a script that launches the submitter with everything pre-filled instead of loading the scene through the submitter. I guess I'll take a look at the Nuke submitter script and see if I can modify it for Clarisse, that would be much neater Smile
Back to top
View user's profile Send private message Visit poster's website

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Mon Nov 04, 2013 7:12 pm    Post subject: Reply with quote

That was discussed with Isotropix.
Either create a rrSubmission script that writes an XML. (Like most of the rr submissions via a python xml class)
Which would require script commands to read all settings.

Or they output an XML in their own format and RR has to read that file.
They have choosen this one.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Arvid



Joined: 17 Dec 2010
Posts: 36
Location/Company/Country: Stopp Stockholm Sweden

PostPosted: Tue Nov 05, 2013 9:53 am    Post subject: Reply with quote

Ok, too bad. I'm fairly sure the first option can be done though. I already got a modified script inside Clarisse that sends data into the submitter, and it's substantially faster than calling CNODE -info. I'll try to make it work.

I also noticed that Clarisse.cfg may need to be updated, the current install path is:
c:\Program Files\Isotropix\Clarisse iFX 1.5 SP3\Clarisse\

so I added this line to make the submitter find cnode.exe correctly:
Path= OS; c:\Program Files\Isotropix*\Clarisse*\Clarisse\cnode.exe
Back to top
View user's profile Send private message Visit poster's website

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Tue Nov 05, 2013 12:58 pm    Post subject: Reply with quote

I think one issue was that I asked for a scripted plugin. That you have a menu item to submit the job.
And that was not possible at that time.

How do you call your script within Clarisse? Do you have to browse each time to the script file?
If it is python, take a look at rrSubmit_Nuke_5.py, it shows you how you can create an xml and start the rrSubmitter.

If it is a better solution , I might offer both ways to submit.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Arvid



Joined: 17 Dec 2010
Posts: 36
Location/Company/Country: Stopp Stockholm Sweden

PostPosted: Tue Nov 05, 2013 1:35 pm    Post subject: Reply with quote

I see, since v1.5 there's a tool shelf where custom commands can be accessed through buttons, so that should be possible now. Right, at the moment I'd have to browse for the script and run it, but I figure I should be able to add it to the shelf.

That's exactly what I did, seems the Nuke script is very close, and the submitter launches with the data I put into the xml class. I can extract frame data and that sort of stuff from the internal python helper class in Clarisse as well so I should be able to at least make a rudimentary proof of concept with that.
Back to top
View user's profile Send private message Visit poster's website

Arvid



Joined: 17 Dec 2010
Posts: 36
Location/Company/Country: Stopp Stockholm Sweden

PostPosted: Wed Nov 06, 2013 10:35 am    Post subject: Reply with quote

Here, I've created a working submitter script, it can be added manually to the shelf in Clarisse by right-clicking it and choosing "Add item" then browse for this python script. It's not fully featured I suppose, but it's a good start.

Code:



# Royal Render Plugin script for Nuke 5+
# Author: Royal Render, Holger Schoenberger, Binary Alchemy
# Last change: v 6.01.70
# Copyright (c) 2009-2012 Holger Schoenberger - Binary Alchemy
# rrInstall_Copy: \plugins\
# rrInstall_Change_File: \plugins\menu.py, before "# Help menu", "m =  menubar.addMenu(\"RRender\");\nm.addCommand(\"Submit Comp\", \"nuke.load('rrSubmit_Nuke_5'), rrSubmit_Nuke_5()\")\n\n"



#
# Modified for use with Isotropix Clarisse 1.5 by Arvid Bjorn
#

ix.enable_command_history()

import os
import sys
import platform
import random
import string

from xml.etree.ElementTree import ElementTree, Element, SubElement


#####################################################################################
# This function has to be changed if an app should show info and error dialog box   #
#####################################################################################

def writeInfo(msg):
    ix.log_info(msg)

def writeError(msg):
    ix.log_warning(msg)


##############################################
# JOB CLASS                                  #
##############################################


class rrJob(object):
    """Stores scene information """
    version = ""
    software = ""
    renderer = ""
    requiredPlugins = ""
    sceneName = ""
    sceneDatabaseDir = ""
    seqStart = 0
    seqEnd = 100
    seqStep = 1
    seqFileOffset = 0
    seqFrameSet = ""
    imageWidth = 99
    imageHeight = 99
    imageDir = ""
    imageFileName = ""
    imageFramePadding = 4
    imageExtension = ""
    imagePreNumberLetter = ""
    imageSingleOutput = False
    sceneOS = ""
    camera = ""
    layer = ""
    channel = ""
    maxChannels = 0
    channelFileName = []
    channelExtension = []
    isActive = False
    sendAppBit = ""
    preID = ""
    waitForPreID  = ""
    CustomA  = ""
    CustomB  = ""
    CustomC  = ""
    LocalTexturesFile  = ""

    def __init__(self):
        pass

    # from infix.se (Filip Solomonsson)
    def indent(self, elem, level=0):
        i = "\n" + level * ' '
        if len(elem):
            if not elem.text or not elem.text.strip():
                elem.text = i + " "
            for e in elem:
                self.indent(e, level + 1)
                if not e.tail or not e.tail.strip():
                    e.tail = i + " "
            if not e.tail or not e.tail.strip():
                e.tail = i
        else:
            if level and (not elem.tail or not elem.tail.strip()):
                elem.tail = i
        return True

    def subE(self, r, e, t):
        sub = SubElement(r, e)
        sub.text = str(t)
        return sub

    def writeToXMLstart(self, submitOptions ):
        rootElement = Element("RR_Job_File")
        rootElement.attrib["syntax_version"] = "6.0"
        self.subE(rootElement, "DeleteXML", "1")
        self.subE(rootElement, "SubmitterParameter", submitOptions)
        # YOU CAN ADD OTHER NOT SCENE-INFORMATION PARAMETERS USING THIS FORMAT:
        # self.subE(jobElement,"SubmitterParameter","PARAMETERNAME=" + PARAMETERVALUE_AS_STRING)
        return rootElement

    def writeToXMLJob(self, rootElement):

        jobElement = self.subE(rootElement, "Job", "")
        self.subE(jobElement, "Software", self.software)
        self.subE(jobElement, "Renderer", self.renderer)
        self.subE(jobElement, "RequiredPlugins", self.requiredPlugins)
        self.subE(jobElement, "Version", self.version)
        self.subE(jobElement, "SceneName", self.sceneName)
        self.subE(jobElement, "SceneDatabaseDir", self.sceneDatabaseDir)
        self.subE(jobElement, "IsActive", self.isActive)
        self.subE(jobElement, "SeqStart", self.seqStart)
        self.subE(jobElement, "SeqEnd", self.seqEnd)
        self.subE(jobElement, "SeqStep", self.seqStep)
        self.subE(jobElement, "SeqFileOffset", self.seqFileOffset)
        self.subE(jobElement, "SeqFrameSet", self.seqFrameSet)
        self.subE(jobElement, "ImageWidth", int(self.imageWidth))
        self.subE(jobElement, "ImageHeight", int(self.imageHeight))
        self.subE(jobElement, "ImageDir", self.imageDir)
        self.subE(jobElement, "ImageFilename", self.imageFileName)
        self.subE(jobElement, "ImageFramePadding", self.imageFramePadding)
        self.subE(jobElement, "ImageExtension", self.imageExtension)
        self.subE(jobElement, "ImageSingleOutput", self.imageSingleOutput)
        self.subE(jobElement, "ImagePreNumberLetter", self.imagePreNumberLetter)
        self.subE(jobElement, "SceneOS", self.sceneOS)
        self.subE(jobElement, "Camera", self.camera)
        self.subE(jobElement, "Layer", self.layer)
        self.subE(jobElement, "Channel", self.channel)
        self.subE(jobElement, "SendAppBit", self.sendAppBit)
        self.subE(jobElement, "PreID", self.preID)
        self.subE(jobElement, "WaitForPreID", self.waitForPreID)
        self.subE(jobElement, "CustomA", self.CustomA)
        self.subE(jobElement, "CustomB", self.CustomB)
        self.subE(jobElement, "CustomC", self.CustomC)
        self.subE(jobElement, "LocalTexturesFile", self.LocalTexturesFile)
        for c in range(0,self.maxChannels):
           self.subE(jobElement,"ChannelFilename",self.channelFileName[c])
           self.subE(jobElement,"ChannelExtension",self.channelExtension[c])
        return True



    def writeToXMLEnd(self, f,rootElement):
        xml = ElementTree(rootElement)
        self.indent(xml.getroot())

        if not f == None:
            xml.write(f)
            f.close()
        else:
            print("No valid file has been passed to the function")
            try:
                f.close()
            except:
                pass
            return False
        return True



##############################################
# Global Functions                           #
##############################################

def getRR_Root():
    if os.environ.has_key('RR_ROOT'):
        return os.environ['RR_ROOT']
    HCPath="%"
    if ((sys.platform.lower() == "win32") or (sys.platform.lower() == "win64")):
        HCPath="\\\\dvs\\dvs02\\Assets\\RoyalRender"
    elif (sys.platform.lower() == "darwin"):
        HCPath="%RRLocationMac%"
    else:
        HCPath="%RRLocationLx%"
    if HCPath[0]!="%":
        return HCPath
    writeError("This plugin was not installed via rrWorkstationInstaller!")


def getNewTempFileName():
    random.seed()
    if ((sys.platform.lower() == "win32") or (sys.platform.lower() == "win64")):
        if os.environ.has_key('TEMP'):
            nam=os.environ['TEMP']
        else:
            nam=os.environ['TMP']
        nam+="\\"
    else:
        nam="/tmp/"
    nam+="rrSubmitClarisse_"
    nam+=str(random.randrange(1000,10000,1))
    nam+=".xml"
    return nam

def getRRSubmitterPath():
    ''' returns the rrSubmitter filename '''
    rrRoot = getRR_Root()
    if ((sys.platform.lower() == "win32") or (sys.platform.lower() == "win64")):
        rrSubmitter = rrRoot+"\\win__rrSubmitter.bat"
    elif (sys.platform.lower() == "darwin"):
        rrSubmitter = rrRoot+"/bin/mac/rrSubmitter.app/Contents/MacOS/rrSubmitter"
    else:
        rrSubmitter = rrRoot+"/lx__rrSubmitter.sh"
    return rrSubmitter


def getOSString():
    if ((sys.platform.lower() == "win32") or (sys.platform.lower() == "win64")):
        return "win"
    elif (sys.platform.lower() == "darwin"):
        return "osx"
    else:
        return "lx"


def submitJobsToRR(jobList,submitOptions):
    tmpFileName = getNewTempFileName()
    tmpFile = open(tmpFileName, "w")
    xmlObj= jobList[0].writeToXMLstart(submitOptions)
    for submitjob in jobList:
        submitjob.writeToXMLJob(xmlObj)
    ret = jobList[0].writeToXMLEnd(tmpFile,xmlObj)
    if ret:
        writeInfo("Job written to " + tmpFile.name)
    else:
        writeError("Error - There was a problem writing the job file to " + tmpFile.name)
    os.system(getRRSubmitterPath()+"  \""+tmpFileName+"\"")



###########################################
# Read Nuke file                          #
###########################################

def rrSubmit_fillGlobalSceneInfo(newJob):
    newJob.version = "1.5" # How do I find the Clarisse version?
    newJob.software = "Clarisse"
    newJob.sceneOS = getOSString()


def rrSubmit_CreateAllJob(jobList,noLocalSceneCopy):
    newJob= rrJob()


def getFileFormat(id):
    if id==0: return ".exr"
    if id==1: return ".exr"
    if id==2: return ".jpg"
    if id==3: return ".bmp"
    if id==4: return ".tga"
    if id==5: return ".png"
    if id==6: return ".png"
    if id==7: return ".tif"
    if id==8: return ".tif"
    if id==9: return ".tif"
    return ""

def getProjectPath():
    path = ix.application.get_factory().get_vars().get("PDIR").get_string() + "/"
    project_file = ix.application.get_factory().get_vars().get("PNAME").get_string()

    if project_file.find(".project") == -1: project_file += ".project"

    project = path + project_file

    return path, project, project_file



def rrSubmit_CreateSingleJobs(jobList):

    path, project, project_file = getProjectPath()

    if ix.selection.get_count() == 0:
        writeError("Please select one or more Images!")
        return False
    else:

        for i in range(ix.selection.get_count()):
            item = ix.selection[i]
            if os.environ.has_key('PNAME'): writeInfo("Name: "+os.environ['PNAME'])


            if item.is_kindof("Image"):
                enabled = item.attrs.render_to_disk[0]
                if enabled:
                    newJob= rrJob()
                    rrSubmit_fillGlobalSceneInfo(newJob)
                    newJob.sceneName = project_file
                    newJob.isActive = True
                    newJob.sceneName = project
                    newJob.sceneDatabaseDir = path
                    newJob.layer = item.get_full_name()
                    first_frame = item.attrs.first_frame[0]
                    last_frame = item.attrs.last_frame[0]

                    save_as = item.attrs.save_as[0]
                    pad = save_as.count("#")
                    if pad > 0: newJob.imageFramePadding = pad

                    newJob.imageFileName = save_as

                    newJob.imageExtension = getFileFormat(item.attrs.format[0])
                    newJob.seqStart = first_frame
                    newJob.seqEnd = last_frame

                    jobList.append(newJob)

    return True



def rrSubmit_Clarisse_1():
    writeInfo ("rrSubmit v 6.01.70")
    path, project, project_file = getProjectPath()

    jobList= []
    noLocalSceneCopy= [False]
    #rrSubmit_CreateAllJob(jobList,noLocalSceneCopy)
    success = rrSubmit_CreateSingleJobs(jobList)
    submitOptions=""
    if (noLocalSceneCopy[0]):
        submitOptions="AllowLocalSceneCopy=0~0"
    if success:
        ix.save_project(project)
        submitJobsToRR(jobList,submitOptions)


rrSubmit_Clarisse_1()



ix.disable_command_history()

Back to top
View user's profile Send private message Visit poster's website

schoenberger
Site Admin


Joined: 02 Mar 2005
Posts: 3786

PostPosted: Thu Nov 07, 2013 1:55 pm    Post subject: Reply with quote

Many Thanks.
I have logged a ticket to fix the last issues with the script and install it with the WorkstationInstaller.
But for now the old scene parser will be fixed.
_________________
Holger Schönberger
Binary Alchemy - digital materialization
Back to top
View user's profile Send private message Send e-mail

Arvid



Joined: 17 Dec 2010
Posts: 36
Location/Company/Country: Stopp Stockholm Sweden

PostPosted: Fri Nov 08, 2013 10:41 am    Post subject: Reply with quote

Cool!

I'm sure it can be improved upon though, I'll keep you updated if I make any useful changes.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.BinaryAlchemy.de Forum Index -> old - RR Questions - v6.x All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 
Documento sin título
 



Powered by phpBB © 2001, 2002 phpBB Group



Number of shameful bots caught by Anti-Spam ACP: 1667