[Sidefx-houdini-list] Delayed Read Archive Question

Jaideep Khadilkar iamjaideep80 at yahoo.com
Sat Jul 19 04:05:07 EDT 2008



HI Michael ....

The mistake I was doing was, not providing the fourth argument. I just created blank function called RiProcFree and it worked. But I am facing another problem.



I have written a Rman DSO which generates 10 arbitary positions and calls 

RiDelayedReadArchive on those positions.

Problem is, It doesn't Render all 10 copies. Sometime it renders 1 sometimes 3, 5 ,9 and I get this error for remaining copies



 File cannot be opened by RiReadArchive.



My Code Is :



RtString args[] = {"/home/jaideepk/grass_1.rib"};

RtBound mybound = {-1, 1, -1, 1, -1,1} ;

tx,ty,tz = 0;

Loop 10 times

{

                RiAttributeBegin();

                RiTranslate(tx,ty,tz);

RiProcedural((RtPointer)args,mybound,RiProcDelayedReadArchive,RiProcFree);

                RiAttributeEnd();

                tx = tx + 0.2;

}



One more thing I noticed is, when I render using one processor it only
renders 1 copy. When I use 4 processors, the number varies between 1
and 10, randomly.


When I use RiReadArchive instead of RiDelayedReadArchive, it works fine and renders all 10 copies.

Plz Help

-------iamjaideep80
(Jaideep Khadilkar)


--- On Sat, 19/7/08, Michael K O'Brien <mobrien at pixar.com> wrote:
From: Michael K O'Brien <mobrien at pixar.com>
Subject: RE: [Sidefx-houdini-list] Delayed Read Archive Question
To: sidefx-houdini-list at sidefx.com, iamjaideep80 at yahoo.com
Cc: mobrien at pixar.com
Date: Saturday, 19 July, 2008, 4:36 AM

Hola~

That's close to the way I call it. The first arg is the string pointing to
your archive. I also pass in the deallocation argument (the last arg).

            RtString* aFileNameBuf = 
                static_cast<RtString*>(malloc(sizeof(RtString*)));
            aFileNameBuf[0] = strdup(aFileName.c_str());

            RiProcedural(
                aFileNameBuf,
                aBound,
                RiProcDelayedReadArchive,
                _deallocationMethod());

Are you seeing the calls in the rib file? Are you sure the bound is within
the camera frustum?

The other thing you can do is swap out an RiReadArchive call, which is
simpler, to help debug:

            RiReadArchive(const_cast<char*>(aFileName.c_str()), 0,
RI_NULL);

MO

--
Michael K O'Brien
mobrien at pixar.com
Pixar

JEN: Just because it's Taco Bell doesn't mean it's not dinner!


> -----Original Message-----
> From: sidefx-houdini-list-bounces at sidefx.com [mailto:sidefx-houdini-list-
> bounces at sidefx.com] On Behalf Of Jaideep Khadilkar
> Sent: Friday, July 18, 2008 4:54 AM
> To: Houdini Mail List
> Subject: [Sidefx-houdini-list] Delayed Read Archive Question
> 
> 
> HI...........
> 
> I am writing a Procedural Primitive for Renderman.
> The attempt is to write a fur procedural for renderman.
> In my DSO, I am creating multiple curves using , RiCurvesV() function.
> It is working. It creates multiple curves with given points. Now, instead
> of curves,
> I want to place a custom geometry, with LOD. So I am using Delayed Read
> Archive.
> My code is something like this..
> 
> RtString args[] = {"/home/jaideepk/grass_1.rib"};
> RtBound mybound = {-1, 1, -1, 1, -1,1} ;
> RiProcedural((RtPointer)args, mybound, RiProcDelayedReadArchive,NULL);
> 
> Is it the right way to call archive? I am getting a blank output.
> 
> My grass_1.rib file is in RIB binding and not C_Binding. Is that wrong??
> 
> Plz Help
> 
> -------Jaideep
> 
> 
> 
>       Bring your gang together. Do your thing. Find your favourite Yahoo!
> group at http://in.promos.yahoo.com/groups/
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list


      Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/


More information about the Sidefx-houdini-list mailing list