I have a sprite setup that displays in my GL window somewhat correctly, but I have a special SHOP to do some different processing on the Sprites, yet I can't find a way to render a sprite with Mantra- I can only show it in my OpenGL window. Is there a way to render a Sprite system with Mantra?
Also, does anyone know why my texture map with nice soft Alpha edges show up like a cutout with a hard edge following the alpha in the GL window despite turning on all the GL Transparency options? The Alpha is being used, but it is like there is a clamp or smoothstep to make a hard change at some value. My texture is a .tga and is premultiplied, but I don't know if that is an issue. (Would it do better as a .rat?)
Thanks,
Craig
Rendering Sprites with Mantra?
9653 9 4- craiglhoffman
- Member
- 252 posts
- Joined: July 2005
- Offline
- mookid20
- Member
- 36 posts
- Joined: July 2005
- Offline
To render sprites in Mantra.-
Go into the render tab of Geometry SOP. Change the Geometry -> ‘render as is“ to ”procedural". Open the dialog below for the mantra Procedural with the little ’+' button. choose ‘sprites from the pulldown and Accept.
Just to confirm. you can switch, if you want, how the GL viewport viewport displays the particles. Press the ’D' key. Click on the ‘Particles’ tab. Change ‘Display particles as’
Your othe issue with the alpha. Maybe this is an issue with the .tga format. or even a GFXcard issue.
Go into the render tab of Geometry SOP. Change the Geometry -> ‘render as is“ to ”procedural". Open the dialog below for the mantra Procedural with the little ’+' button. choose ‘sprites from the pulldown and Accept.
Just to confirm. you can switch, if you want, how the GL viewport viewport displays the particles. Press the ’D' key. Click on the ‘Particles’ tab. Change ‘Display particles as’
Your othe issue with the alpha. Maybe this is an issue with the .tga format. or even a GFXcard issue.
- Ondrej
- Staff
- 1072 posts
- Joined: July 2005
- Offline
- craiglhoffman
- Member
- 252 posts
- Joined: July 2005
- Offline
- craiglhoffman
- Member
- 252 posts
- Joined: July 2005
- Offline
Furthermore, what is really cool about your adding the Color POP suggestion Ondrej, is that the Color and Alpha act as MULTIPLIERS for what you see in the GL View, so you can tint your sprites or make them more transparent.
You can even animate their transparency with something like 1-$LIFE in their Alpha!
Ya learn something new everyday…
Thanks,
Craig
You can even animate their transparency with something like 1-$LIFE in their Alpha!
Ya learn something new everyday…
Thanks,
Craig
- Ondrej
- Staff
- 1072 posts
- Joined: July 2005
- Offline
- futnuh
- Member
- 56 posts
- Joined: March 2006
- Offline
- symek
- Member
- 1390 posts
- Joined: July 2005
- Offline
- pbowmar
- Member
- 7025 posts
- Joined: July 2005
- Offline
You need to use a SHOP like Supermaterial that will pick up the attributes. you also need to make sure to pass the attributes to the procedural that is applied to the Object.
Cheers,
Peter B
Cheers,
Peter B
futnuh
To bring an old thread back to life, the alpha=0 regions of my sprites correctly show up as transparent in OpenGL (thanks to the advice above ;-)) but are solid black when rendered with mantra. Any suggestions on how to remedy this?
- futnuh
- Member
- 56 posts
- Joined: March 2006
- Offline
Thanks for the tips guys.
I have an object that contains a simple Popnet. In the object's render tab, I have geometry set to ‘procedural’ and mantra procedure set to ‘sprite’. For the test SHOP (applied in the popnet via a Sprite POP), I am using a built-in VEX Super Material with the diffmap pointing to my 4-channel .rat image (C + A). I thought this would do it but I'm still seeing black in the transparent regions of the map.
Having just watched the 3DBuzz VTM on writing a sprite shader with VOPs (as discussed in this thread, http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=4870&highlight=sprite [sidefx.com]), I wonder if I need to write my own shader? Or should it be possible with a supermat?
Cheers,
Darran.
pbowmar
You need to use a SHOP like Supermaterial that will pick up the attributes. you also need to make sure to pass the attributes to the procedural that is applied to the Object.
I have an object that contains a simple Popnet. In the object's render tab, I have geometry set to ‘procedural’ and mantra procedure set to ‘sprite’. For the test SHOP (applied in the popnet via a Sprite POP), I am using a built-in VEX Super Material with the diffmap pointing to my 4-channel .rat image (C + A). I thought this would do it but I'm still seeing black in the transparent regions of the map.
Having just watched the 3DBuzz VTM on writing a sprite shader with VOPs (as discussed in this thread, http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=4870&highlight=sprite [sidefx.com]), I wonder if I need to write my own shader? Or should it be possible with a supermat?
Cheers,
Darran.
-
- Quick Links