[Sidefx-houdini-list] Bridge of Cards

Peter Robbinson probbins at sympatico.ca
Mon Mar 17 14:12:14 EDT 2008


The Details view is set to show "point" information by default. You can 
change the type of info. to view on the right side
of the Details view.

PeterR

pingo van der brinkloev wrote:
> Hey Antoine.
> It all makes sense (points are points, etc) and It certainly should  
> work the way you describe, but it just doesn't. not with `$PR` either.
> A shame you don't have a houdini in front of you cause I would really  
> like to have someone confirm this.
>
> I am using a standard grid with nothing changed. It's got 81  
> Primitives. (100 points)
>
> On the attribCreate with Class as Primitive, Type as String and $PR in  
> String the attributes dissapear from the details view
>
> very odd.
>
> Cheers!
>
> pingo
>
>
> On 17/03/2008, at 18.03, Antoine Durr wrote:
>
>   
>> If you're making an attribute of class 'point', then no, you don't
>> have access to $PR, as $PR is the *primitive* number (which you don't
>> "know" about when looping through the points list).  Likewise, you
>> can use $PT in the points context, but not the primitive context.
>> The only example below that might work is the class=prim,
>> type=string, string=$PR example.  Mouse-middle on the SOP above the
>> attribcreate: how many primitives do you have?  If you have a NURBs
>> patch, then yeah, I would expect only one primitive, number zero.  If
>> you have 100 polys, then $PR *should* go from 0 to 99.  You may need
>> to backtick the $PR (`$PR`) when making a string (don't have Houdini
>> in front of me, so I can't test).
>>
>> -- Antoine
>>
>> On Mar 17, 2008, at 9:21 AM, pingo van der brinkloev wrote:
>>
>>     
>>> Hey Antoine. I might be doing something wrong, but I can't get the
>>> AttribCreate to use the $PR in he string
>>>
>>> this works
>>>
>>> I make a grid
>>> connect it to an AttribCreate
>>> 	Class = Point
>>> 	Type = String
>>> 	.
>>> 	.
>>> 	.
>>> 	String = $PT
>>>
>>> If I look in the details view I can see my attribute1 changing  
>>> numbers
>>> along with the point number.
>>>
>>> but...
>>>
>>> Changing things in the attribcreate doesn't work as I would expect...
>>>
>>> 	Class = Primitive
>>> 	Type = String
>>> 	.
>>> 	.
>>> 	.
>>> 	String = $PT
>>>
>>> Attributes dissapear
>>>
>>> 	Class = Primitive
>>> 	Type = String
>>> 	.
>>> 	.
>>> 	.
>>> 	String = $PR
>>>
>>> Attributes dissapear
>>>
>>> 	Class = Points
>>> 	Type = String
>>> 	.
>>> 	.
>>> 	.
>>> 	String = $PR
>>>
>>> Attributes reapear but are all = 0 (zero)
>>>
>>> Is this supposed to happen??
>>>
>>> thanks for your time!
>>>
>>> pingo
>>>
>>> On 17/03/2008, at 16.03, Antoine Durr wrote:
>>>
>>>       
>>>> On Mar 17, 2008, at 7:40 AM, pingo van der brinkloev wrote:
>>>>
>>>>         
>>>>> Hello Antoine. I've been following this thread with great interest.
>>>>> Could this technique be used to create a grid with an (adjacent
>>>>> numbered) image on each face?
>>>>>
>>>>> what would be the shortest steps to produce that?
>>>>>           
>>>> Sure, that's easy!  Just an attribcreate SOP again using $PR in an
>>>> expression (but again, you first need to find out what the parameter
>>>> is on the *shader* that will take the unique named map (often called
>>>> 'map', but not always).
>>>>
>>>> -- Antoine
>>>>
>>>>         
>>>>> regards
>>>>>
>>>>> pingo
>>>>>
>>>>> On 16/03/2008, at 11.12, Antoine Durr wrote:
>>>>>
>>>>>           
>>>>>> Wow, 87,000 polygons for a single card?  That'll slow you down!  I
>>>>>> would expect a playing card to be in the hundreds of polys at  
>>>>>> most,
>>>>>> not tens of thousands!   I'd start out by temporarily replacing  
>>>>>> the
>>>>>> card geometry with a simple rectangle -- one polygon (a.k.a.
>>>>>> primitive), then see if the $PR in attribcreate works.
>>>>>>
>>>>>> Yeah, with multiple primitives per card, you'll get each  
>>>>>> subsequent
>>>>>> card on adjacent primitives -- definitely not what you want.
>>>>>> You'll
>>>>>> need to isolate the face of the card into one SOP,  and everything
>>>>>> else as another SOP.
>>>>>>
>>>>>> The randomization is in the expression you use to set the map
>>>>>> attribute.  I gave a simple example -- card.$PR.jpg.  What you're
>>>>>> more likely to need is
>>>>>>
>>>>>> card.`int(rand($PR)*$NPR)`.jpg
>>>>>>
>>>>>> though I prefer to use fit() to have deliberate control over the
>>>>>> output range (1 to $NPR in this case)
>>>>>>
>>>>>> card.`int(fit(rand($PR), 0, 1, 1, $NPR))`.jpg
>>>>>>
>>>>>> Again, check here with the geometry spreadsheet that your
>>>>>> assignments
>>>>>> worked out as planned.  Then it's a matter of copying both the  
>>>>>> face
>>>>>> polys and the non-face polys to the points (via the copy SOP, as I
>>>>>> assume you're doing).
>>>>>>
>>>>>> Actually, now that I think about it, you probably want to apply  
>>>>>> the
>>>>>> attribcreate to the *points* onto which you will copy the cards,
>>>>>> first.  Still separate and do two copies, one for the faces, one
>>>>>> for
>>>>>> everything else.  On the copy SOP operation with the faces, you  
>>>>>> can
>>>>>> have the single face polygon inherit the attributes from the
>>>>>> points.
>>>>>>
>>>>>> -- Antoine
>>>>>>
>>>>>>
>>>>>> On Mar 16, 2008, at 2:33 AM, Chandra Maharzan wrote:
>>>>>>
>>>>>>             
>>>>>>> I have copied over 1 card. It just say 87000 Primitives when I
>>>>>>> middle mouse
>>>>>>> click on the attribcreate SOP. It also says 1 Primitive Attribute
>>>>>>> and card
>>>>>>> -> card.01.jpg. So I am guessing it is only taking 1 primitive to
>>>>>>> replicate
>>>>>>>               
>>>>>>> just one texture for all the cards. Isn't there a way to assign
>>>>>>> each of the
>>>>>>> copied primitives to take random textures? I am a newbie and I am
>>>>>>> not so
>>>>>>> sure of what you are trying to explain to me.
>>>>>>>
>>>>>>> Thanks and let me know if there is a way to figure it out.
>>>>>>>
>>>>>>> Chandra
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: sidefx-houdini-list-bounces at sidefx.com
>>>>>>> [mailto:sidefx-houdini-list-bounces at sidefx.com] On Behalf Of
>>>>>>> Antoine Durr
>>>>>>> Sent: Sunday, March 16, 2008 2:37 PM
>>>>>>> To: sidefx-houdini-list at sidefx.com
>>>>>>> Subject: Re: [Sidefx-houdini-list] Bridge of Cards
>>>>>>>
>>>>>>> The attribute type has to match the type of the parameter of the
>>>>>>> shader.  Typically, the 'map' parameter is a *string* parameter.
>>>>>>> In
>>>>>>> the attribcreate, you'll proabably use something like card. 
>>>>>>> $PR.jpg
>>>>>>> (i.e. one map per primitive).  Whether the attribcreate is before
>>>>>>> or
>>>>>>> after the material SOP doesn't matter so much, as both of them
>>>>>>> just
>>>>>>> add *attributes* to the geometry.  Use mouse-middle on the SOP or
>>>>>>> the
>>>>>>> geometry spreadsheet to see what attribs are ultimately there
>>>>>>> (especially of the SOP that is used to render).
>>>>>>>
>>>>>>> -- Antoine
>>>>>>>
>>>>>>>
>>>>>>> On Mar 16, 2008, at 1:08 AM, Chandra Maharzan wrote:
>>>>>>>
>>>>>>>               
>>>>>>>> This is quite unclear to me. I created the attribcreate SOP
>>>>>>>> infront
>>>>>>>> of the
>>>>>>>> material SOP and gave the name card (as the cards are named  
>>>>>>>> card.
>>>>>>>> 01.jpg,
>>>>>>>> etc) and then type=float size 3 or 2.. but it didn't work
>>>>>>>> properly.
>>>>>>>> I have
>>>>>>>> the Texture map set to .../card.$F2.jpg
>>>>>>>>
>>>>>>>> What am I doing wrong here or missing?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Chandra
>>>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>> From: sidefx-houdini-list-bounces at sidefx.com
>>>>>>>> [mailto:sidefx-houdini-list-bounces at sidefx.com] On Behalf Of
>>>>>>>> Antoine Durr
>>>>>>>> Sent: Saturday, March 15, 2008 2:29 AM
>>>>>>>> To: sidefx-houdini-list at sidefx.com
>>>>>>>> Subject: Re: [Sidefx-houdini-list] Bridge of Cards
>>>>>>>>
>>>>>>>> Look at the shader that you're using.  Is there a field for map
>>>>>>>> name?  If so, make an attribute on your geometry with the same
>>>>>>>> name
>>>>>>>> and type (using attribcreate SOP), set each name randomly (have
>>>>>>>> names
>>>>>>>> like card.0001.jpg, card.0002.jpg, and so on to make it easier).
>>>>>>>> Now
>>>>>>>> rerender, and each card should be  unique.
>>>>>>>>
>>>>>>>> -- Antoine
>>>>>>>>
>>>>>>>> On Mar 14, 2008, at 1:01 PM, Chandra Maharzan wrote:
>>>>>>>>
>>>>>>>>                 
>>>>>>>>> How can we assign random textures ? That might be a good
>>>>>>>>> trick so
>>>>>>>>> we can get
>>>>>>>>> all the cards.. :)
>>>>>>>>>
>>>>>>>>> -----Original Message-----
>>>>>>>>> From: sidefx-houdini-list-bounces at sidefx.com
>>>>>>>>> [mailto:sidefx-houdini-list-bounces at sidefx.com] On Behalf Of
>>>>>>>>> Jerry
>>>>>>>>> Corda-Stanley
>>>>>>>>> Sent: Saturday, March 15, 2008 1:24 AM
>>>>>>>>> To: sidefx-houdini-list at sidefx.com
>>>>>>>>> Subject: Re: [Sidefx-houdini-list] Bridge of Cards
>>>>>>>>>
>>>>>>>>> That's some pack of cards. All aces!
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ----- "Chandra Maharzan" <chandra at digital.com.np> wrote:
>>>>>>>>>                   
>>>>>>>>>> Hi Guys,
>>>>>>>>>>
>>>>>>>>>> By the way, if you were wondering what I was upto and sending
>>>>>>>>>> all
>>>>>>>>>> those
>>>>>>>>>> newbie questions, here is what I made. :)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                     
>>>>>>>>> http://bp0.blogger.com/_ZoZUTKmj098/R9rCJ6QlbiI/AAAAAAAAADM/
>>>>>>>>> Y8mervJCHMo/s160
>>>>>>>>>                   
>>>>>>>>>> 0-h/bridge-full.jpg
>>>>>>>>>>
>>>>>>>>>> Hope you like it. (My blog - http://
>>>>>>>>>> learninghoudini.blogspot.com/)
>>>>>>>>>>
>>>>>>>>>> Thank you all for your prompt replies and I am looking forward
>>>>>>>>>> to
>>>>>>>>>> learning
>>>>>>>>>> more of Houdini in coming days.
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> Chandra
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Sidefx-houdini-list mailing list
>>>>>>>>>> Sidefx-houdini-list at sidefx.com
>>>>>>>>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-
>>>>>>>>>> list
>>>>>>>>>>                     
>>>>>>>>> _______________________________________________
>>>>>>>>> Sidefx-houdini-list mailing list
>>>>>>>>> Sidefx-houdini-list at sidefx.com
>>>>>>>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-
>>>>>>>>> list
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Sidefx-houdini-list mailing list
>>>>>>>>> Sidefx-houdini-list at sidefx.com
>>>>>>>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-
>>>>>>>>> list
>>>>>>>>>                   
>>>>>>>> -- Antoine
>>>>>>>>
>>>>>>>> Floq FX Inc.
>>>>>>>> 10659 Cranks Rd.
>>>>>>>> Culver City, CA 90230
>>>>>>>> 310/430-2473
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Sidefx-houdini-list mailing list
>>>>>>>> Sidefx-houdini-list at sidefx.com
>>>>>>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini- 
>>>>>>>> list
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Sidefx-houdini-list mailing list
>>>>>>>> Sidefx-houdini-list at sidefx.com
>>>>>>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini- 
>>>>>>>> list
>>>>>>>>                 
>>>>>>> -- Antoine
>>>>>>>
>>>>>>> Floq FX Inc.
>>>>>>> 10659 Cranks Rd.
>>>>>>> Culver City, CA 90230
>>>>>>> 310/430-2473
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Sidefx-houdini-list mailing list
>>>>>>> Sidefx-houdini-list at sidefx.com
>>>>>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Sidefx-houdini-list mailing list
>>>>>>> Sidefx-houdini-list at sidefx.com
>>>>>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>>>>>>               
>>>>>> -- Antoine
>>>>>>
>>>>>> Floq FX Inc.
>>>>>> 10659 Cranks Rd.
>>>>>> Culver City, CA 90230
>>>>>> 310/430-2473
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Sidefx-houdini-list mailing list
>>>>>> Sidefx-houdini-list at sidefx.com
>>>>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>>>>>             
>>>>> _______________________________________________
>>>>> Sidefx-houdini-list mailing list
>>>>> Sidefx-houdini-list at sidefx.com
>>>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>>>>           
>>>> -- Antoine
>>>>
>>>> Floq FX Inc.
>>>> 10659 Cranks Rd.
>>>> Culver City, CA 90230
>>>> 310/430-2473
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Sidefx-houdini-list mailing list
>>>> Sidefx-houdini-list at sidefx.com
>>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>>>         
>>> _______________________________________________
>>> Sidefx-houdini-list mailing list
>>> Sidefx-houdini-list at sidefx.com
>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>>       
>> -- Antoine
>>
>> Floq FX Inc.
>> 10659 Cranks Rd.
>> Culver City, CA 90230
>> 310/430-2473
>>
>>
>>
>>
>> _______________________________________________
>> Sidefx-houdini-list mailing list
>> Sidefx-houdini-list at sidefx.com
>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>     
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>
>   

-- 
"gravity is not a force, it is a boundary layer"
"everything is coincident"
"Love: the state of suspended anticipation"
"To get any appreciable distance from the Earth in 
a sensible amount of time, you must lie."
"Easy, is not how you make a living."




More information about the Sidefx-houdini-list mailing list