Game Development Community

T3D 1.1 Beta 2 - Particle/Emitters Fail on Start - RESOLVED

by Steve Acaster · in Torque 3D Professional · 08/05/2010 (7:23 pm) · 10 replies

t3d 1.1beta 2

Windows7 32bit

Target:
Particle and Emitters

Issue:
In the changelog it says that the previous problems with lifetime in some emitters have been fixed -- but now they don't work at all!

As soon as you load a mission, the console prints this:
ParticleData((null)) bad value(s) for animTexTiling [0 or 141994340 <= 0], invalid datablock
263: Register object failed for object RocketSplashRingParticle of class ParticleData.
ParticleEmitterData(RocketSplashRingEmitter) unable to find particle datablock: RocketSplashRingParticle
ParticleEmitterData(RocketSplashRingEmitter) unable to find any particle datablocks
280: Register object failed for object RocketSplashRingEmitter of class ParticleEmitterData.
ParticleData((null)) bad value(s) for animTexTiling [0 or 141997392 <= 0], invalid datablock
262: Register object failed for object PlayerWakeParticle of class ParticleData.
ParticleEmitterData(PlayerWakeEmitter) unable to find particle datablock: PlayerWakeParticle
ParticleEmitterData(PlayerWakeEmitter) unable to find any particle datablocks
284: Register object failed for object PlayerWakeEmitter of class ParticleEmitterData.

Needless to say SplashRing/Wake emitters/particles do not appear in-game.

Repeat:
Load up and see the console error! Both in FPS Example and Full Project. Shoot water to see no splashring, jump in water to see no PlayerWake.

Suggest:
Fix it, so these particles work (they both use the same image file).

#1
08/05/2010 (7:38 pm)
Dang Steve! You're always one step ahead on these bug reports.

Same issue I just noticed. Has the usage/control of "animTexTiling" changed in some way?

Feeling lazy, so didn't look ;)
#2
08/05/2010 (9:46 pm)
Would Slap Silent Mike with a wet kipper if he could be bothered :P

Particle.ed.cs has significantly changed. And animated textures didn't come with it.

Suggest bad work around of comment out lines
// ...
//   animateTexture = true;
//   framesPerSec = 1;
//   animTexTiling = "2 1";
//   animTexFrames = "0 1";
// ...
//   animTexName = "art/shapes/particles/wake";
// ...
From RocketSplashRingParticle and PlayerWakeParticle. It will leave you with a "double" splashring though, but at least it keeps the console tidy! :)
#3
08/07/2010 (10:24 am)
Just to avoid being slapped around with a fish I had to find the cause of this ;)

When the field properties for particles were documented, r30105, animTexTiling got removed -- possible oversight?, confusion over what it does?, or indication that this feature is to be deprecated/altered in the future? -- but since it is needed now... Just go into particle.cpp and find the initPersistFields() section. Add the following line (grouped with the other animatedTex fields would be a logical place):
addField("animTexTiling", TypePoint2I, Offset(animTexTiling, ParticleData), "Description goes here");
Rebuild, load game, and jump into or shoot the water to see the nifty animated aligned particle splashrings again :)

That doesn't add animated particle usage to the P.ED but does allow you to use that particular datablock field (and inside the Datablock ED) as normal once again. It also gets rid of that annoying console spam!

EDIT:If you find that looking out of place, you can write it this way, although I have no clue why all those fields were changed from TypeXXXX to the TYPEID<XXXX> usage - either way works.
addField("animTexTiling",        TYPEID< Point2I >(),  Offset(animTexTiling,      ParticleData), "Description goes here");
I think I even got the spacing right on that :D
#4
08/07/2010 (12:30 pm)
I vaguely remember particles will/can have materials assigned to them - and as thus, that would probably supercede particle animationTexture.

Anyone know if particle materials are in yet? as long as I'm not hallucinating it ... :P
#5
08/07/2010 (1:37 pm)
As far as I can tell, there is no apparent reason for the removal of the animTexTiling field. It appears to have occurred accidentally when the addField() macros were edited for documentation purposes.

I think restoring the animTexTiling field as Michael Hall describes is the ideal fix since it still serves a purpose.

BTW, animTexTiling is used when one wants to create an animated particle by breaking up the particle texture into sub-tiles that are shown one at a time. animTexTiling specifies two values that are the dimensions of the tiles. For example, you can do a 16 frame particle animation by dividing the texture into a 4x4 grid of tiles. In that case animTexTiling would be set to "4 4". The ripple particle texture used in PlayerWakeParticle contains two tiles arranged horizontally, so it sets animTexTiling to "2 1". animTexTiling is ignored unless animateTexture=true.

#6
08/07/2010 (4:12 pm)
iirc, particle materials were planned for 1.1 but who knows..

- Thanks for informing us about the easy snippet on the animTexTiling field.
#7
08/07/2010 (8:12 pm)
Logged for QA team (TQA-752)
#8
08/08/2010 (1:06 pm)
Oh, and good fix, Mike!
#9
08/09/2010 (10:46 pm)
Bug confirmed.
#10
08/31/2010 (9:37 pm)
Fixed in 1.1 Beta 3.