Point instance procedural

   62554   69   12
User Avatar
Member
279 posts
Joined: Dec. 2009
Offline
circusmonkey
Hi fsimerey,nice work any chance you can make the image smaller currently it fills my browser . Feel free to show an example of how you did it or any hip files for others.

Sorry for time to reply, i was very busy…
And i resized the picture !! Sorry for that.

vbk!!!
very nice work, fsimerey
I woud love to check an .hip file if possible : I am trying to make the same kind of stuff so …
My file is very simple given that all characters are at this time, without animation. It will be the next step…

I have 3 attributes:
- pscale (for adjust size of characters)
- numcast (between 1 to 45, to identify characters)
value exp: ceil(rand($PT+1232654) * 45)
- instancefile (to get the geometry based on numcast)
value exp: $HIP/geo/public_europe/rocket_casual_bat_`point(“../attrib_numcast”, $PT, “numcast”, 0)`.bgeo

The only trick here is in foreach SOP by ‘Each Attribute Value’ to setup material with an override for ‘BaseColorMap’ based on numcast attribute to avoid oversize memory.

I can uplaod an hip file, but without characters geometry, it's not very helpful. But let me know.

P.S. vbk, si tu es sur Paris, on peut se rencontrer. Ca serait plus simple pour te passer des fichiers

Attachments:
instancepoints_1.png (23.5 KB)
instancepoints_2.png (53.1 KB)

User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hi John,
Ive since discovered a bit of bug with the instancefile , it only works with fast point instancing using full point instancing it fails.
At least we now have a looping animation with a random start frame thats instanced.

Attachments:
horseInstance_v01.mov (700.3 KB)

Gone fishing
User Avatar
Member
383 posts
Joined:
Offline
thx for your explanation fsimerey.
I'll try to follow your steps.
If I meet some issue I let you know.

Je suis sur Paris ( Saint Ouen pour être exact). Je serais ravi te de rencontrer à l'occaz.
http://vimeo.com/vbkstudio [vimeo.com]
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
circusmonkey
Hi John,
Ive since discovered a bit of bug with the instancefile , it only works with fast point instancing using full point instancing it fails.

The goal is to completely replace full point instancing with fast point instancing, because it goes to 11.
There's at least one school like the old school!
User Avatar
Member
304 posts
Joined: May 2006
Offline
Should I expect to get a huge decrease of memory management and performance while instancing with the Micropolygon renderer? Both PBR and Raytracing show great response, but as soon as I change to Micropolygon memory goes over the roof as well as render time. It affects fast point instancing, full, and delayed loading.

H12.0.655, Win64 here
Javier Meroño
FX TD.
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hey Javier, can you post up a scene file ? . Recent H builds have had some improvements to instancing.

Rob
Gone fishing
User Avatar
Member
599 posts
Joined: May 2011
Offline
circusmonkey
Ive since discovered a bit of bug with the instancefile , it only works with fast point instancing using full point instancing it fails.
At least we now have a looping animation with a random start frame thats instanced.

Not a bug; it's completely by design. With full point instancing you can simply instantiate the file procedural multiple times and vary its arguments. This isn't possible with fast point instancing, and so the “instancefile” and “instanceblurfile” attributes were added, to do this automatically at render time.

However it's missing a way to specify a material archive right now. We're working on that.
Halfdan Ingvarsson
Senior Developer
Side Effects Software Inc
User Avatar
Member
599 posts
Joined: May 2011
Offline
Netvudu
Should I expect to get a huge decrease of memory management and performance while instancing with the Micropolygon renderer? Both PBR and Raytracing show great response, but as soon as I change to Micropolygon memory goes over the roof as well as render time. It affects fast point instancing, full, and delayed loading.

This is a known issue with REYES algorithms, like micropoly. We have to generate geometry for all instances, unfortunately. We're looking into ways to reduce this. However, for now, it's recommended to do instancing only with raytracing (which is what PBR uses as well), which completely shares acceleration data and geometries across instances.
Halfdan Ingvarsson
Senior Developer
Side Effects Software Inc
User Avatar
Member
304 posts
Joined: May 2006
Offline
ah, good to know…and good to know that you know
Javier Meroño
FX TD.
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Not a bug; it's completely by design. With full point instancing you can simply instantiate the file procedural multiple times and vary its arguments. This isn't possible with fast point instancing, and so the “instancefile” and “instanceblurfile” attributes were added, to do this automatically at render time.

However it's missing a way to specify a material archive right now. We're working on that.

So that's basically multiple copies of the same object with various parameter changes. I used the instancefile approach to the horses because the help says that its used for reading bgeo files and in my case I have a sequence of Bgeo files so it seemed the right way to go. I'm sure you can understand the confusion my end.
I have done a search for instanceblurfile and the help returns nothing. Can you give some more details on this and how it should be used. Maybe also a breakdown on the approach to getting the correct motion blur on your instances.



This is a known issue with REYES algorithms, like micropoly. We have to generate geometry for all instances, unfortunately. We're looking into ways to reduce this. However, for now, it's recommended to do instancing only with raytracing (which is what PBR uses as well), which completely shares acceleration data and geometries across instances.

Very useful information.

rob
Gone fishing
User Avatar
Member
383 posts
Joined:
Offline
HI

Playing again with point instancing, I wonder how to vary the scale of my instanced object independently in x,y,z ?
Pscale works only for uniform scaling …

Any idea ?
http://vimeo.com/vbkstudio [vimeo.com]
User Avatar
Member
1390 posts
Joined: July 2005
Offline
vbk!!!
HI

Playing again with point instancing, I wonder how to vary the scale of my instanced object independently in x,y,z ?
Pscale works only for uniform scaling …

Any idea ?

The benefit of using new point instance procedural is using CVEX to control instances' with full 4x4 matrix, so any linear transformation/deformation is possible. See help on this. [sidefx.com]
Edited by - July 9, 2012 06:57:12
User Avatar
Member
279 posts
Joined: Dec. 2009
Offline
vbk!!!
HI

Playing again with point instancing, I wonder how to vary the scale of my instanced object independently in x,y,z ?
Pscale works only for uniform scaling …

Any idea ?

Check in the first page of this thread, the examples from halfdan

There is a cvex transform example
User Avatar
Member
383 posts
Joined:
Offline
cool, thanks.
http://vimeo.com/vbkstudio [vimeo.com]
User Avatar
Member
599 posts
Joined: May 2011
Offline
vbk!!!
HI

Playing again with point instancing, I wonder how to vary the scale of my instanced object independently in x,y,z ?
Pscale works only for uniform scaling …

You can do that through the ‘scale’ 3-float/vector attribute.
Halfdan Ingvarsson
Senior Developer
Side Effects Software Inc
User Avatar
Member
383 posts
Joined:
Offline
thanks a lot halfdan.

I tried to use your strawberry example to deal with the scale.
But now I have headache to orient my instanced object correctly.
I can apply global rotation to the objects but not a per-point rotation value.
I created a vector attribute to visualize the orientation with vopsop but I don't know how to convert it to rotation degres …
It sounds like a trigonometric stuff. and dot product maybe ?


P.S :

acos(dot(v1,v2))

thx symek

another question :
what the pro and cons about the use of cvex shader ?
http://vimeo.com/vbkstudio [vimeo.com]
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
vbk!!!
thanks a lot halfdan.
another question :
what the pro and cons about the use of cvex shader ?
With the cvex program procedural referenced by the Mantra Instance Procedural, you can apply transforms to instances at render time by modifying those attributes found on the points and export the matrix xform attribute.

This means you can adjust the scale of the instances after the ifd has been generated which was on the RFE list for years and years. Without this feature, if you wanted to change the scale of your instances after the ifd was generated you would either have to re-generate the ifd, modify the ifd file directly or write your own Mantra procedural to do what this new feature does.

On the other hand, with the fast point instancing, re-creating the ifd is much faster now negating the need for this cvex procedural in many cases where it would have been very useful in H11.

It is still very handy to have though. For example, from a single ifd on disk with point instances, you can now render many different instance variations from that ifd file by using a random seed in your scaling in the CVEX shader. Just offers yet another layer of control within the Houdini > Mantra pipeline wrt instances.
There's at least one school like the old school!
User Avatar
Member
700 posts
Joined: March 2009
Offline
Hey, Jeff

Does the CVEX shader also act on the instanced geo's points, or only on the instance point (point where the geo is instanced to)?
Say I have a particle system emitting bubbles and I want the bubbles to have different noise offsets, can I achieve it with CVEX?

Cheers
Toronto - ON
My Houdini playground [renderfarm.tumblr.com]
“As technology advances, the rendering time remains constant.”
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
At this time the procedural only controls the Transform of the instance geometry. Modifying any of the shader settings will not be inherited by the instance geometry at this point in time. That would go for displacement shader attributes.

There is an RFE for manipulating shader attributes on the instances.

For now you have to do this in SOPs with the Material SOP or the Copy Stamping technique to modify shader parameters on the instance points.
There's at least one school like the old school!
User Avatar
Member
700 posts
Joined: March 2009
Offline
jeff
…Copy Stamping technique to modify shader parameters on the instance points.

Such RFE, if implemented would be a dream come true! I resorted to copy stamping for now, though.
Thanks
Toronto - ON
My Houdini playground [renderfarm.tumblr.com]
“As technology advances, the rendering time remains constant.”
  • Quick Links