# Sprite Scale

## Recommended Posts

hello everyone.

i have done a sprite shader of smoke.

Sprite is scaling in time with expression rand(\$FF + \$PT)/4 -

result is very roughly scale. It looks like flicking of image. t is not good .

How can i do random more smoothand more accurate ??

Should i adjust the expression?? if so,suggest me, i am not so clever in code .

Or may be solution is to drive the sprite scale from CHOP by noise or wave?????

or something else ??

##### Share on other sites

check 3dbuzz tutorials if you didnt see it

they do this

scale and rand color.....

z

##### Share on other sites

I saw it. My sprites based just on this lesson. But never the less. In this tutorial the same problem. I want more smoothly

##### Share on other sites

I saw it. My sprites based just on this lesson. But never the less. In this tutorial the same problem. I want more smoothly

The reason it's "flickering" is because you are taking the random value based on a frame number. the rand() function in Houdini produces pseudo-random (it needs to be pseudo-random in CG else result is unpredictable everything). What you're probably looking for is noise(), this will give you a smoother noise appearance here.

HOpe that helped.

##### Share on other sites

thank you UsualAlex, i ll try

##### Share on other sites

hahaha

thats what I wrote in my notebook I just saw it from when I was watching buzz tut.

noise=smooth

rand=coarse

z

i should know

##### Share on other sites

One other thing that was probably causing your problems ... in your screen grab your AttribCreate type is set to 'integer' but it should be 'float' so you get fractional values

john

##### Share on other sites

The reason it's "flickering" is because you are taking the random value based on a frame number. the rand() function in Houdini produces pseudo-random (it needs to be pseudo-random in CG else result is unpredictable everything). What you're probably looking for is noise(), this will give you a smoother noise appearance here.

HOpe that helped.

noise is perfect for this situation, but you can try with sturb too, it uses different mathematics algorithms that gives you spatial coherency, that is, and smooth and pseudo random variation.

There are several noise based funtions like noise, snoise, turb, sturb, try them.

##### Share on other sites

-grasshoper - it is only my mistakes, ofcourse, in any chance "type" must be "float".

Noise is really perfect for this situation. But. I came into collision with problem that i have never seen elier.When the particles biths - they appears very suddenly.

test.rar

I want to make appearense by degrees, like smoke or steam. How can i do it better ???

My gain is to birth sprites fluent and then over a period of animation to drive them by expression "noise(\$TX, \$TY, \$TZ)".

Have i change a value of spritescale depending on particle life ???? And how in this case expression will looks like??? Or this problem can be solved on VOPs level???

Sure, sombody somehow had such problem.

##### Share on other sites

Hi,

Without spending any thinking on my part , would something like any of the following help:

noise(\$TX+\$LIFE, \$TY+\$LIFE+3, \$TZ+\$LIFE+5) -- where each position is offset by particle life.

noise(\$TX, \$TY, \$TZ)*(1-\$LIFE) -- where the noise is scaled by life of the particle

Not sure if that's what you're looking for... my brain has pretty much went to sleep at this hour.

##### Share on other sites

Noise is really perfect for this situation. But. I came into collision with problem that i have never seen elier.When the particles biths - they appears very suddenly.

To make particles appear less suddenly you could fade them in by ramping up the alpha. Add a color POP, click on the Alpha tab and check Ramp. You'll probably want to drive the lookup with LIFE. You can also control the pcsale during the particle's life. Normally for smoke and such your pscale will grow during the particle's life and the alpha will fade in quickly and out slowly. Hope that's what you were looking for.

john.

##### Share on other sites

thank you.

yes, grasshoper it is just what i am looking for, exepting i use SOP particles , not POP.

But never the less , i will try to do somthing similar in SOP.

## 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.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

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

×
×