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?
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)
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?