Jump to content

paticles, shading and transparency


sjowol

Recommended Posts

hi there,

at the moment i am working on an effect for my group project in uni, basically it's going to be a sort of hologrammy swirling particle system using filmed footage for the texture.

my problem now though... i set up a particle system, thought using sprites would be the best way to go, but you can only shade them seperately, what i want iss to shade my whole particlegroup, so my texture gets projected on the particles (or seems to be projected, i tried doiing it with a simple projection froma light, sort of worked but it should be possible to texture the whole system shouldn't it?) so that's the first main problem, how do i get an orthografic projection that just shades the particle group?

then it would be nice if the particles that are farther from the camera would be more transparent then the ones closer to the cam (so getting z-depth and putting that to the transparency) but i can't even seem to find a transparency setting in any of the vex shaders... argh let alone think of a way to get this integrated in my particle system...

so if anyone has any idea of how to do this it would be greatly appreciated!

cheers,

Joel

Link to comment
Share on other sites

Shading the whole particle system isn't more difficult than shading each particle separately. Just find how particle attributes are mapped to the global sprite object ( that you can consider as any usual geometric object).

After that, it's just a matter of writing shaders.

I made an example in the attached file.

Fiat Mandrilus!

It should help you!

sjowol.zip

Link to comment
Share on other sites

yeah, that's what i am looking for! thanks for the file

my only problem now is that i haven't really done anything in vex yet so don't really get that part (yet). i'll go and ask a tutor maybe they know how to work it (in uni here)

could you give me a basic outline of what you've done?

thanks a lot!

Joel

Link to comment
Share on other sites

Ok, i'm gonna give you the basic steps:

- I created a particle system and used it in SOP.

To render it correctly, you need to go at the Object Level (Render section of

the SOP object in parameters - render :procedural -sprites).

-The rest in shader writing:

I "composited" ( in the shader) two things:

-the mandril pic shaded in screen space ( point positions are converted to raster space with the NDC vop)

-a sphere opacity texture on each sprite:

the Sprite POP (when you turn on Enable SpriteShop) create s,t ( = uv ) coordinate for each sprite), on each point of each sprite ( I cannot say one shading part works on an per-particle basis and the other on a particle-system basis, like in Maya...: but while working on a particle-system basis ( considering the particle sprited object as a whole geometric object) rather think of a texture "repeating" itself on each sprite.

The mandril comes from the standard images, and the spherical ramp comes directly from the Cop network: i could have created it procedurally or used a image file, but this is faster, use op:"cop path" ).

The composition consist in pre-multiplying the Mandril color with the sphere ramp color to have spherical-looking particles, and use the same sphere ramp to set the opacity.

Et voila!

Feel free to ask other question if i forgot to mention anything!

Hope it helps :)

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