[Sidefx-houdini-list] Bridge of Cards

Antoine Durr antoine at floqfx.com
Sun Mar 16 06:12:06 EDT 2008


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







More information about the Sidefx-houdini-list mailing list