Author Topic: C11122006 - Particles & Waypoints  (Read 4671 times)

0 Members and 1 Guest are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
C11122006 - Particles & Waypoints
Adds two things:

Waypoints support for scripting (Partial)
Not really tested, just something that I threw in pretty quickly.

Particle system modification
Why I'm releasing this build - I've rewritten a chunk of the particle system so that it uses the same method for all particle types, eg including smoke & fire. There probably won't be any significant performance hit, but any changes (good are bad) need to be noted. Not sure whether this is what people have been talking about when they've been talking about re-doing the particle system, but this will enable me to build a proper BSG FTL effect.

Link removed in case this was causing pilotfile corruption. See my last post in this thread.

EDIT: This build also adds support for displaying Lua parser errors, I don't think that was in the last build(s). It's also based on the most recent CVS, which includes a lot of the fixes from the 3.6.9 branch, which weren't in the last build.
« Last Edit: December 07, 2006, 07:34:20 pm by WMCoolmon »
-C

 

Offline Axem

  • 211
Re: C11122006 - Particles & Waypoints
Normally your builds won't work unless I use a debug build, but it seems that even that won't work now. I get a CTD when trying to get into the tech room. But since it is a debug build, the debug spew gave me some fun info for you. ;)

Code: [Select]
Glow point bank 3 texture num is 1116958 for 'fighter01.pof'
Glow point bank texture not found for 'fighter01.pof', setting as the normal one num
Found bitmap red_glow_small -- number 705
Glow point bank 4 texture num is 1102705 for 'fighter01.pof'
Glow point bank texture not found for 'fighter01.pof', setting as the normal one num
Bad chunk type 573693272, len=573959152 in model_octant_find_faces_sub
Int3(): From c:\documents and settings\administrator\my documents\my source code\fs2_open\code\model\modeloctant.cpp at line 401

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: C11122006 - Particles & Waypoints
something screwy with your fighter01.pof (Ulysses)
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Axem

  • 211
Re: C11122006 - Particles & Waypoints
Then talk to :V: about that. :p I got that crash even if I had zero mods in my data folders.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: C11122006 - Particles & Waypoints
no, it's loading a modified fighter01.pof, if you would notice it is loading glowpoint textures for it, which the stock one didn't have.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: C11122006 - Particles & Waypoints
which chunk of the particle system did you re-write? how is it diferent?
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
Re: C11122006 - Particles & Waypoints
Code: [Select]
struct particle_batcher {
private:
int bmap_id;
int bmap_nframes;
geometry_batcher *bmap_batchers;

For each particle animation. Whenever a new particle is created, the vector of particle_batchers is checked for an entry corresponding to the new particle's animation. It automatically grabs the first frame of the animation using bm_get_info(), so there are no duplicate entries (hopefully). If it can't find a set of geometry batchers for the new particle's animation, it pushes another particle_batcher entry onto the Batchers vector. The index into the Batchers[] vector is then saved in the particle struct, and is used to batch render the frames in particle_render_all().

The result is that the particle system gets a lot cleaner and has a lot less duplicate code, and more fine control is possible than while using the ordinary batch_render system. My guess is that it may be slightly faster, but probably not noticeable, because it doesn't have to look for a geometry_batcher each frame; it already has the index right there in the particle struct, so it just has to do a subtraction operation to figure out where in the array to put it.

Also, I think this build may have some kind of compilation errors. I noticed some bizarre model, ship select, and trail issues, did a rebuild of the solution, and they disappeared.
-C

 

Offline WMCoolmon

  • Purveyor of space crack
  • Moderator
  • 213
-C