FAQ FAQ      Search Search      Memberlist Memberlist      Usergroups Usergroups      Register Register      Profile Profile      Check private messages Check private messages      Log in Log in     

Point instance procedural
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Houdini Forum Index -> Technical Discussion
View previous topic :: View next topic  
Author Message
circusmonkey
Houdini Guru


Joined: 26 Aug 2006
Posts: 2014

australia.gif
PostPosted: Sun May 06, 2012 8:20 pm GMT    Post subject: Point instance procedural Reply with quote

After trying various combinations of settings based off how I use the delayed procedural I cannot get this working at all. Has anyone had success with it

rob
Back to top
View user's profile Send private message Send e-mail AIM Address
stevenong
Houdini Guru


Joined: 22 Jul 2002
Posts: 1625

blank.gif
PostPosted: Mon May 07, 2012 6:30 pm GMT    Post subject: Reply with quote

Nope. I'm having the same issue as you where I try to set it up like the Delayed Load Procedural.

12.0.614

Cheers!
steven
Back to top
View user's profile Send private message
rafaels
Houdini Master


Joined: 18 Mar 2009
Posts: 598
Location: Toronto

canada.gif
PostPosted: Mon May 07, 2012 8:46 pm GMT    Post subject: Reply with quote

yeah, I get an error saying mantra can't find the point object:

Code:

mantra: ptinstance couldn't find object '/obj/grid_object1'
mantra: Error initializing procedural 'ptinstance' on object /obj/geo1


Now, out of curiosity, why do it via shader rather than instance rendering parameters?

Cheers



point_instance_shader.hipnc
 Description:

Download
 Filename:  point_instance_shader.hipnc
 Filesize:  317.65 KB
 Downloaded:  687 Time(s)

Back to top
View user's profile Send private message Visit poster's website
SYmek
Houdini Guru


Joined: 13 Mar 2003
Posts: 1315

poland.gif
PostPosted: Tue May 08, 2012 3:53 am GMT    Post subject: Reply with quote

Perhaps the simplest way is to apply a procedural on "Procedural Shader" parm (Render/Geometry Tab of Geometry Object). It is important to leave "Point Object" parm on a procedural shader blank. It will peak up the geometry from its parent object then.


@rafaels Using shader instead of Instance Object lets you apply cvex shaders to instances, control size of bounding box or apply multiply shaders to single object.


Note also, that fast instances seems to be currently partially broken with IPR rendering (bug 46800), as they don't get updated properly after changes.
Back to top
View user's profile Send private message AIM Address
rafaels
Houdini Master


Joined: 18 Mar 2009
Posts: 598
Location: Toronto

canada.gif
PostPosted: Tue May 08, 2012 8:27 am GMT    Post subject: Reply with quote

SYmek wrote:

@rafaels Using shader instead of Instance Object lets you apply cvex shaders to instances, control size of bounding box or apply multiply shaders to single object.


I see, I've used CVEX shader with volumes, but I wasn't aware it worked with geometry now... I mean, I haven't figured out the workflow yet or why is it different than with volumes Confused

Would you care to share some tips on how to use it in the case of delayed load or point instance? The documentation isn't really helping Smile

Cheers
Back to top
View user's profile Send private message Visit poster's website
halfdan
Developer


Joined: 03 May 2011
Posts: 399
Location: Toronto

canada.gif
PostPosted: Tue May 08, 2012 10:21 am GMT    Post subject: Reply with quote

Here's a neopolitan set of examples on how to use the point instancing procedural with or without CVEX.

"ptinst_vanilla" is just plain point instancing. The procedural is on the point grid. For this to work, don't refer to a point object on the procedural. It'll simply pick up the points from the object it's applied to.

"ptinst_strawberry" uses a simple CVEX to set a random scale on each instance at render time.

"ptinst_chocolate" demonstrates how to do camera-facing instances at render time, through CVEX.

Try using a fairly recent build of 12.0 for these examples to work.

Hope this helps. Please feel free to post any followup questions, bugs etc.



ptinst_vanilla.hip
 Description:

