Lasers!

recreating weapons
Post Reply
MattyWS
Posts: 146
Joined: Sat Jan 23, 2010 12:46 pm

Lasers!

Post by MattyWS » Tue Apr 20, 2010 7:19 pm

Change them, basically. I suggest the spring way, using sprites (images) to make the lasers look cooler, they also don't look like lasers in TA3D at the moment, they look dull. They need to be lighter rather than coloured stretched blobs. I made an example of what I mean with two of my own home made lasers in photoshop. Is there a way to make this happen?
Attachments
lasers.jpg

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: Lasers!

Post by zuzuf » Tue Apr 20, 2010 8:22 pm

It could be done using a texture with alpha channel which can be repeated indefinitely, eventually I can add a head and tail to the laser (let's say top/bottom of the texture or left/right). Since it has yet to be implemented, I let you chose what you think is more convenient.
=>;-D Penguin Powered

MattyWS
Posts: 146
Joined: Sat Jan 23, 2010 12:46 pm

Re: Lasers!

Post by MattyWS » Tue Apr 20, 2010 10:35 pm

Indeed texture with an alpha channel would work perfectly

Left and right would be convenient, by adding head and tail you mean another small image attached to each end correct? Easily enough done, and repeating the middle image would be great, this way you can choose how long it is by choosing how many times the image repeats, right?

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: Lasers!

Post by zuzuf » Tue Apr 20, 2010 10:49 pm

exactly :)
=>;-D Penguin Powered

MattyWS
Posts: 146
Joined: Sat Jan 23, 2010 12:46 pm

Re: Lasers!

Post by MattyWS » Tue Apr 20, 2010 10:59 pm

I attached some quick images below for you to play with
Attachments
laser2normal.png
To make alpha map, I believe all you need to do is take the image and make desaturate it (make it black and white)
laser2normal.png (3.24 KiB) Viewed 171512 times
laser1normal.png
Same as above with repeating pattern
laser1normal.png (2.84 KiB) Viewed 171512 times

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Re: Lasers!

Post by Balthazar » Wed Apr 21, 2010 4:07 pm

I like where it is going :P

MattyWS
Posts: 146
Joined: Sat Jan 23, 2010 12:46 pm

Re: Lasers!

Post by MattyWS » Thu Apr 22, 2010 9:02 pm

How goes the progress? Want me to make some quick head and tail for it along with an alpha map image?

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: Lasers!

Post by zuzuf » Fri Apr 23, 2010 6:47 am

I've implemented it (without head/tail textures yet). This is how it looks:
Image

Textures can be replaced for each laser weapon. I am wondering if it would be better to have the texture including the head and tail directly and when the laser hits something the head is just not drawn (texture is just cut to current laser length), this would give you full control over the laser texture from your image editor. What do you think ?
=>;-D Penguin Powered

MattyWS
Posts: 146
Joined: Sat Jan 23, 2010 12:46 pm

Re: Lasers!

Post by MattyWS » Fri Apr 23, 2010 9:13 am

Looks brilliant! apart from the laser has a shadow. :P

How is the way you suggested different from the original plan? Unless you mean to make the head and tail all in one image?

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: Lasers!

Post by zuzuf » Fri Apr 23, 2010 12:24 pm

That's it all in one image.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Re: Lasers!

Post by Balthazar » Fri Apr 23, 2010 12:44 pm

And how about animated effects? Like the sequence of images? Like the electric beams?

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: Lasers!

Post by zuzuf » Fri Apr 23, 2010 1:52 pm

The electric beams are not a texture effect.
The ultimate freedom would be achieved through scripting ...
=>;-D Penguin Powered

DOT
Posts: 151
Joined: Sat Sep 19, 2009 11:56 am

Re: Lasers!

Post by DOT » Fri Apr 23, 2010 2:57 pm

The Texture looks nice i like the Electrical one because they use Energy

thought the Lasers produces a Shadow which looks ugly the should make lights or faked lights instead of shadows since
else it would look like a colored nanoified missile

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: Lasers!

Post by zuzuf » Fri Apr 23, 2010 2:58 pm

I removed those shadows :P
=>;-D Penguin Powered

MattyWS
Posts: 146
Joined: Sat Jan 23, 2010 12:46 pm

Re: Lasers!

Post by MattyWS » Sat Apr 24, 2010 11:12 am

Ah, in such a case then I made this image too, laser with head and tail. If you want to make it shorter you only need to cut part of the middle out. :)
Attachments
laser3normal.png
laser3normal.png (3.18 KiB) Viewed 171484 times

MattyWS
Posts: 146
Joined: Sat Jan 23, 2010 12:46 pm

Re: Lasers!

Post by MattyWS » Sun Apr 25, 2010 4:59 pm

Another thing you have yet to consider it flares from the guns, they can be sprite based too now. No need for any special effects, just make sure they look bright.

MattyWS
Posts: 146
Joined: Sat Jan 23, 2010 12:46 pm

Re: Lasers!

Post by MattyWS » Thu Apr 29, 2010 2:58 pm

How are things coming along?

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: Lasers!

Post by zuzuf » Thu Apr 29, 2010 3:06 pm

