nomad Posted February 12, 2007 Share Posted February 12, 2007 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 ?? Quote Link to comment Share on other sites More sharing options...
zoki Posted February 12, 2007 Share Posted February 12, 2007 check 3dbuzz tutorials if you didnt see it they do this scale and rand color..... z Quote Link to comment Share on other sites More sharing options...
nomad Posted February 12, 2007 Author Share Posted February 12, 2007 I saw it. My sprites based just on this lesson. But never the less. In this tutorial the same problem. I want more smoothly Quote Link to comment Share on other sites More sharing options...
TheUsualAlex Posted February 12, 2007 Share Posted February 12, 2007 I saw it. My sprites based just on this lesson. But never the less. In this tutorial the same problem. I want more smoothly Hi Nomad, 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. Quote Link to comment Share on other sites More sharing options...
nomad Posted February 12, 2007 Author Share Posted February 12, 2007 thank you UsualAlex, i ll try Quote Link to comment Share on other sites More sharing options...
zoki Posted February 12, 2007 Share Posted February 12, 2007 hahaha thats what I wrote in my notebook I just saw it from when I was watching buzz tut. noise=smooth rand=coarse z Quote Link to comment Share on other sites More sharing options...
nomad Posted February 12, 2007 Author Share Posted February 12, 2007 i should know Quote Link to comment Share on other sites More sharing options...
grasshopper Posted February 12, 2007 Share Posted February 12, 2007 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 Quote Link to comment Share on other sites More sharing options...
lisux Posted February 13, 2007 Share Posted February 13, 2007 Hi Nomad, 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. Quote Link to comment Share on other sites More sharing options...
nomad Posted February 15, 2007 Author Share Posted February 15, 2007 thank you for your advices . -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 It looks bad . 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. Quote Link to comment Share on other sites More sharing options...
TheUsualAlex Posted February 15, 2007 Share Posted February 15, 2007 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. Quote Link to comment Share on other sites More sharing options...
grasshopper Posted February 15, 2007 Share Posted February 15, 2007 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. Quote Link to comment Share on other sites More sharing options...
nomad Posted February 16, 2007 Author Share Posted February 16, 2007 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.