🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
4 messages
4 total messages Started by U54876 Fri, 11 Dec 1992 22:42
_very_ basic RenderMan question
#2019
Author: U54876
Date: Fri, 11 Dec 1992 22:42
23 lines
969 bytes
Hello -

  To all you experienced NeXT programmers out there, a very basic question abou
t RenderMan from someone who has just started programming.
  I have copied, verbatim, the "minimal program using RenderMan" from page 18
of The RenderMan Companion, saved it as test.c, and tried to compile it using:
cc -lMedia_s test.c -o test

I get:

/bin/ld: Undefined symbols:
_RiBegin
_RiWorldBegin
_RiSurface
_RI_P
_RiPolygon
_RiWorldEnd
_RiEnd

Can anyone take a little time to e-mail some help to me?  It would be greatly
appreciated.

-Tom
Re: _very_ basic RenderMan question
#2040
Author: Joseph Goldstone
Date: Sun, 13 Dec 1992 11:02
53 lines
2673 bytes
<U54876@uicvm.uic.edu> writes
> Hello -
> 
>   To all you experienced NeXT programmers out there, a very basic question
> about RenderMan from someone who has just started programming.
>   I have copied, verbatim, the "minimal program using RenderMan" from page 18
> of The RenderMan Companion, saved it as test.c, and tried to compile it  
using:
> cc -lMedia_s test.c -o test
> 
> I get:
> 
> /bin/ld: Undefined symbols:
> _RiBegin
> _RiWorldBegin
> _RiSurface
> _RI_P
> _RiPolygon
> _RiWorldEnd
> _RiEnd
> 
...

You can't get there from here.

To compile the programs in the Companion you would need to be able to either  
directly link in the renderer, or link in the RIB client library routines that  
emit the RIB eaten by the renderer (which in this case is the renderer in  
/usr/prman/prman).  But neither of these avenues are possible with what's  
shipped by NeXT; you have to order a separate product from Pixar.  At the  
bottom of Intro3DKit.rtf (search in Librarian with General Reference selected)  
you will find the following enlightenment:

I3DK> Other components of the RenderMan Toolkit aren't
I3DK> included in NeXTSTEP Release 3 the tutorials, a
I3DK> linkable renderer, a RIB library, and so forth.  To get
I3DK> these, you must purchase the RenderMan Toolkit from
I3DK> Pixar.  If you've written programs using the RenderMan
I3DK> Toolkit, they will not work in NeXTSTEP 3.0 directly;
I3DK> you'll need to rewrite them to make use of the 3D Kit.

Note that even if you had, for example, librib.a, once you moved on to the more  
ambitious examples in the book you would find there was a lot of missing  
"scaffolding" code that you would need to make the programs work - routines to  
position the camera for the scene, and so on.  The Developer's Toolkit comes  
with all this stuff, plus a bunch of doc - a second copy of the companion, a  
copy of the Interface spec, notes on all the RiOption calls that make sense for  
prman, and a set of "PhotoRealistic RenderMan Application Notes".  Application  
note #15, on making shadows, is 15 pages long!

Pixar's telephone number is (510) 236-4000; their fax is (510) 236-0388.

-- joseph
Re: _very_ basic RenderMan question
#2050
Author: Thomas Roettig
Date: Mon, 14 Dec 1992 13:48
62 lines
2000 bytes
In article <92346.164214U54876@uicvm.uic.edu> <U54876@uicvm.uic.edu> writes:
> Hello -
> 
>   To all you experienced NeXT programmers out there, a very basic question  
abou
> t RenderMan from someone who has just started programming.
>   I have copied, verbatim, the "minimal program using RenderMan" from page 18
> of The RenderMan Companion, saved it as test.c, and tried to compile it using:
> cc -lMedia_s test.c -o test
> 
> I get:
> 
> /bin/ld: Undefined symbols:
> _RiBegin
> _RiWorldBegin
> _RiSurface
> _RI_P
> _RiPolygon
> _RiWorldEnd
> _RiEnd
> 
> Can anyone take a little time to e-mail some help to me?  It would be greatly
> appreciated.
> 
> -Tom
Try it that way:
-------------------------
#import <ri/ri.h>

