Jump to content

mantra "clusterThis" procedural geometry DSO


Guest xionmark

Recommended Posts

Would be good to have some light here about how SOHO creates the IFD.

One of the good things of instancing is that you don't have to put your instanced geo in the IFD/RIB file, just the points, and the instanced geo once. So I don't really understand why SOHO takes much time to do it.

Have a look at the test file I created. Output the "instance" and "points" Mantra node and compare the ifd. Each instance has to create the transformation matrix and write each attribute like the shader etc. Only this part fits in 192 lines.

Now look at the points and you'll see it fits in 30 lines only. The reason is because each attribute name is define at the beginning of the block and a bunch of value are put one after the other. It even looks like there are some sort of clever string recognition. It defines every different string and further refer to which index it correspond for each point.

That's my explanation of why it is slow but I think Soho add an other level load just because it's Python.

That's why I'm looking forward to test the clusterThis tool.

François

instance_soho_v001.hip

Link to comment
Share on other sites

One of the good things of instancing is that you don't have to put your instanced geo in the IFD/RIB file, just the points, and the instanced geo once. So I don't really understand why SOHO takes much time to do it.

I'm still not too fond of having all those points in the ifd. Tweak the lights and you have to rewrite you ifd :/

I actually wrote a post last weekend on this stuff: http://www.peterclaes.be/blog/?p=34#more-34

Link to comment
Share on other sites

  • 2 months later...

Has anyone tried to compile the code on H11? Make is prompting a bunch of errors due to changes in the HDK and I was wondering if anyone tried to workaround it by defining HDK_RELAXED_GB in make? Unfortunately I couldn't find in docs any example how this definition should look like, so any help is more then welcome.

Cheers,

kuba

Link to comment
Share on other sites

  • 2 months later...
Guest xionmark

New version for H11:

http://www.digitalcinemaarts.com/dev/clusterThis/

I'm still supporting H9.5 too as there's a number of people still needing it for older pipelines.

Most of the mods were for H11 compatibility, but also factored out some redundant code (more to do there) and fixed the exit processing.

I've built about a half dozen fairly complex mantra procedurals over the last year and oh boy is it getting fun. Since it's easier to put all the features into the code when you're getting paid to do it, unfortunately open source freebies often don't the same care and feeding. So, this version was going to have LOD support, multi-frame file geo instancing (for "walk cycles"), much more CVEX support and ... wait for it ... fully threaded. But, as I said, time has been very tight this last number of months so I hope to have these features in the next major update, before SIGGRAPH I hope. All the above features have been deployed successfully in a fairly rigorous production environment.

Take care,

Mark

P.S. Oh, and I've got a *bunch* of samples to put up on the web for your viewing pleasure, soon, oh soon.

Link to comment
Share on other sites

Great stuff, Mark! And let me plant a little seed too -- because our "crowd" procedural here supports many of these types of features and so we did this: we wrote the corresponding GR_RenderHook which draws the procedural geometry in the OpenGL viewport. This results in the user being able to see what he'll be rendering without the weight of having to pass around any of that geometry in SOPs.

Link to comment
Share on other sites

Guest xionmark

Great stuff, Mark! And let me plant a little seed too -- because our "crowd" procedural here supports many of these types of features and so we did this: we wrote the corresponding GR_RenderHook which draws the procedural geometry in the OpenGL viewport. This results in the user being able to see what he'll be rendering without the weight of having to pass around any of that geometry in SOPs.

Oh now you went a did it! I hadn't thought of that and now it will sit in my brain and germinate!

Just checked the docs for the GR_RenderHook class, I'll have to give that a whirl. That is after finishing the rest of the mods though ... those darn attribute code changes are all over the place!

Mark

Link to comment
Share on other sites

Guest xionmark

This is great! I come back from holiday and get this little knowledge bomb to browse through :). Thanks for your work and for sharing!

Cool. There's more H11 mods coming soon, I haven't gotten rid of all the castAttribute() stuff yet.

Enjoy!

Mark

Link to comment
Share on other sites

Cool. There's more H11 mods coming soon, I haven't gotten rid of all the castAttribute() stuff yet.

Enjoy!

Mark

Good done Mark, too much people still using the old method to deal with attributes, the new one is much better and a little faster.

Link to comment
Share on other sites

Guest xionmark