Download
 Filename:  ptinst_vanilla.hip
 Filesize:  77.58 KB
 Downloaded:  908 Time(s)


ptinst_strawberry.hip
 Description:

Download
 Filename:  ptinst_strawberry.hip
 Filesize:  129.89 KB
 Downloaded:  953 Time(s)


ptinst_chocolate.hip
 Description:

Download
 Filename:  ptinst_chocolate.hip
 Filesize:  759.71 KB
 Downloaded:  906 Time(s)

Back to top
View user's profile Send private message Visit poster's website
rafaels
Houdini Master


Joined: 18 Mar 2009
Posts: 598
Location: Toronto

canada.gif
PostPosted: Tue May 08, 2012 10:29 am GMT    Post subject: Reply with quote

Awesome! Thanks a lot, Halfdan, will give it a try tonight Smile

Cheers
Back to top
View user's profile Send private message Visit poster's website
alejandro
Houdini Expert


Joined: 01 Jun 2006
Posts: 437
Location: Bogota

columbia.gif
PostPosted: Tue May 08, 2012 10:40 am GMT    Post subject: Reply with quote

Thank you very much!!!
_________________
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry
http://vimeo.com/lordpazuzu/videos
Back to top
View user's profile Send private message Send e-mail MSN Messenger
zarti
Houdini Expert


Joined: 12 Jul 2007
Posts: 323
Location: inside

albania.gif
PostPosted: Tue May 08, 2012 10:47 am GMT    Post subject: Reply with quote

couldnt resist so i downloaded the files too ..
_________________
except the things that cannot be seen , nothing is like it seems .
Back to top
View user's profile Send private message
pbowmar
Houdini Guru


Joined: 03 Jul 2002
Posts: 4341
Location: Vancouver, BC, Canada

canada.gif
PostPosted: Tue May 08, 2012 7:41 pm GMT    Post subject: Reply with quote

Hi Halfdan,

Very helpful! I'd recommend some examples showing how to override materials etc.

I notice that adding an attribute of the correct type to the point does _not_ override the shader on the instance, is that expect? I seem to have to actually use the Material SOP's "Local Overrides" parms which isn't super procedural... but perhaps is just my mindset which needs adjusting Smile

Cheers,

Peter B

_________________
Linux 64bit, GL 3.2 viewport
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTS 450/PCIe/SSE2
OpenGL version string: 4.3.0 NVIDIA 319.17
Back to top
View user's profile Send private message
circusmonkey
Houdini Guru


Joined: 26 Aug 2006
Posts: 2014

australia.gif
PostPosted: Tue May 08, 2012 9:21 pm GMT    Post subject: Reply with quote

Here's a few whipped up and one from Silvina from sidefx > ( cvex fast pointinstancing) I have found using attributes to control everything is just way more simpler ! . When I get time I will jam up some details and more instance files on my site. Also the relative paths it would seem are broken. Bug submitted.

Hey Peter , per point yes using the material sop is the way to go > set to fast point instancing and local overrides. For the geometry from disk example you will need to bring your own bunny


Rob



rse_instanceBunny.hip
 Description:

Download
 Filename:  rse_instanceBunny.hip
 Filesize:  3.2 MB
 Downloaded:  823 Time(s)

Back to top
View user's profile Send private message Send e-mail AIM Address
pbowmar
Houdini Guru


Joined: 03 Jul 2002
Posts: 4341
Location: Vancouver, BC, Canada

canada.gif
PostPosted: Tue May 08, 2012 10:17 pm GMT    Post subject: Reply with quote

OK thanks Rob, I need to do some speed tests, I've found that using the local overrides on the Material SOP can slow IFD gen down, but that was in H11 so maybe it's better now.
_________________
Linux 64bit, GL 3.2 viewport
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTS 450/PCIe/SSE2
OpenGL version string: 4.3.0 NVIDIA 319.17
Back to top
View user's profile Send private message
circusmonkey
Houdini Guru


Joined: 26 Aug 2006
Posts: 2014

australia.gif
PostPosted: Wed May 09, 2012 1:23 am GMT    Post subject: Reply with quote