RtPoint Square[4]={{.5,.5,.5}, {0.5,-.5,.5}, {-.5,-.5,.5}, {-.5,.5,.5}};

int main(void)
{
	char *archive = "archive";
	
	RiBegin(RI_NULL, "renderer", &archive, RI_NULL);	/*Start the renderer */
		RiWorldBegin();
			RiSurface("constant", RI_NULL);
			RiPolygon(4,						 
		/*Declare the square */
				RI_P, (RtPointer) Square, RI_NULL);
		RiWorldEnd();
	RiEnd();								 
			/* Clean up			 */
	return 0;
}
------------------------
To compile use a Makefile with something like this:

--------------------------
rib: 1.c 
	cc -g -O -Wall -o rib 1.c -lMedia_s  -lNeXT_s
--------------------------
This gets you going.

--

Gruss 
Tom
_____________________________________
Thomas Roettig
thomas@nice.usergroup.ethz.ch
Re: _very_ basic RenderMan question
#2069
Author: Shane G. Artis
Date: Tue, 15 Dec 1992 03:34
72 lines
3280 bytes
In article <1992Dec13.110209.5345@lilliput.fdn.org> joseph@lilliput.fdn.org (Joseph Goldstone) writes:
><U54876@uicvm.uic.edu> writes
>> Hello -
>> 
>>   To all you experienced NeXT programmers out there, a very basic question
>> about RenderMan from someone who has just started programming.
>>   I have copied, verbatim, the "minimal program using RenderMan" from page 18
>> of The RenderMan Companion, saved it as test.c, and tried to compile it  
>using:
>> cc -lMedia_s test.c -o test
>> 
>> I get:
>> 
>> /bin/ld: Undefined symbols:
>> _RiBegin
>> _RiWorldBegin
>> _RiSurface
>> _RI_P
>> _RiPolygon
>> _RiWorldEnd
>> _RiEnd
>> 
>...
>
>You can't get there from here.
>
>To compile the programs in the Companion you would need to be able to either  
>directly link in the renderer, or link in the RIB client library routines that  
>emit the RIB eaten by the renderer (which in this case is the renderer in  
>/usr/prman/prman)..

<edited>

Actually, I disagree, up to a point.  I have successfully written and
compiled and executed most of the basic examples in The RenderMan
Companion.  The functions RiBegin(), RiSurface(), etc. exist quite
nicely in libMedia_s.a, and /usr/include/3DKit/ri.h handles things
quite nicely.  I think this person's basic problem is that to compile
you need to use the command:

	cc -g -O RIfile.c -o RIfile -lMedia_s -lNeXT_s

i.e. the libraries need to be at the END of the command line.  The
developers RenderMan is probably basically the same as the NeXT
version, but better documented, more tutorials, a linkable renderer
(for adding new capabilities, like trace(), and a RIB library).  Note
that the big feature here is the linkable renderer.

I think NeXT doesn't want to support the standard Ri() commands
themselves, at the expense of their nice Objective-C environment, but
they still work just fine if you want to use them.

This reasoning may break down when using more sophisticated examples
that I haven't tried yet, but so far I've been able to link in every
Ri function that I've needed to use, and that includes some pretty
sophisticated ones.

By the way, I haven't yet gotten one of the standard RenderMan programs
from the RenderMan Companion to output the picture to the screen - that 
process is not documented.  What I do is add lines like :

        RiBegin(RI_NULL, RI_RENDERER, &archive,
                 RI_FILEPATH, &outputfile, RI_NULL);
        RiOption(RI_ARCHIVE, "outputversion", &v31, RI_NULL);
        RiDisplay("/me/Renderman/src/foo.tiff",RI_FILE,RI_RGBA,RI_NULL);

to my file.  This dumps the rest of the file to a .RIB file, which I
then pass to prman.

Regards,

Shane
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads