Point instance procedural
62551 69 12- wywait
- Member
- 25 posts
- Joined: June 2008
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
Hi Peter,
it would seem its not possible as materials are applied to prim selections and fast point instancing changes points. Maybe you could create an attribute that looks up a colour value after the material has been applied ( not had time to look into that sort of thing.But it did find some other cool stuff. switch between the 2 different material sops.
rob
it would seem its not possible as materials are applied to prim selections and fast point instancing changes points. Maybe you could create an attribute that looks up a colour value after the material has been applied ( not had time to look into that sort of thing.But it did find some other cool stuff. switch between the 2 different material sops.
rob
Edited by - May 30, 2012 08:22:45
Gone fishing
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- pbowmar
- Member
- 7046 posts
- Joined: July 2005
- Offline
Hi Rob,
OK thanks for checking, I guess I'm not doing anything wrong
IMO it's critical that an attribute applied to the point overrides the corresponding shader parameter at render time…. otherwise we can only apply single materials to whole objects which isn't especially useful. Again, if I'm missing something (Halfdan??) please let me know
I really hope SESI invest some time thoroughly documenting the various ways of instancing including the special attributes you can use etc.
Cheers,
Peter B
OK thanks for checking, I guess I'm not doing anything wrong
IMO it's critical that an attribute applied to the point overrides the corresponding shader parameter at render time…. otherwise we can only apply single materials to whole objects which isn't especially useful. Again, if I'm missing something (Halfdan??) please let me know
I really hope SESI invest some time thoroughly documenting the various ways of instancing including the special attributes you can use etc.
Cheers,
Peter B
Cheers,
Peter Bowmar
____________
Houdini 20.5.262 Win 10 Py 3.11
Peter Bowmar
____________
Houdini 20.5.262 Win 10 Py 3.11
- halfdan
- Member
- 599 posts
- Joined: May 2011
- Offline
pbowmar
IMO it's critical that an attribute applied to the point overrides the corresponding shader parameter at render time…. otherwise we can only apply single materials to whole objects which isn't especially useful. Again, if I'm missing something (Halfdan??) please let me know
The pickle here is that you can only have *one* material override per point, hence only set one material on the target instance. This can't be resolved unless you wrap multiple materials into one and switch between them using a primitive attribute on the instance. It might get quite unwieldy, however. Maybe string tuples in H12 (supported in GA, but not exposed in a SOP, so far) could save the day, but you'd still need some sort of mapping from tuple index to the target primitive material.
One idea I came up with to solve this would be to add a new set of object-level Mantra properties, which at render time would act similar to detail attributes (but with a different priority, probably higher). Then the point instancer could copy any desired point attribute as a corresponding object-level property, with the same name and type.
This would only require a small change to the materials (basically an extra parameter on the material that would tell it to, for example, pick up the base color from attribute X) but still work quite nicely with both in-memory and file procedural geometry. This might also solve the “pscale” conundrum, again, without having to modify a copy of the geometry, through some hypothetical CVEX file procedural.
Halfdan Ingvarsson
Senior Developer
Side Effects Software Inc
Senior Developer
Side Effects Software Inc
- wywait
- Member
- 25 posts
- Joined: June 2008
- Offline
circusmonkeyHey guys, Is it possible to use single scatter sss with the point instance procedural? I could have sworn I had it working earlier but recently all I get is black renders.
Mike
Cannot say Ive looked into that. do you have a file ?
Rob
Sorry for the delay. Here's an example of what I'm talking about. Single scatter sss doesn't calculate from what I can tell with fast point instancing.
- Stalkerx777
- Member
- 183 posts
- Joined: Nov. 2008
- Offline
Hi guys! Could you tell me is it possible to use fast point instancing with delayed load procedural on instantiated object?
It works fine with full point instancing, but not with new point_instance_procedural.Is it limitation or bug?
Ok, i know i can load bgeos right in point_instance_procedural with instancefile attribute, but in this case i need to assign materials somehow ( which is nicely done with delayed load and separate material.ifd file).
Thanks.
It works fine with full point instancing, but not with new point_instance_procedural.Is it limitation or bug?
Ok, i know i can load bgeos right in point_instance_procedural with instancefile attribute, but in this case i need to assign materials somehow ( which is nicely done with delayed load and separate material.ifd file).
Thanks.
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
Sr. Graphics Tools Engineer @ Nvidia
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- wywait
- Member
- 25 posts
- Joined: June 2008
- Offline
- symek
- Member
- 1390 posts
- Joined: July 2005
- Offline
Stalkerx777
Hi guys! Could you tell me is it possible to use fast point instancing with delayed load procedural on instantiated object?
It works fine with full point instancing, but not with new point_instance_procedural.Is it limitation or bug?
Ok, i know i can load bgeos right in point_instance_procedural with instancefile attribute, but in this case i need to assign materials somehow ( which is nicely done with delayed load and separate material.ifd file).
Thanks.
I don't think that's possible, because these two are both procedurals, and Mantra can't stack procedural geometry shaders (which would be awesome btw).
- halfdan
- Member
- 599 posts
- Joined: May 2011
- Offline
wywait
Hey guys, Is it possible to use single scatter sss with the point instance procedural? I could have sworn I had it working earlier but recently all I get is black renders.
Don't think this ever worked. The problem is with how the SSS does the point cloud generation and the way Mantra's named scopes work. Scopes only work on top-level named objects, not named objects generated by procedurals.
We've introduced a new automatic scope, “scope:self”, which can be used as an argument to the “scope” parameter of the VEX raytracing functions to restrict them to the currently shading object only.
This allows fast point instanced objects to work with both single- and multiple-scattering.
Will be in tomorrow's build (H12.0.663).
Halfdan Ingvarsson
Senior Developer
Side Effects Software Inc
Senior Developer
Side Effects Software Inc
- Alejandro Echeverry
- Member
- 691 posts
- Joined: June 2006
- Offline
:shock: Niceeee!!!
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
http://www.linkedin.com/in/alejandroecheverry [linkedin.com]
http://vimeo.com/lordpazuzu/videos [vimeo.com]
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- halfdan
- Member
- 599 posts
- Joined: May 2011
- Offline
circusmonkey
can we get a working example of this ? . On a side has anyone be able to get a looped geometry animation coupled with a random offset per instance to work ? when using a file sop.
Attached is a scene that does both, except that instead of using the file sop, it uses the “instancefile” attribute to point to a bgeo at render time.
Halfdan Ingvarsson
Senior Developer
Side Effects Software Inc
Senior Developer
Side Effects Software Inc
- wywait
- Member
- 25 posts
- Joined: June 2008
- Offline
- fsimerey
- Member
- 279 posts
- Joined: Dec. 2009
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
- vbk!!!
- Member
- 383 posts
- Joined:
- Offline
- circusmonkey
- Member
- 2624 posts
- Joined: Aug. 2006
- Offline
instancefile >
I have created an instancefile attribute. the string reads $HIP/geometry/horse_v01.`padzero(4,$RANDOFFSET)`.bgeo . This is coupled with a looping attribute called RANDOFFSET . This way each frame in the sequences has a random start value and loops when I scrub the time line.
See image from details view. I scrub the time line and it works as expected. I render any frame below 80 which is when the loop resets and the objects render but with no offset per point in the animation. If I render over frame 80 which is past the original frame range and I get a blank render. Yet the attribute is correct and works.
This make me question just how does the instancefile work per point. Is it not able to read a sequence of bgeo files ? per frame with an offset. Even though as you can see from the image attached each point should get a different start frame and loop.
Rob
I have created an instancefile attribute. the string reads $HIP/geometry/horse_v01.`padzero(4,$RANDOFFSET)`.bgeo . This is coupled with a looping attribute called RANDOFFSET . This way each frame in the sequences has a random start value and loops when I scrub the time line.
See image from details view. I scrub the time line and it works as expected. I render any frame below 80 which is when the loop resets and the objects render but with no offset per point in the animation. If I render over frame 80 which is past the original frame range and I get a blank render. Yet the attribute is correct and works.
This make me question just how does the instancefile work per point. Is it not able to read a sequence of bgeo files ? per frame with an offset. Even though as you can see from the image attached each point should get a different start frame and loop.
Rob
Gone fishing
- johm
- Staff
- 138 posts
- Joined: Dec. 2010
- Offline
Not sure exactly how you're using the looping variable in conjunction with the already randomly offset looping index value inherent in the file name. Seems redundant to carry around the extra RANDOFFSET point attribute, unless you're using it somewhere else.
This works for me:
grid->scatter->attribcreate
AttribCreate:
Name = instancefile
String = $HIP/horse_dir/horse.`padzero(4, wrap($PT + $F, 1, 100))`.bgeo
This works for me:
grid->scatter->attribcreate
AttribCreate:
Name = instancefile
String = $HIP/horse_dir/horse.`padzero(4, wrap($PT + $F, 1, 100))`.bgeo
-
- Quick Links