Hi Peter,
This is for you "plague of bunnies" I figure to really see what the go is with speed. Ive written a bunny out to mantra archive and then delay loaded it into a geometry container which I have full point instanced with a N and Pscale thrown in for good measure. Grab a bunny from above as Ive not included it.
To be honest its rendering at a slow pace even on my duel 12 core xeon when the scene is pretty basic and the bunny geometry archive is 1.3 mg. Anyway its a starting point

Rob



rse_instancedelayedBunnies.hip
 Description:

Download
 Filename:  rse_instancedelayedBunnies.hip
 Filesize:  180.29 KB
 Downloaded:  692 Time(s)

Back to top
View user's profile Send private message Send e-mail AIM Address
circusmonkey
Houdini Guru


Joined: 26 Aug 2006
Posts: 2014

australia.gif
PostPosted: Wed May 09, 2012 7:12 am GMT    Post subject: Reply with quote

Some point instancing of lights using instancepoint(), must say Ive point instanced geometry lights before and used a custom shader to get some nice effects using material overides. It would be nice though to override the default lights with more control as I take it a default light uses a light shader which seems to be inaccessible to create overrides per point in sops.

Rob



instancelight.jpeg
 Description:
 Filesize:  64.95 KB
 Viewed:  10239 Time(s)

instancelight.jpeg



instanced_lights.hip
 Description:

Download
 Filename:  instanced_lights.hip
 Filesize:  220.98 KB
 Downloaded:  630 Time(s)

Back to top
View user's profile Send private message Send e-mail AIM Address
rafaels
Houdini Master


Joined: 18 Mar 2009
Posts: 598
Location: Toronto

canada.gif
PostPosted: Wed May 09, 2012 11:46 am GMT    Post subject: Reply with quote

I remember using the volume procedural, as well as a CVEX shader VOPs inside a material shader builder SHOP and it worked fine. Is there a rationale behind the choosing one method of building over another?
Why is there a SHOP point instance procedural and why is there a VOP-SHOP one?

Cheers
Back to top
View user's profile Send private message Visit poster's website
alejandro
Houdini Expert


Joined: 01 Jun 2006
Posts: 437
Location: Bogota

columbia.gif
PostPosted: Wed May 09, 2012 11:59 am GMT    Post subject: Reply with quote

Hi!!!

Very nice topic!!!

I want to share a setup for a very basic crowd of spiders.
The animation is defined in CHOP's.
Finally all the spider rig is controlled with the instancepoint() function for each agent.

I'll upload the rendered animation in vimeo soon.



spiders_Full-instance.hip
 Description:

Download
 Filename:  spiders_Full-instance.hip
 Filesize:  3.37 MB
 Downloaded:  809 Time(s)


_________________
Feel The Knowledge, Kiss The Goat!!!
http://www.linkedin.com/in/alejandroecheverry
http://vimeo.com/lordpazuzu/videos
Back to top
View user's profile Send private message Send e-mail MSN Messenger
circusmonkey
Houdini Guru


Joined: 26 Aug 2006
Posts: 2014

australia.gif
PostPosted: Wed May 09, 2012 7:11 pm GMT    Post subject: Reply with quote

Last one for good measure. Now all we need to top this thread off is a simple point instanced geometry with offset animation in chops .......
For this example you will need to make your own random point colours , delete the otl in the scene and replace with a colour sop set to random. Check out the custom light shader aswell

Rob



geometryinstancedlights.jpeg
 Description:
 Filesize:  145.82 KB
 Viewed:  10133 Time(s)

geometryinstancedlights.jpeg



instanced_lights.hip
 Description:

Download
 Filename:  instanced_lights.hip
 Filesize:  220.98 KB
 Downloaded:  725 Time(s)

Back to top
View user's profile Send private message Send e-mail AIM Address
pbowmar
Houdini Guru


Joined: 03 Jul 2002
Posts: 4341
Location: Vancouver, BC, Canada

canada.gif
PostPosted: Sun May 27, 2012 11:03 am GMT    Post subject: Reply with quote

Hi Rob,

Since you're much more in touch with the Instancing voodoo, please help with this real-world case (but using the bunny):

