Jump to content

pscale and delayed load


sanostol

Recommended Posts

when rendering pointclouds with delayed load, I can adjust many aspects like color and transparency with the shader, but is there a way to adjust the pscale without rewriting the file. i have 10 sim sequences with 1 million points and it is quite time/discspace consuming to do that

best regards

Martin

Edited by sanostol
Link to comment
Share on other sites

when rendering pointclouds with delayed load, I can adjust many aspects like color and transparency with the shader, but is there a way to adjust the pscale without rewriting the file. i have 10 sim sequences with 1 million points and it is quite time/discspace consuming to do that

best regards

Martin

Unfortunately, no there isnt a way to do that as pscale is baked into your .bgeo file, where as shading parameters are assigned at render time.

Link to comment
Share on other sites

a multiplier in the rendering stage would be cool

Im sure someone will say Im wrong, which would be a good thing ;), but without actually hacking into the geo file and changing values such as pscale, Im not really sure how to go about something like. Even if that were do-able, you would loose all the benefits of delayed load as your geo would have to be regenerated prior to rendering which would be quite a hit to your overall render times, ie geo generation + render time.

Link to comment
Share on other sites

mh, I guess either it is implemented as feature of delayed load/ mantra or You loose a lot of functionality. but I'm just stabbing into the dark :)

my post was more like a "it would be very handy, if there would be a hidden parameter, that ....."

Edited by sanostol
Link to comment
Share on other sites

You could make your own delayed load with your own VRAYprocedural, but as mentioned it would take a hit because it would have to loop through the pscale values.

The better approach would be to have a custom delayed load that takes a CVEX modifier. I think Mark has got that working in his clusterThis procedural. I have taken a look at it but not yet implemented it in my own instancer.

One way in the hdk to perhaps make it faster is to have pscale come in as a detail attribute and promote that to the points, I'm not sure if the attributepromote at hdk level requires to loop through the points (that would be the slowdown). Generally your pscale stays uniform when rendering lots of points, so perhaps this works.

Link to comment
Share on other sites

You could make your own delayed load with your own VRAYprocedural, but as mentioned it would take a hit because it would have to loop through the pscale values.

The better approach would be to have a custom delayed load that takes a CVEX modifier.

Plus CVEX in a custom procedural wouldn't be multithreaded automatically, so even that would require optimization. Although I'm not sure if changing one point attribute is so expensive to be worry about it.

skk.

PS note also that afaik HDK doesn't allow you to import into ifd your shaders (like in case of material param of DLA procedural). So either it's already there (via soho) or you stay with some ifd hackery.

Link to comment
Share on other sites

Plus CVEX in a custom procedural wouldn't be multithreaded automatically, so even that would require optimization. Although I'm not sure if changing one point attribute is so expensive to be worry about it.

Ah.. did not know that :). - considering it's millions of point, threading would be a good idea.

PS note also that afaik HDK doesn't allow you to import into ifd your shaders (like in case of material param of DLA procedural). So either it's already there (via soho) or you stay with some ifd hackery.

I found a way around this by "stealing the material" of an empty object in the scene... :) it is a hack but it works quite well.

For each shader you have an object (with the same name), inside of the object is a null with renderflag set and material is assigned. This will force the shader to be included into the ifd (getting it inside the ifd is what needs to happen because by default those materials are not included) and then you can get that shader.

I'll see if I can update my blog this evening and release the source code for H10 and H11 (there are still warnings on H11 but it works). It takes a bit of time to set up, but I'll include an example scene. Also I haven't fully worked out motionblur (it can do template point motionblur but not yet point based velocity that is stored inside the cached geo - which is important when rendering all those particles.)

I'll post it when it's online.

I could make an adjusted version of the delayed load that allows you to change: pscale, v, alpha, Cd as global multipliers. It would be slower (as it would have to loop through the points), but it would give you more control whilst testing, so the next time you cache your particles, you modify the values.

Link to comment
Share on other sites

I found a way around this by "stealing the material" of an empty object in the scene... :) it is a hack but it works quite well.

Yes, this is what I'm doing but it's a pain in case you have a whole combination of shaders applied per group which normally got compiled into ifd by Mantra Archive. I RFE'ed to source ifd in ifd via HDK :).

Link to comment
Share on other sites

Yes, this is what I'm doing but it's a pain in case you have a whole combination of shaders applied per group which normally got compiled into ifd by Mantra Archive. I RFE'ed to source ifd in ifd via HDK :).

Ahh, very useful! Would be nice to have the rib archive calling a rib archive calling a rib archive... working with ifds. I've requested the same when they came for the houdini 11 launch here in London.

This is getting a bit off topic, so I created my own thread in regards to my instancer. Still some of the stuff going on inside the code very much applies to the above to modify those attributes (inside my instancer I loop through template points and query the pscale, you would be doing the same only on that single piece of delayed geometry).

Instancer thread:

http://forums.odforce.net/index.php?/topic/11911-instancepc-a-custom-instancer-in-the-hdk/

Blog post:

http://www.peterclaes.be/blog/?p=151

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...