Jump to content

how to control sprite size in SOPS


Recommended Posts

hi,

I had a small question.

I was working on a small particle scene with sprites. However I am not able to modify the sprite scale.

I have generated particles using the Particle SOP. And then applied the Sprite Procedural . I am getting sprites while rendering. I was also able to color them using a POINT SOP to add color and then adding a CD attribute in the Sprite Procedural.

However , I am not able to control the sprite size. I tried the following things, none seem to work.

1. Adding an AttributeCreate SOP after the particle SOP and using PSCALE, and adding the attribute into the Sprite Procedural. It doesnt work. The PSCALE is affecting the COPY SOP if I add one. But it doesnt affect the SPRITES.

2. I even tried to add a PSCALE via the POINT SOP particle tab, and using ADD SCALE. even that doesnt work.

3. Lastly , I tried adding a SPRITESCALE attribute, I dont even know if it exists, but I tried it anyways :) That also didnt work.

I know I am missing something. So, any help will be most appreciated.

I also searched the Forums, before posting the question, But most people mentioned adding PSCALE and using a copy sop, But that doesnt affect sprites.

with regards

Rohan Dalvi

Link to comment
Share on other sites

i tried it, it doesnt work.

I am completely out of ideas now. This is as far as my houdini knowledge goes. I even tried it at home last night and it didnt even work at home.

The only thing that works is the SPRITE POP. But If i try to do that in SOPs using attributecreate ,nothing happens.

I know I am missing something. I could get the Color attribute to work and the pscale attribute works on copied geometry. Just cant get the spritescale to work.

please help.

Link to comment
Share on other sites

Hi!

I'm new to Houdini, but I tried this and worked in your scene althought might not be what you're looking for:

In the POP sprite node you hace scale set to $SX and $SY, you can control the size from there, like add a multiplier for example.

Does it help?

Link to comment
Share on other sites

thanks man,

But I already know that one. I have already applied that in the file.

My problem is what if I make particles in SOPs and there is now SPRITE POP there so then what do I do.

I know I can make it work in POPs but I need to get it to work in SOPs as well.

Anyways, will try again when I get home.

Thanks again.

Link to comment
Share on other sites

don't want to hijack this thread, but the title encouraged me:

Is it possible to render points/particles in 'escape?

Maybe by creating the attributes with attributeCreateSOP?

Or is this feature POPnetwork only?

Georg

Link to comment
Share on other sites

thanks a lot guys,

I realize my mistake now.

When Sir Old School said to set the size to 3 I thought he was talking about the value. (Stupid moron that I am. :) )

Can anyone explain why I need to set the Size to 3. Is it because the SpriteScale controls X and Y values

And thanks a lot Marc for fixing the file. I would have never guessed that I needed to set the Size to 3.

Also for RDG, I think you can render sprites in Escape. I have this old video of houdini where this guy converted the points of a box into sprites without even using Particles and then he rotated and modified them using the Attributecreate SOP. I haven't tried that video in H9 but I think as long as you have the Sprite Procedural, you should be able to render sprites .

with regards

Rohan Dalvi

Edited by rohandalvi
Link to comment
Share on other sites

Can anyone explain why I need to set the Size to 3. Is it because the SpriteScale controls X and Y values

Though sprites are just 2d entities, space in a 3d application is usually defined in 3 axis.

Like UVW where you most of the time just U and V but W is also there.

Some values are vectors and some are floats - and those floats need to be set to 3 'axis'.

Which is likely to be caused with the deeper definition of vectors being directions and stuff like scaling is 'just' a value - and no vector.

sprites vs escape:

yes I got it working. using the sprite procedural and attributeCreates.

spriterot = float 1

spritescale = float 3

missing sprite uv, which I didn't get to show any changes.

Edited by rdg
Link to comment
Share on other sites

Yeah I was a bit obtuse. When I capitalize names I mean parameter labels...

You need to make an attribute that has three components as the spritescale has three values: one for scale in X, Y and Z.

You can tell that you need to set it to a float type with three elements from the Spreadsheet. Open the spreadsheet on the SOP in question by RMB (RightMouseButton) on the icon, and choose the correct entry from the pop-up menu.

Inspecting the spreadsheet in point view (default), scroll over until you see the spritescale three values. They will be spritescale[0], spritescale[1] and spritescale[2]. If the square brackets have numbers in them starting at zero, then you need to create an attribute of type float and set the Size to 3 (or whatever the attribute has). If you see [X], [Y] and [Z] after the attribute names then you need to create a vector type attribute.

Link to comment
Share on other sites

Thanks a lot sir for explaining.

I was actually trying to put the attribute name as Spritescale[3] in the attribute name area ( not that, that was working either.) because I remembered from one of your videos from the Blog where you had isolated one channel from CHOPS using a Square Brackets , so I figured that maybe If i put a square bracket with a 0 or 1 I maybe able control the X or Y value separately. but I wasn't doing anything.

Anyways, thanks a lot for the explanation, at least now I know what the size parameter is meant for. I had seen the values as you had mentioned , in the spreadsheet, But I just didnt know what to do about it. :)

Once again thanks a lot to everyone.

This has got to be the most helpful forum ever.

Edited by rohandalvi
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...