-materials are applied to geometry groups. Unfortunately, I have rarely found that a single object-level material is realistic.
-I then want to override parameters on a per-instance basis on a specific material.

I can't get this to work Sad Not using Fast Point Instancing isn't an option as the real world case for this is models of millions of polygons per model. Other than the Materials override problem, this works brilliantly in Fast Point Instancing, I can do "billions" of (instanced) polygons with great results.

In the .hip file, I have a simplified example. The bunny has its ears in a group and body is everything else. Base materials applied.

Then I try to use the Material overrides, but it doesn't work Sad

Cheers,

Peter B



material_instance_overrides_fail.hip
 Description:

Download
 Filename:  material_instance_overrides_fail.hip
 Filesize:  3.52 MB
 Downloaded:  547 Time(s)


_________________
Linux 64bit, GL 3.2 viewport
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTS 450/PCIe/SSE2
OpenGL version string: 4.3.0 NVIDIA 319.17
Back to top
View user's profile Send private message
circusmonkey
Houdini Guru


Joined: 26 Aug 2006
Posts: 2014

australia.gif
PostPosted: Sun May 27, 2012 6:17 pm GMT    Post subject: Reply with quote

Hi Peter,
I will take a look tonight when I get in from work. As Im in Maya hell right now Smile

Rob
Back to top
View user's profile Send private message Send e-mail AIM Address
pbowmar
Houdini Guru


Joined: 03 Jul 2002
Posts: 4341
Location: Vancouver, BC, Canada

canada.gif
PostPosted: Sun May 27, 2012 8:21 pm GMT    Post subject: Reply with quote

Thanks Rob, not urgent though!!
_________________
Linux 64bit, GL 3.2 viewport
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTS 450/PCIe/SSE2
OpenGL version string: 4.3.0 NVIDIA 319.17
Back to top
View user's profile Send private message
wywait
Lurker


Joined: 13 Jun 2008
Posts: 17

southafrica.gif
PostPosted: Mon May 28, 2012 7:03 pm GMT    Post subject: SSS and point instance procedural Reply with quote

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.

Mike
Back to top
View user's profile Send private message
circusmonkey
Houdini Guru


Joined: 26 Aug 2006
Posts: 2014

australia.gif
PostPosted: Wed May 30, 2012 6:50 am GMT    Post subject: Reply with quote

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



rse_sop_randomcolours_v001.otl
 Description:

Download
 Filename:  rse_sop_randomcolours_v001.otl
 Filesize:  24.11 KB
 Downloaded:  609 Time(s)


pointinstanceComplex.hip
 Description:

Download
 Filename:  pointinstanceComplex.hip
 Filesize:  325.61 KB
 Downloaded:  638 Time(s)



Last edited by circusmonkey on Wed May 30, 2012 7:22 am GMT; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail AIM Address
circusmonkey
Houdini Guru


Joined: 26 Aug 2006
Posts: 2014

australia.gif
PostPosted: Wed May 30, 2012 6:51 am GMT    Post subject: Reply with quote

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

Mike


Cannot say Ive looked into that. do you have a file ?

Rob
Back to top
View user's profile Send private message Send e-mail AIM Address
pbowmar
Houdini Guru


Joined: 03 Jul 2002
Posts: 4341
Location: Vancouver, BC, Canada

canada.gif
PostPosted: Wed May 30, 2012 11:27 am GMT    Post subject: Reply with quote

Hi Rob,

OK thanks for checking, I guess I'm not doing anything wrong Sad

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 Smile

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

_________________
Linux 64bit, GL 3.2 viewport
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTS 450/PCIe/SSE2
OpenGL version string: 4.3.0 NVIDIA 319.17
Back to top
View user's profile Send private message
halfdan
Developer


Joined: 03 May 2011
Posts: 399
Location: Toronto

canada.gif
PostPosted: Wed May 30, 2012 4:48 pm GMT    Post subject: Reply with quote

pbowmar wrote:
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 Smile


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.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Houdini Forum Index -> Technical Discussion All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


phpBB component v1.2.4 RC3 by Adam van Dongen. Based on phpBB © 2001, 2002 phpBB Group