[Sidefx-houdini-list] Bridge of Cards 2

Antoine Durr antoine at floqfx.com
Thu Mar 27 23:50:44 EDT 2008


On Mar 27, 2008, at 5:52 PM, Beatriz Lorenzo wrote:
> Hi again!
>
> Still no luck. So here are a couple of questions:
>
> - Mantra parameters are overriden if there is an attribute (same  
> name and
> type) on the geometry. Do I need to actually enable any overrides  
> in the
> material SOP or int eh SHOPs? I ask this because I've seen many  
> "overrides"
> here and there. I have the shaders in SHOP context and geometry in  
> OBJ, if
> it makes any difference.

Iirc, no additional overrides are needed.  If it's not working,  
double check by spitting out a .geo file and actually looking at the  
header, to see what the actual type of the geometry is.  Then, look  
at the shader source (or vopnet should suffice) -- just the parameter  
list of the shader, to see what the actual type of the parameter is.   
The closer you are to the rendering process, the better.  Although  
this is a bit "hard core", it's nice that you can go to what's  
actually being loaded at render time to figure out if the two  
expectations match.

>
> - About randomizing, I'm using a stamp. So I made a new map (in  
> this case is
> map) attribute on the card geo (not on the points to copy to), class
> primitive, type string. And defined the string:
> $HIP/images/cards.`stamp("../copy2","randomizer",1)`.jpg
> For the copy SOP I made the randomizer stamp with this: int(fit(rand 
> ($PR),
> 0, 1, 1, 52))

I don't think you have access to $PR in the copy SOP, as the  
granularity is the copy.  $PT in the copy SOP refers to the right- 
hand input's points.

> --- Actually that might be the problem, as I've copied this
> expression from your previous explanations to pingo without a lot of
> thought, without any thought.
> And for the material, it is just a simple decal with this texture  
> applied:
> $HIP/images/cards.$F4.jpg -- althought it doesn't matter if I put a  
> single
> file like: $HIP/images/cards.0001.jpg
> Do you detect something really bad ni this setup? I mean, it works  
> in my
> head but not in Houdini!!!

Since you're defining 'map' on the geometry, you shouldn't need to  
set it in the SHOP.

-- Antoine

>
> Many thanks  for any help!!!
> :D
>
> Beatriz
>
>
>
> On 27/03/2008, Antoine Durr <antoine at floqfx.com> wrote:
>>
>> Yeah, a 52-layer shader is not particularly someplace you want to go
>> to!!!!
>>
>> Again, here's the underlying concept, which is one of the coolest
>> things about the Mantra renderer: any parameter of the shader can be
>> overriden by data (attributes) on the geometry.  And to do this, all
>> you have to do is match the name (and type and size, actually) of the
>> shader parameter with the data on the geometry, and it will
>> override.  E.g. a 3-float vector attribute on the shader, e.g. color,
>> can be overridden by a 3-float attribute on the geometry.  Just make
>> sure that they're either 3-floats or vector types.  You can do it for
>> strings as well.  Add a string attribute to the geometry called
>> 'map' (if that's the string parameter on the shader), and the
>> geometry's version of 'map' will override.  So now all you have to do
>> is randomize 'map' accordingly on the geometry.
>>
>> -- Antoine
>>
>>
>> On Mar 26, 2008, at 3:49 PM, Beatriz Lorenzo wrote:
>>> Hi everyone!
>>>
>>> this is Beatriz, learning Houdini, totally newbie, etc.
>>> Just wanted to say hello as I just signed up some days ago and also
>>> say that
>>> I'm making a bridge of cards too. I'm on the texturing phase and
>>> I've been
>>> reading all the posts about it but somehow I think I'm missing
>>> something. An
>>> attached file perhaps?
>>>
>>> I tried a different approach using layers (completely ignoring the
>>> fact that
>>> the multilayered VEX needed 52 layers!!!) but the expression I set
>>> for the
>>> current layer would not recognise the $PR so I thought perhaps it
>>> was not
>>> the best approach.
>>>
>>> I'm a little stuck with the whole random texturing thing so any
>>> help is
>>> welcome.
>>>
>>> Cheers
>>>
>>>
>>> Beatriz
>>
>>> _______________________________________________
>>> 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