SA:MP 0.3.8 neon tubes object generator
#1

Hi,

some hours ago I raised a question how to add a different color to the neon tubes which were created by Matite. mooman gave me a good hint how to do this. You can read it up here: https://sampforum.blast.hk/showthread.php?tid=646050

I decided to create a tool so that everyone can create their own neon tubes.

You can simply call the following URL: https://neon-tubes.samp-models.net/?color=XYZ

Replace 'XYZ' with the color you want. You can pick one from g00gles color picker by typing 'color picker' in g00gle.

Example usage:
https://neon-tubes.samp-models.net/?color=ff0000
https://neon-tubes.samp-models.net/?color=d1f442

Example of a generated neon tube: https://www.fast-images.de/uploads/c...5eb460e94d.jpg

Source Code: https://github.com/mschnitzer/neon-tubes

It will offer you a dff file to download. Place it in your models/ directory in order to use it.

Since the object has no collision attached to it, you should use one of the existing neon tubes. I always used ID 18648 as base id of the object.

The object is also not using any txd file. Since you cannot leave the txd field empty in your artconfig.txt, you can download the attached txd file 'empty.txd'. It's just - as the name says - an empty txd file that you can use. You can also use any other txd file.

An example configuration for your artconfig.txt:
Code:
AddSimpleModel(-1,18648, -2000, "neon_tube_0000ff.dff", "empty.txd");
Reply
#2

Good job sir, this rocks.

May you share the source code also? Just in case of the website stops working someday.
Reply
#3

Great work. I love how creative this is.
Reply
#4

Quote:
Originally Posted by RIDE2DAY
View Post
Good job sir, this rocks.

May you share the source code also? Just in case of the website stops working someday.
Yea sure, here ya go: https://github.com/mschnitzer/neon-tubes
Reply
#5

Great idea, thanks for sharing.

Is the tool capable of doing the same for other models too?

Would be awesome to make differently looking neon tubes, like letters/circles/numbers/whatever, and then pick the color depending on your needs, or other existing SAMP Models like the Bollard Lights or Point Lights.
Reply
#6

It should work with other light-emitting objects as well. I'd just need to extend the tool.
Reply
#7

I have done a similar thing, but with the point lights and other coronas... like the moon:

Reply
#8

Regarding this, I have a question. The object 19127 (BollardLight7) has some special effect and changes the light of textures under the object. Would it be possible to edit this object, so it doesn't emit any light, but still keeps changing the light of textures under it? And also, BollardLight7 triggers the light effect only during night time, would it be possible to keep the effect during day time as well? Thanks in advance for reply.
Reply
#9

Very nice. I noticed it doesn't work if I use capital characters in the color hex. E.G 00(FFFF) <<<
Reply
#10

good job, but I wonder that it will be scriptable...
Reply
#11

@niCe I guess it's possible but not with my script. I think you've to use Blender for it but I'm not really familiar with Blender.

@Kar It's now working.

@OKStyle What do you mean?
Reply
#12

Quote:
Originally Posted by niCe
View Post
Regarding this, I have a question. The object 19127 (BollardLight7) has some special effect and changes the light of textures under the object. Would it be possible to edit this object, so it doesn't emit any light, but still keeps changing the light of textures under it? And also, BollardLight7 triggers the light effect only during night time, would it be possible to keep the effect during day time as well? Thanks in advance for reply.
It is possible, you simply need to export it without the light, just the geometry.
Reply
#13

With the tool, I created 255 new neon tube objects for every available vehicle color: https://samp-models.net/projects/60/...-vehicle-color
Reply
#14

Quote:
Originally Posted by mschnitzer
View Post
With the tool, I created 255 new neon tube objects for every available vehicle color: https://samp-models.net/projects/60/...-vehicle-color
Thanks. May be generate 16777215 objects from 000000 to FFFFFF?

I mean would be cool use SetObjects2DFXColor in next SA-MP versions
Reply
#15

Quote:
Originally Posted by OKStyle
View Post
Thanks. May be generate 16777215 objects from 000000 to FFFFFF?
Well, I don't think that someone has an appropriate use case for doing so
Reply
#16

I do, actually. I would like to expose a command to the players that creates a light of any color they wish. Well, I suppose I will need to limit the color space in a significant way.
Reply
#17

Then you'd need to let the user download 16777215 (haven't verified it) objects which would roughly make 96 GB of dff files (assuming that one dff file has 6KB) to download.

Sounds like a bad idea haha

I'd very appreciate if you would clone and run the script locally instead of requesting 96 GB of file data from my server haha
Reply
#18

Well obviously, loading 2^24 (or 256^3) objects is impossible and unnecessary, as there are only 2000 objects at most (for now) and even with streamers, nobody would request such a large amount of models. What if the server was allowed to generate the models and send them to the client in an on-demand fashion?

My original thought was, as I mentioned, was to limit the color space. If each color component was represented by 4 bits and not 8 bits, the number would drop to 4096, which is a reasonable number for a lot of small files. That will probably the way I'll go with, since I need the model IDs to be consistent.

Another thought - the most important object is the neon tube but without lights, so we can attach them manually in any color or combination.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)