Jump to content


Mantra Vs Renderman Vs C(++)


  • Please log in to reply
7 replies to this topic

#1 rdg

rdg

    Houdini Master

  • Members
  • PipPipPipPip
  • 731 posts
  • Joined: 21-August 05
  • Location:weta
  • Name:Georg Duemlein

Posted 08 July 2007 - 11:03 PM

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
The Industrial Parametrization of the World
http://rdg.preset.de/

#2 MADjestic

MADjestic

    Illusionist

  • Members
  • PipPipPip
  • 433 posts
  • Joined: 10-August 04
  • Location:Amsterdam
  • Name:Vladimir Lopatin

Posted 08 July 2007 - 11:50 PM

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.
houdini artist @ Guerrilla-Games, Amsterdam

#3 symek

symek

    Grand Master

  • Members
  • PipPipPipPipPip
  • 1,658 posts
  • Joined: 02-November 04
  • Location:Waw/Pol
  • Name:Szymon Kapeniak

Posted 08 July 2007 - 11:54 PM

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..
(...) It was late, late in the evening, the lovers they were gone;
The clocks had ceased their chiming, and the deep river ran on.

#4 rdg

rdg

    Houdini Master

  • Members
  • PipPipPipPip
  • 731 posts
  • Joined: 21-August 05
  • Location:weta
  • Name:Georg Duemlein

Posted 09 July 2007 - 12:39 AM

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
The Industrial Parametrization of the World
http://rdg.preset.de/

#5 MADjestic

MADjestic

    Illusionist

  • Members
  • PipPipPip
  • 433 posts
  • Joined: 10-August 04
  • Location:Amsterdam
  • Name:Vladimir Lopatin

Posted 09 July 2007 - 04:44 AM

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.
houdini artist @ Guerrilla-Games, Amsterdam

#6 AndrewVK

AndrewVK

    Illusionist

  • Members
  • PipPipPip
  • 281 posts
  • Joined: 24-June 02

Posted 09 July 2007 - 05:32 AM

...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, 09 July 2007 - 05:34 AM.


#7 rdg

rdg

    Houdini Master

  • Members
  • PipPipPipPip
  • 731 posts
  • Joined: 21-August 05
  • Location:weta
  • Name:Georg Duemlein

Posted 09 July 2007 - 07:28 AM

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
The Industrial Parametrization of the World
http://rdg.preset.de/

#8 TheUsualAlex

TheUsualAlex

    Houdini Monkey

  • Members
  • PipPipPipPipPip
  • 1,097 posts
  • Joined: 25-June 02

Posted 09 July 2007 - 09:19 AM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users