Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, degenerate_762), 1,309 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Incorrect particle perspective with BEAM #177953
01/15/08 02:33
01/15/08 02:33
Joined: Dec 2006
Posts: 78
Nevada, USA
Futurulus Offline OP
Junior Member
Futurulus  Offline OP
Junior Member

Joined: Dec 2006
Posts: 78
Nevada, USA
I recently put a laser effect in my project, and for the most part, the BEAM effect looks just like I imagined. However, I noticed that when I switched to a flying camera mode, the beam would occasionally grow very large and disappear when the camera was at certain angles.

After stripping the problem down to just the particles, I now know that when the source position of the beam (particle.x) leaves the screen, the size of the particles and the apparent beam target position (particle.x + particle.vel_x) begins to change subtly.

As the camera turns away from the source, the target position approaches the camera rapidly until the source position is 90 degrees to the side of the camera, at which point the beam vanishes. I believe this is based on the assumption that if the source is behind the camera, the particle is no longer visible, which is true for regular particles but not for BEAM or STREAK particles.

Screenshots don't really illustrate the problem, so here's the stripped-down Code:
#include <acknex.h>
#include <default.c>

STRING* Level = "at_world.wmb";
// at_world is just a hollow cube about 100 quants wide

BMAP* BeamBmap = "EG\\laserparta.png";
// any small image with an alpha channel will work
var BeamPart(PARTICLE* p)
{
p.bmap = BeamBmap;
p.size = 2;
p.flags = BEAM | BRIGHT;
p.lifespan = 0.001;
p.event = NULL;
}

var main()
{
video_mode = 7;
video_screen = 1;

level_load(Level);

vec_set(camera.x, vector(-10, 0, 10));
vec_set(camera.pan, vector(0, -45, 0));

while(1)
{
effect(BeamPart, 1, vector(0, -40, 0), vector(0, 80, 0));
wait(1);
}
}

This may also cause a problem in which the beam splits into discrete particles when the camera is directly behind it.

(I also think bmap_to_alpha isn't working correctly, but I don't have enough evidence that this isn't my fault to confidently post that as a bug.)

My version is 7.07.5 Commercial.

Incorrect particle perspective with BEAM [Re: Futurulus] #177954
01/18/08 03:26
01/18/08 03:26
Joined: Dec 2006
Posts: 78
Nevada, USA
Futurulus Offline OP
Junior Member
Futurulus  Offline OP
Junior Member

Joined: Dec 2006
Posts: 78
Nevada, USA
jcl? Anyone?

I took a screenshot of what I think is a related problem, where a particle beam separates into its component particles when the target position is 90 degrees off the view:

Here's a link to download the picture, because it takes a lot of luck to get Picasa Web pictures to show up on external sites:
http://lh5.google.com/Futurulus/R5AaJ5c9mYI/AAAAAAAAAE8/VuouE0XOOLQ/shot_1.jpg

Re: Incorrect particle perspective with BEAM [Re: Futurulus] #177955
01/19/08 21:30
01/19/08 21:30
Joined: Dec 2006
Posts: 78
Nevada, USA
Futurulus Offline OP
Junior Member
Futurulus  Offline OP
Junior Member

Joined: Dec 2006
Posts: 78
Nevada, USA
grumblegrumble[censored]Google...

Here's a link that I hope actually works: http://picasaweb.google.com/Futurulus/Gamestudio

Re: Incorrect particle perspective with BEAM [Re: Futurulus] #177956
01/21/08 07:26
01/21/08 07:26
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The BEAM flag creates many particles in a line. This can be visible if the line is very long and you are looking from the side onto it. You can avoid this by using STREAK, not BEAM.

Re: Incorrect particle perspective with BEAM [Re: jcl] #177957
01/21/08 18:33
01/21/08 18:33
Joined: Dec 2006
Posts: 78
Nevada, USA
Futurulus Offline OP
Junior Member
Futurulus  Offline OP
Junior Member

Joined: Dec 2006
Posts: 78
Nevada, USA
It still happens with STREAK, though. When I use STREAK, the end stays the right size, but the source appears to approach the camera. Also, with STREAK, the streak gets this weird "twisted" effect (added to above album) when the target is behind the camera. Maybe the best workaround would be to split the beam up into several small pieces.

Re: Incorrect particle perspective with BEAM [Re: Futurulus] #177958
01/22/08 08:25
01/22/08 08:25
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The twisted effect is caused by magnetic plasma distortions of the oxygen molecules ionized by the laser ray. This is not a bug, but in fact required lots of programming hours for achieving this spectacular effect.



Re: Incorrect particle perspective with BEAM [Re: jcl] #177959
01/26/08 00:21
01/26/08 00:21
Joined: Dec 2006
Posts: 78
Nevada, USA
Futurulus Offline OP
Junior Member
Futurulus  Offline OP
Junior Member

Joined: Dec 2006
Posts: 78
Nevada, USA


Point taken. I'll see if I can make a model or something...


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1