Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

rdg

Mantra Vs Renderman Vs C(++)

Hi all,

I've read "texturing & modelling - a procedural approach".

It was very informative: it explained why I do some stuff the way I do it and how I can do some stuff better.

But it also raised some questions:

Renderman RSL 'looks' like the mantra I know.

Is the difference bigger than I realise now? I need to take a look in the wiki - maybe there is a page describing the differences.

Some of the code the book cites uses tables/lists/array but it also says that RSL doesn't support arrays/tables.

Would e.g. variations of the worley cells (voronoi) be implemented in vex/mantra/houdini trough the HDK then?

Georg

Share this post


Link to post
Share on other sites
Hi all,

I've read "texturing & modelling - a procedural approach".

It was very informative: it explained why I do some stuff the way I do it and how I can do some stuff better.

But it also raised some questions:

Renderman RSL 'looks' like the mantra I know.

Is the difference bigger than I realise now? I need to take a look in the wiki - maybe there is a page describing the differences.

Some of the code the book cites uses tables/lists/array but it also says that RSL doesn't support arrays/tables.

Would e.g. variations of the worley cells (voronoi) be implemented in vex/mantra/houdini trough the HDK then?

Georg

In other word you want to find a way to implement arrays? Well, HDK might be a solution of course, but there are other ways to mimic them in Houdini, without going that low level from the start. Think of texture maps, or point clouds, or some geo points at SOPs even, as a collection of arbitrary data, - an array by itself; vectors and matrices can be looked upon as special cases of arrays . Still you must choose a way to query the values of your 'arrays', but on the overall you are half way there already.

Hope that helps, unless you knew that all already, of course.

Share this post


Link to post
Share on other sites

As far as I know VEX was design to be similar to RSL (in syntactical sense) which was not very difficult as RSL was designed to be similar to C. If you see arrays i PRMan code these are Dso lines. It's easy to extend PRMan with dso. Not sure how about Mantra in this respect.

Similarities you see are on a surface. Inside things are more complicated. Although I think mantra was meant to behave similar to prman, but the reason was that prman just set the standard for "production quality render engine". This way or noway..

Share this post


Link to post
Share on other sites
Similarities you see are on a surface.

But the 'concepts' are close? I don't to become a full featured shader author - I see this more as a additional layout tool. If I read and learn from rsl shaders I could learn something for mantra? or is this a 'waste of time'?

Hope that helps, unless you knew that all already, of course.

I was guessing and your answered helped.

I don't really want to implement arrays. I was just asking my self: How could I try the different variations of voronoi if they use tables ...

Georg

Share this post


Link to post
Share on other sites

What I've heard from one of the odforcers, is that implementing custom vex functions in HDK is pretty straightforward (unfortunately I don't have experience with custom vex func. in hdk and thus can't prove that). So you may go for it and use arrays and other goodies of C++.

Concerning the differences of RMan and Mantra - I did learn shading, using PRman docs, though I don't use RMan. Not sure if that's relevant for you.

I do expect that there may be some serious technical differnces between Mantra and RMan, though aside from that, if some math shading algorithm is true for RMan - it should be true for Mantra as well, and old Codex with sl\mantra shaders examples only proved this POV.

Besides, what probably makes RMan the 'rendering standard of the industry' is that RMan is, afaik, the most documented and 'standartized' renderer ever created, thanks to Pixars (and I strongly doubt that mantra overall documentation can compete with the amount of documentation that exists about RMan).

Don't get me wrong - I don't blame mantra, I like it and I use it. However reading documentation on RMan was\is a significant part of my learning shading.

Share this post


Link to post
Share on other sites
...is that implementing custom vex functions in HDK is pretty straightforward

True...

since all you need to do (in most cases) is to add few strings

to specify it's signature according to info from

....\houdini\vex\dso\VEX_VexOp.html

Like:

#include <VEX/VEX_VexOp.h>
#include <UT/UT_DSOVersion.h>

static void
MyFunction_Evaluate(int, void *argv[], void *)
{
float 		*result	= (float *)argv[0];

....C or C++ source code from elsewhere...

*result = blah blah blah;
}

void
newVEXOp(void *)
{
	new VEX_VexOp("myfunction@&FVF",
			MyFunction_Evaluate,
			(VEX_OP_CONTEXT|VEX_SHADING_CONTEXT),
			0,
			0);

}

Edited by AndrewVK

Share this post


Link to post
Share on other sites
True...

thanks. that's a good pointer.

Though I am a c++-illiterate - every 4 or 5 months or so I try to get something running.

I was very proficient in creating&compiling MR-shaders - without really knowing whats going on - some time ago :ph34r:

I have c++.net (7?) and a gcc - so nothing can stop me.

Ha - I am looking forward to do something with this snippet.

thanks again.

Georg

Share this post


Link to post
Share on other sites

There is a simple VexOp doc you can go to at $HFS/houdini/vex/dso/VEX_VexOp.html. that should give you a place to start.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now