Jump to content
Official BF Editor Forums
Sign in to follow this  
[BF:A] Croupier

MeshParticleMesh, Alpha and you.

Recommended Posts

I have a come up with a method of getting a MeshParticleMesh object ingame with Alpha and Collisions working nicely, for all intensive purposes it could serve as a staticobject if needed.


Ok here's how I did it:

To keep things quick and simple I used the stock BF2 texture Effectsweaponstracersgeometrytexturestracer_mg.dds for my color map.

In my previous post I mentioned the Dice Method of exporting as a bundledmesh with a staticmesh fx, well thats what I used for exporting.

Firstly I created 2 planes and applied a shell modifier, created a box for the collisions, I did'nt bother naming col mat's as this was a quick test.

Next I applied the BF2 StaticMesh2 material and loaded the extracted texture tracer_mg.dds into the Base slot.

The naming of the root (root_MeshParticleMesh_Plane02) is important and is essential if you want your alpha to show.

This screenshot will help illustrate my method.


Now lets see switch to the ed to see what she looks like, but first lets take a quick peak at the .con that was generated on export.

GeometryTemplate.create MeshParticleMesh plane02

CollisionManager.createTemplate plane02

ObjectTemplate.create Particle plane02

ObjectTemplate.saveInSeparateFile 1

ObjectTemplate.creator APOCALYPSE:Croupier

ObjectTemplate.collisionMesh plane02

ObjectTemplate.mapMaterial 0 UNDEFINED 0

ObjectTemplate.hasCollisionPhysics 1

ObjectTemplate.physicsType 3

ObjectTemplate.geometry plane02

include plane02.tweak

Nice one, the GeometryTemplate.create MeshParticleMesh plane02 were wriiten as they should, OK lets continue to the editor and create our .tweak

Note: you may have to goto mod manager and add your content.

You should now be able to see your new content in your Resources tab, go ahead and select your new objects, you may now be dissapointed to find that you can't see your object, well we aint done yet, and now we can start to tweak.

You can see the tweaks I have made in this pic:


You can change your tweak in the editor or copy and paste from the code to your .tweak file.

rem *** Generated with Bf2Editor.exe [created: 2006/1/4 7:47]

ObjectTemplate.activeSafe Particle plane02

ObjectTemplate.creator APOCALYPSE:Croupier

ObjectTemplate.modifiedByUser "Croupier"

ObjectTemplate.saveInSeparateFile 1

ObjectTemplate.geometry plane02

ObjectTemplate.usedOnTransparentSurface 0

ObjectTemplate.collisionMesh plane02

ObjectTemplate.mapMaterial 0 UNDEFINED 21

ObjectTemplate.collisionGroups 2

ObjectTemplate.physicsType Mesh

ObjectTemplate.hasCollisionPhysics 1

ObjectTemplate.timeToLive CRD_UNIFORM/999/0/0

ObjectTemplate.sizeModifier 1/1/1

ObjectTemplate.transparencyGraph 0/0/0/1

ObjectTemplate.transparency CRD_NONE/0/0/0

Remeber to save for your tweak to be written,

A couple of points worth noting:

You must add ObjectTemplate.timeToLive CRD_UNIFORM/999/0/0 in order to see your object, I set it to 999 so that it hangs around for a long time.

CollisionGroups are important for what will collide with your object, be sure to exclude what you dont want.

OK I've teaked, I've saved, I've reloaded, but I still cant see my object?

We'll if like me you also have this problem I have a workaround.

Load up one of your maps and place the MeshParticleMesh object.

Hallelujah I can see the light.


Now if you go back to the Object Editor and load up your object you should be able to see it, don't ask me why but it works for me.


Remember to save and repack your map and all your new content into into your mods .zips

Fire up a Local and check it out.


Share this post

Link to post
Share on other sites

Ok, cool. So Staticmesh on particles, not bundled mesh. Thanks Mate, that's outstanding. One question though: Do they emit? Do they take texture sequencing? Can I ask 3 questions? Wait, now it's 4. Crap, 5? Can I take back two questions? Wait, that's 6. Minus 2, carry the Pi....I'm lost.

Seriously, what about having them emitted and trailing sprites? Still a no-go?

Share this post

Link to post
Share on other sites

Junk I'll do a little more digging and see what I can come up with. My predictions are though that you could emmit the object seeing as the Dice bridgewreck particles are pretty much set up the same way and I'm pretty certain they are emmited.

I will have to test for texture sequencing and I still am uncertain if we can add a trail, although when I tried to add a trail it was set up as a bundledmesh and not a MeshParticleMesh, so perhaps that may make a difference.

Share this post

Link to post
Share on other sites

Cheers m8, nice tut, I got it working with no problems other than I the transparency isnt changing. I adjust the alpha and nothing works, its supposed to be a slightly transparent red object and its coming out orange/pink almost completely transparent. Any ideas what I might be doing wrong?

Share this post

Link to post
Share on other sites

Screenshots? Editor and ingame, + screenshot of original color texture and pic of the alpha channel.

Edited by [BF:A] Croupier

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this