Good done Mark, too much people still using the old method to deal with attributes, the new one is much better and a little faster.

Hi Pablo!

Been a long time! I haven't done any performance comparisons but will give it a try as I've got two version I'm supporting, H9.5 and H11. There's still more mods to do, almost done, doing testing today. Will post later today probably.

Take care,

Mark

Link to comment
Share on other sites

Hi Pablo!

Been a long time! I haven't done any performance comparisons but will give it a try as I've got two version I'm supporting, H9.5 and H11. There's still more mods to do, almost done, doing testing today. Will post later today probably.

Take care,

Mark

Hey Mark, yep too much time :)

Well, I noticed some improvements using the new mthods for attributes, but the improvemetn is really tiny, so not sure it you will get a better perfomance.

Anyway I prefer the new method, is more clear and clean than before

Link to comment
Share on other sites

  • 4 months later...

My Windows compilation nightmares are back. Even though I was able to compile in H10, I'm not able to do it in H11.

Anyone has managed to do it? If yes, is there a particular procedure? I tried with hcustom under the Houdini shell and with Cygwin and neither work. I haven't tried with MakeFile because with my previous compilation test on H10 I haven't been able to use it so I thought hcustom is still the best thing to do.

Mark told me the following variables are not set properly but I set them and it's still not working. When I use cygwin and source the houdini_setup_bash, these are set automatically.

setenv HOUDINI_MAJOR_RELEASE 11

setenv HOUDINI_MINOR_RELEASE 0

Thanks guys!

François

Edited by Fran
Link to comment
Share on other sites

I've finally managed to compile it for Windows. Here's the dll for 11.0.581 and the Makefile I used to compile it.

For some reasons the forum doesn't allow me to upload files with certain extensions nor without extension so you'll have to rename the Makefile.txt to Makefile and VRAY_clusterThis.txt to VRAY_clusterThis.dll

The hardest part is still to get a hand on the non-available-anymore compiler Visual Studio 2005 and add the two service packs to allow it to compile 64-bit.

Thanks Mark again.

Francois

Makefile.txt

VRAY_clusterThis.txt

Link to comment
Share on other sites

I've started to make some test with clusterThis.

I want to use it especially for instancing geometry. I see I can use the N vector to orient the geometry but it doesn't seem to make use of the Up attribute nor rot to have full control on orientation.

Is there any other way to do it?

Francois

Link to comment
Share on other sites

Guest xionmark

I've started to make some test with clusterThis.

I want to use it especially for instancing geometry. I see I can use the N vector to orient the geometry but it doesn't seem to make use of the Up attribute nor rot to have full control on orientation.

Is there any other way to do it?

Francois

Hi Francois,

I've had that on my list of additional attributes to add for some time, it will be in the next release. Depending on if your shader uses N or not, I've overridden N with the Up vector and vica versa, also did so with velocity. Problem is that there's a price to pay for using more attributes and in other mantra procedurals I've written I use a little more logic (more code too) to trim the number of attributes sent to mantra. There's a bit of it in the way I handle the attributes for the CVEX function calls.

This very reason is why I'm almost done with another stripped down cluster DSO for point instancing only, plus there's a huge difference in the "deferred instancing" overhead vs. instancing geo all at once.

--Mark

Link to comment
Share on other sites

I'm trying motion blur too and I've got something wrong with the motion blur. If you look at the attached file and render with the switch inside geo1 to 0 and 1, you'll see what I mean. It's as if the velocity attribute is transformed in rotation by the N attribute.

Also, maybe I missed that information somewhere but is it possible to have a different object instanced per point, i.e. to be able to set the geo_file per instance point?

Thanks

Francois

clusterThis_motionBlurTest_v01.hip

Link to comment
Share on other sites

Guest xionmark

I'm trying motion blur too and I've got something wrong with the motion blur. If you look at the attached file and render with the switch inside geo1 to 0 and 1, you'll see what I mean. It's as if the velocity attribute is transformed in rotation by the N attribute.

Also, maybe I missed that information somewhere but is it possible to have a different object instanced per point, i.e. to be able to set the geo_file per instance point?

For file instancing, use the deformation motion blur.

There isn't a string point parm to select file geo, I had that in there for another show but never put it in the open source version.

I don't see any difference in motion blur when changing N (using deformation/geometry motion blur).

--Mark

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...