Slowly as I am working on a raytracer for university and have exams next week :P
=>;-D Penguin Powered

D.Durand
Posts: 87
Joined: Sun Feb 07, 2010 11:21 am

Re: Lasers!

Post by D.Durand » Mon Sep 20, 2010 12:28 pm

Interresting, but on what model you put that texture ? A plane ? A boxe ? A cross ?

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: Lasers!

Post by zuzuf » Mon Sep 20, 2010 3:35 pm

Laser textures are billboards aligned with the laser trajectory so geometrically they are quads looking towards the camera.
=>;-D Penguin Powered

slogic
Posts: 75
Joined: Wed Mar 26, 2008 5:23 pm
Location: RF, Bryansk
Contact:

Re: Lasers!

Post by slogic » Tue Sep 21, 2010 10:35 am

zuzuf wrote:I removed those shadows :P
Why? Make it optional.

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Re: Lasers!

Post by Balthazar » Tue Sep 21, 2010 11:07 am

slogic wrote:
zuzuf wrote:I removed those shadows :P
Why? Make it optional.
Because lasers are the sources of light. They should make things around look brighter, but not to cast shadows )

slogic
Posts: 75
Joined: Wed Mar 26, 2008 5:23 pm
Location: RF, Bryansk
Contact:

Re: Lasers!

Post by slogic » Tue Sep 21, 2010 12:23 pm

Well, i don't see dynamic lightning. So environment depth is not sensible. Leave shadows until dynamic light is implemented :)

D.Durand
Posts: 87
Joined: Sun Feb 07, 2010 11:21 am

Re: Lasers!

Post by D.Durand » Fri Sep 24, 2010 11:11 am

zuzuf wrote:Laser textures are billboards aligned with the laser trajectory so geometrically they are quads looking towards the camera.
I fear i don't understand. The game put it on a plane itself put at 90° to the camera ? Same for the start and end flares ?

How do i do for make use of that ?

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: Lasers!

Post by zuzuf » Sun Oct 03, 2010 9:41 pm

D.Durand wrote:The game put it on a plane itself put at 90° to the camera ?
That's right.
D.Durand wrote:Same for the start and end flares ?
No, currently flares are implemented as parts of the 3D model which are hidden/shown using scripting as in OTA.
D.Durand wrote:How do i do for make use of that ?
Lasers are textures which can be specified in the weapon's TDF files using the following variables:

Code: Select all

lasertexture1 = my_laser_texture1.png;
lasertexture2 = my_laser_texture2.tga;
When 2 textures are specified they're blended together with a varying alpha oscillating between full texture1 and full texture2
=>;-D Penguin Powered

D.Durand
Posts: 87
Joined: Sun Feb 07, 2010 11:21 am

Re: Lasers!

Post by D.Durand » Fri Oct 15, 2010 4:16 pm

Bon, alors j'ai essayé. Le problème est que l'image proposée par Matman fonctionne très bien (on voit un laser bleu), mais dès que je change les couleurs du laser dans photoshop, TA3D m'affiche simplement un trait noir.

À quoi cela peut-il être du ?
Attachments
armes.zip
(10.08 KiB) Downloaded 3613 times

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: Lasers!

Post by zuzuf » Sun Oct 17, 2010 12:23 pm

Cela est probablement du à l'absence de canal alpha pour indiquer les régions transparentes. Le problème c'est que pour économiser de la mémoire vidéo, une texture n'a de canal alpha que si le fichier chargé en a un et pour les effets qui nécessitent de la transparence il faut que le canal alpha soit présent. Au niveau du format d'image, le PNG supporte ça sans problème :)
=>;-D Penguin Powered

D.Durand
Posts: 87
Joined: Sun Feb 07, 2010 11:21 am

Re: Lasers!

Post by D.Durand » Mon Oct 18, 2010 12:57 am

Well, now, even the image downloaded from here are black.

I joins an image done in the Gimp (Photoshop is pretty bad with PNG transparency) : When TA3D use it (it's the ARM LLT shooting), the shoot is black. Transparency is transparent, but all the color of the laser is black.
Attachments
arme.zip
(854 Bytes) Downloaded 3595 times

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: Lasers!

Post by zuzuf » Mon Oct 18, 2010 3:49 pm

Did you enable the "'developer mode" option in the advanced option tab ? It disables caches which may interact badly with updated content.
=>;-D Penguin Powered

D.Durand
Posts: 87
Joined: Sun Feb 07, 2010 11:21 am

Re: Lasers!

Post by D.Durand » Mon Oct 18, 2010 6:39 pm

Yes. But my TA3D never make cache (or delete it after the game, i don't know). You had done that some month agos.

Flashbang232
Posts: 155
Joined: Tue Aug 03, 2010 6:59 pm
Location: Behind LOIC

Re: Lasers!

Post by Flashbang232 » Mon Mar 28, 2011 4:54 am

blur the ends a bit. they kinda look square.
i would probably go as far as to say they look like blue illuminated rectangles.

nah, probably not, but the shadow looks a bit unrealistic, considering that they are not blocking light, they are radiating light....
When you cannot trust your government to lead the nation to better times is when you know the ship is sinking

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest