Jump to content

Can Particle SOP do a sprite?


Recommended Posts

Hi guys,

I have created a simulation using particle SOP as it is easier to setup and I am on the learning process.

But!

I need to render it out using sprite and I cant get it to work!

It is just not like plugging in a sprite POP and da-ta! :(

Anyone? I tried searching through the help but no avail.

I have attached my scene file as well.

Thanks.

regards,

-ray

Tornado_setup_9.rar

Link to comment
Share on other sites

Hi guys,

I have created a simulation using particle SOP as it is easier to setup and I am on the learning process.

But!

I need to render it out using sprite and I cant get it to work!

It is just not like plugging in a sprite POP and da-ta! :(

Anyone? I tried searching through the help but no avail.

I have attached my scene file as well.

Thanks.

regards,

-ray

You can create the necessary sprite attributes in SOPs using an attribute create SOP. But to be honest, I would recommend staying away from the particle SOP and just do what you need to do in POPs because you have a lot more flexibility and control.

Link to comment
Share on other sites

You can create the necessary sprite attributes in SOPs using an attribute create SOP. But to be honest, I would recommend staying away from the particle SOP and just do what you need to do in POPs because you have a lot more flexibility and control.

Hey thanks for saying that, i actually manage to get a geo sprite shader to link it with the particles, but it cant do a per particle or maybe it can. But i have start to shit to use POP as like you say, more control.

Thanks anyway. :)

Appreciate it!

regards,

-ray

Link to comment
Share on other sites

  • 4 months later...

hey I'm trying the same thing out..and am stuck at the exact same point!!

@ SpencerL: hey I tried to create the attribute for sprite but dont know what class or type it should be..and what would be the other attributes for setting up a system using sprite instancing..

could anyone help me out with this please :D

personally I do prefer POPs but yea trying/learning to use Particle SOP efficiently is only an add on.. :ph34r:

thanks.

Link to comment
Share on other sites

I think the spriteshop attribute can be anything as long as it exists, but I usually put a string there as its type without any value. The class is point, of course.

You will also want to create the spritescale attribute, which is also a point attribute. The type is float and the size is 3. The first two values are the x and y size of the sprite. This way you can use a previous Point SOP, and base the sprites on the pscale attribute, and play from that.

I agree it

Edited by Netvudu
Link to comment
Share on other sites

Have you tried the shelf tools for this? These are a really good way to get an introduction into an area that you might not be familiar with, like POPs. Check them out. I've really learned to love them.

There is a sprite shelf-tool that you might want to try. This sets up the sprite system for you and you can check out how the network is set up. Real nice and easy!

Particle SOP should be deprecated IMHO. POPs should be the only option (I'm in favor of streamlining versus having too many ways to do the same thing).

Link to comment
Share on other sites

@Netvudu: hey thanks for the reply buddy..yea i did create the spritescale and spriteshop attributes but the issue is how do I get the particles to render as Sprites instead of spheres? I checked the 3DBuzz tut for sprite shader but that was done on H 5 or probably 8 (I'm not complaining..that was really cool tutorial) the only issue is:

in that version or older versions, there used to be a parameter in the Render tab of the geometry object at the scene level which has been removed or placed somewhere else in H9 up versions....

I tried adding that parameter using the Edit Parameter Interface but there's no place to write in 'Mantra Procedure' code where in we could specify that we need particles to render as sprites.

any ideas?

@fxrod hey..i did try the shelf tool 'Sprite' for this..issue is it does not accept Particles from Particle SOP....I could use it if I were producing a particle system in POPs....I do like them...however i try to build networks on my own ....I guess Particle SOP can get you nice effects and doesnt require a lot of CPU memory if utilised efficiently....I guess thats why its still there....SideFX guys know there job well :)

Link to comment
Share on other sites

it's actually easier than you may think

you just need Mantra Sprite Procedural in your material

and optional "spritescale" float3 attribute

off course you can use "spriteuv" and "spriterot" to further modify sprites

then in Mantra Sprite Procedural's attribute parameter type all attributes you want your surface/disp shader to use

in your case it is "dotclr"

you do not need to mess with "spriteshop" attribute or Procedural Shader Parameter under object's Geometry tab, only if you want and know what you are doing and why

look at the modified file

spriteShaderTest_fix.hip

Link to comment
Share on other sites

hey Anim thanks a ton buddy!!

its working great..will update in case of further issues with sprites.. :D

@Raymond: yea i was searching for a way out and saw this thread..felt like posting here rather than creating a new thread..

dude if your stuck there..you should have a look at Anim's corrected version..its working :thumbsup:

Link to comment
Share on other sites

there's one issue though..

I am not able to control the scale of my sprites..

even after changing expressions in the 'spritescale' values, default size values too..(in the spritescale)

if i put 3 as the default size value, it increases a lot and at 4 it looks same as value of 2

any guess??

thanks..

Link to comment
Share on other sites

the size parameter on AttributeCreate SOP in this case named "spritescale" is not the value of the spritescale attribute it is the size of the attribute

so value of 3 means that the attribute consists of 3 float values per point (like spritescaleu,spritescalev,spritescalew)

the sprite procedural recognises "spritescale" parameter only as float3 so this is the reason for any other values than 3 will give you default sprite scale in other words it will be as if you haven't created it

if you want to control the spritesize you need to change the expression in Value parameter

i set it to

fit01($LIFE,0.1,0.4)*fit01(rand($ID),0.5,1)

which means that it will grow over its life from size of 0.1 to size of 0.4 with variation from 50-100%

just delete this expression and put in there any value you want your spritescale to be, the change will be immediately reflected in the viewport

you can put different values for u and v to get rectangular sprites

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