• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Drawing particles to surface issues

abeldev

Member
I have a basic lighting system and basic fog particle system that is placed over the lighting system. The fog can get pretty thick and hence disrupts visibility so I wanted to draw the fog particles to a surface so I could cut out holes in the fog similar to the lighting system. However when I attempt to draw the fog to a surface using part_system_drawit() and setting part_system_automatic_draw() to 0, the fog turns black and the alpha is incredibly low to the point where you can't even see it.


Particle system without being drawn to surface and part_system_automatic_draw set to 1:

https://imgur.com/Pjy25J1


Particle system when I attempt to draw it to a surface and automatic_draw set to 0:
(The fog is actually present just really low opacity and has turned black for some reason)
https://imgur.com/3U4R0If


Draw event of fog particles:

if (!surface_exists(global.fog_surface)) {
global.fog_surface = surface_create(room_width, room_height);
}

surface_set_target(global.fog_surface);

part_system_drawit(global.part_fog_system);
//Fog light is just an object that surrounds the player and is meant to subtract from particle surface so players can see through fog
gpu_set_blendmode(bm_subtract);
with(obj_fogLight) {
draw_self();
}
gpu_set_blendmode(bm_normal);


// reset target and draw the surface
surface_reset_target();

draw_surface_ext(global.fog_surface,0,0,1,1,0,0,1);

Any idea why drawing the particle system to a surface is changing it so much? How do I go about replicated how the particles look normally, on a surface?
 

abeldev

Member
Hmmm none of these solutions seem to work for me. I think it might be because the particles fade from 0 to 1, and back down to 0 again?
 
Top