Awesome stuff
Yeah. Premade effects are what made particle candy as popular as it was (not that it wasn't already really nice).
Anyway, this is regarding the original lotus, but it probably can be applied to Lotus R2. Probably should have let you do it, but I was eager to see the results :P. I added in Convex mesh support for tokamak. Not too hard. I made the following changes to LotusTest.bb (for the rocks), TParticles\h_particle.bb, and TParticles\c_particle.bb:
1. Added Const cT_CONVEX=4 to header
2. Added Field ConvexBank% to Type LotusEmitter
3. Added the following to the select E\TokaMesh...case in Create_Particle:
4. Added a third parameter to SetEmitterTokamakMesh:
5. You probably know where this goes (LotusTest):
6. I realized the rocks had to all have the same scale for the convex mesh to be scaled right :'/, so I changed line 236 (after step 5) to Size=2.
Cool, huh?
Oh yeah, and you'll need to put rock.x and rock.bin into media. (rock.x and rock.bin are in the samples directory of the tokamak wrapper v.6) You'll need the latest wrapper and tokamak dll (1.2).
Also, I believe I remember you talking about this issue, but I wasn't sure what you had decided - Will you sell Lotus R2 or keep it free?
Yeah. Premade effects are what made particle candy as popular as it was (not that it wasn't already really nice).
Anyway, this is regarding the original lotus, but it probably can be applied to Lotus R2. Probably should have let you do it, but I was eager to see the results :P. I added in Convex mesh support for tokamak. Not too hard. I made the following changes to LotusTest.bb (for the rocks), TParticles\h_particle.bb, and TParticles\c_particle.bb:
1. Added Const cT_CONVEX=4 to header
2. Added Field ConvexBank% to Type LotusEmitter
3. Added the following to the select E\TokaMesh...case in Create_Particle:
Case cT_CONVEX If E\ConvexBank Then TOKRB_AddConvex P\RB,E\ConvexBank,BankSize(E\ConvexBank) Else TOKRB_AddBox P\RB,(P\SizeFrom\X+P\SizeTo\X)/2,(P\SizeFrom\Y+P\SizeTo\Y)/2,(P\SizeFrom\Z+P\SizeTo\Z)/2 TOKRB_SetBoxInertiaTensor(P\RB,(P\SizeFrom\X+P\SizeTo\X)/2,(P\SizeFrom\Y+P\SizeTo\Y)/2,(P\SizeFrom\Z+P\SizeTo\Z)/2,P\Weight)
4. Added a third parameter to SetEmitterTokamakMesh:
Function SetEmitterTokamakMesh(Index,MeshClass%,ConvexBank=0) gLotusEmitterList(Index)\TokaMesh = MeshClass gLotusEmitterList(Index)\ConvexBank = ConvexBank End Function
5. You probably know where this goes (LotusTest):
Convex = CreateBank(FileSize("media\rock.Bin")) filein = ReadFile("media\rock.Bin") For i=0 To FileSize("media\rock.Bin")-1 PokeByte Convex,i,ReadByte(filein) Next CloseFile filein ExpRockMesh = LoadMesh("media\rock.x") HideEntity ExpRockMesh gExpRocks = CreateEmitter() SetEmitterPosition gExpRocks,0,0,0 SetEmitterParticleMesh gExpRocks,ExpRockMesh SetEmitterUsesTokamak gExpRocks SetEmitterTokamakMesh gExpRocks,cT_Convex,Convex SetEmitterRandomRotation gExpRocks,0,359,359 SetEmitterWaitSpan gExpRocks,3 SetEmitterCulling gExpRocks,True SetEmitterFX gExpRocks,34 SetEmitterLifeSpan gExpRocks,1280 SetEmitterColorFrom gExpRocks,255,255,255,3 SetEmitterVelocity gExpRocks,0,.25,1 SetEmitterWeight gExpRocks,.1 SetEmitterRadius gExpRocks,2 ; SetEmitterTrail gExpRocks,gExpSmokeTrail SetEmitterDeflectorsAffect gExpRocks,1
6. I realized the rocks had to all have the same scale for the convex mesh to be scaled right :'/, so I changed line 236 (after step 5) to Size=2.
Cool, huh?
Oh yeah, and you'll need to put rock.x and rock.bin into media. (rock.x and rock.bin are in the samples directory of the tokamak wrapper v.6) You'll need the latest wrapper and tokamak dll (1.2).
Also, I believe I remember you talking about this issue, but I wasn't sure what you had decided - Will you sell Lotus R2 or keep it free?