Results 1 to 10 of 14

Thread: [GIMP Plug-in] Creating a starfield

Hybrid View

  1. #1
    Guild Journeyer Sagenlicht's Avatar
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    249

    Post [GIMP Plug-in] Creating a starfield

    *********************************
    Update 14.11.2008

    Release 1.1

    Changelog
    • Added an option to change the nebula opacity
    • If you had chosen not to add a nebula but set the param useCustomNebula to 'Yes' the script didnt execute. This has been fixed and the useCustomNebula param will now be ignored if you deselect the nebula.
    • Added an option for the star size.
    • Added an optional glitter effect to the stars


    Please note, that atm if you choose bigger stars, less stars will be generated and your starfield will look much smaller. I wouldnt advice to select something larger than 'normal'. The 'tiny' option is equivalent to the original 1.0 star generation version.

    Please let me know what you think about these changes
    *********************************


    Hmm as I need to do a 2nd starfield for my monthly challenge I decided to wrap it up into a script as I dont like doing something similar twice that could be scripted

    As I couldnt find a starfield script I did one by myself (yes I know maybe my google-fu aint highly skilled).

    A few words of explanation before you use this script.

    Before you start using the script, open your image or create a new one. The script itself wont modify any existing layers but will add its own ones.

    The script itself can do 3 things:

    - Just create a starfield. Use this if you just need a simple starfield.
    For this function please set both Nebula params to 'no' and ignore the Nebula Color.

    - Create a starfield with a 'random' Nebula. Use this if you want a starfield completly filled with a Nebula.
    For this function please set the 'Add a Nebula' param to 'Yes' and the 'Use a custom Nebula shape?' param to 'No'. Set the Nebula Color to whatever color you want, it is looking better with darker colors of its type, so if you wanna have a gray nebula just choose something like 50% gray or slightly darker or if you wanna have a green nebula chose a darker green.
    You wanna use this function if you wanna do an excerpt of your galaxy within a nebula. I dont think you will need this function often, but at least its there

    - Create a starfield with a random shaped Nebula within your selection.
    For this function you have to use the free selection tool before you start the plug-in. Select an area where you wanna have the nebula later on and start the script. Set both Nebula params to 'Yes' and and choose whatever color you like for the nebula. Again darker colors of its type are looking better.

    Have fun with the script!

    Attached is an example how you have to setup a Custom Nebula before you start the script and an example of the result. Please note that every starfield and nebula will look differently as I use random numbers to create them.

    You find the script in your Filters Menu at Sci-Fi/Add Starfield. If you do not see the script, please read here, what you have to do.

    If you tried to add a custom Nebula and you do not see one, you most likely forgot to add a selection before you started the script.

    Please post any comments or problems you have with the plug-in.

    P.S. If I did post this in the wrong section (I am not sure where I have to post plug ins tbh ) please move the threat

    P.P.S. I plan to do a planet script in the next few days as well, so stay tuned
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Free Selection example.png 
Views:	218 
Size:	43.7 KB 
ID:	7661   Click image for larger version. 

Name:	Example.png 
Views:	2886 
Size:	725.8 KB 
ID:	7771  
    Attached Files Attached Files
    Last edited by Sagenlicht; 11-14-2008 at 09:03 AM.
    My Map Challenge Entries

    I use GIMP for all my maps.

    GIMP scripts and plug-ins overview


    Everything I post on this site uses the Creative Common Attribution-Noncommercial-Share Alike license. Only exception to this are any pyhton scripts which use the GPL.

    If you are using any of my posted stuff just use your rep stick on me

    Should you be interested in using anything I posted on commercial purpose drop me a pm.

  2. #2

  3. #3
    Guild Adept
    Join Date
    Apr 2008
    Location
    Sacramento, CA, USA
    Posts
    274

    Post

    This is great. Would have made a great resource for my November challenge map. Have some Rep, feeble though my rep stick is. Definitely a five star thread.

  4. #4
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    2,963

    Post

    VERY Nice. A couple of suggestions if you feel like making any updates to it:


    • How possible is it to make the stars larger? I had my zoom set to 50% and generated several tries because I thought it did nothing.
    • Perhaps a control to control density and one for random size (between x and y size for example)
    • Option to NOT generate the starfield. This would be nice in case you wish to add multiple nebulas via selection and don't want to have to remove the extra starfields.
    • In addition to color for the nebula's a control to set the opacity of the nebula layer(color).

    In any event, GREAT work. Thanks for stepping up with some really cool plugin's for GIMP.
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  5. #5
    Guild Journeyer Sagenlicht's Avatar
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    249

    Post Thanks for the feeedback

    Thanks for the feedback

    @RobA
    Well RobA I'll do a script when I need it and I tend to organize my scripts within my themes not within the structure of GIMP cause I want to have my custom scripts not mixed up with the standard scripts. Every script I download is getting sorted into my structure as well. E.g. your great dungeon maker script is registered at Filters/RPG Filters for me Yes you may call that behaviour weird

    Maybe I should reconsider this and change the registration for the uploaded scripts.

    @nolgroth
    Thank you very much

    @JF
    - What size did your test image have? I will add an option to make the stars larger though
    - Not sure I do understand this point. What do you mean with random size? Do you mean the star size?
    - I did plan to do a stand alone Nebula script for that purpose. Maybe its smarter to have only one script. Your opinion?
    - I plan to do a version where you can control a few more options like the opacity of the nebula layer.

    Another thing I will add is the option to merge all layers, I simply forgot to add it, cause I tend to not merge anything. I often have more than 30 layers in a challenge file

    Anyways I will update the script in a few days, cause I have to do the planet script first as I need to get my challenge finished first
    Last edited by Sagenlicht; 11-11-2008 at 05:03 AM.
    My Map Challenge Entries

    I use GIMP for all my maps.

    GIMP scripts and plug-ins overview


    Everything I post on this site uses the Creative Common Attribution-Noncommercial-Share Alike license. Only exception to this are any pyhton scripts which use the GPL.

    If you are using any of my posted stuff just use your rep stick on me

    Should you be interested in using anything I posted on commercial purpose drop me a pm.

  6. #6
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    2,963

    Post

    Quote Originally Posted by Sagenlicht View Post
    Thanks for the feedback

    @RobA
    Well RobA I'll do a script when I need it and I tend to organize my scripts within my themes not within the structure of GIMP cause I want to have my custom scripts not mixed up with the standard scripts. Every script I download is getting sorted into my structure as well. E.g. your great dungeon maker script is registered at Filters/RPG Filters for me Yes you may call that behaviour weird

    Maybe I should reconsider this and change the registration for the uploaded scripts.

    @nolgroth
    Thank you very much

    @JF
    - What size did your test image have? I will add an option to make the stars larger though
    - Not sure I do understand this point. What do you mean with random size? Do you mean the star size?
    The image was 1600x1200, which is pretty much what my starting base is.

    Yes, the start size. Granted, this is "a lot" of extra work, but perhaps some option to have curve for start size. If the base star size is 2px, perhaps a second layer with 1/6th(or so) as many stars at 3px, and perhaps a third layer with perhaps 1/20th of the stars at 5px. Granted, the numbers may be bogus as hell and it may not work like I am thinking it might, but hope you should get the point. This is not so much a big deal (though it would be way nice) as being able to start with bit larger stars from the get go.


    Quote Originally Posted by Sagenlicht View Post
    - I did plan to do a stand alone Nebula script for that purpose. Maybe its smarter to have only one script. Your opinion?
    I would say one script. Since you have the power of Python(GUI-wise) and you are really working on such similar stuff, I would say it makes far more sense to keep everything together. Ultimately, you would have to create(or have an existing) a starfield to populate your nebula anyway, so it might as well be in the same script.
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  7. #7
    Administrator RobA's Avatar
    Join Date
    Apr 2007
    Location
    Niagara, Canada
    Posts
    5,567

    Default

    For gimp, the easy ways are figure out either python or scheme... for scheme there a re a number of pointers on the net.

    Search for "script-fu"

    I usually take one close and modify it.

    -Rob A>

  8. #8
    Guild Journeyer Sagenlicht's Avatar
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    249

    Post Thanks

    Thanks for all your replies

    @Karro
    no worries I usually have the problem that I cant rep RobA cause I did it recently I just rate the threat then But way more important than repping me, is that you find the script useful I will post an update soon, I just didnt have time the last two days.

    @bryguy
    Thanks bryguy About the plug-ins. To add some words to what RobA said:

    There 3 ways to do plug-ins/scripts for GIMP (or at least I know 3 ways).
    - Scheme
    - Python
    - C code and compiling it afterwards.

    If you know scheme its easy, as there are (as RobA said) alot of scripts in Scheme for GIMP so you can easily get into it.

    If you know python it aint as easy as with scheme as you do not find that many scripts in python for GIMP and the documentation is rather... useless. Open the procedure/routine browser in the help menu (whatever its called in the english version) in GIMP, there you can find all GIMP specific script functions.

    If you dont know scheme nor python I would suggest trying out python because if you ever wanna do some scripting outside GIMP chances that you can use python are much higher than for scheme. Atm scheme is better integrated in GIMP but I think this will change sooner or later. For GIMP 2.8. a better python support is allready planned.

    For the interested, here is roughly what is planned for GIMP 2.8, the next stable release:

    * Merging Google Summer of Code 2008 projects to trunk, namely on-canvas text editing, tagging of GIMP resources and Python scripting enhancements.
    * Continue integration of GEGL.
    * And of course many other improvements...
    Though if you know one script language it should be rather easy for you to learn another cause in the end they do all the same only the syntax is different. While I cant script in scheme cause I do not know its syntax I can read it pretty well. So ultimatly if I would wanna use scheme I would be able to learn it pretty fast.

    I did not mention the C code at all, cause if you arent a C coder this wont be the way you wanna go, trust me
    My Map Challenge Entries

    I use GIMP for all my maps.

    GIMP scripts and plug-ins overview


    Everything I post on this site uses the Creative Common Attribution-Noncommercial-Share Alike license. Only exception to this are any pyhton scripts which use the GPL.

    If you are using any of my posted stuff just use your rep stick on me

    Should you be interested in using anything I posted on commercial purpose drop me a pm.

  9. #9
    Guild Journeyer Sagenlicht's Avatar
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    249

    Post Script update

    Ok, I did find some time do some quick updates to the script

    About more than one nebula: atm my code cant handle it, and I dont think I will change the code

    So if you want to have more than one nebula do the following:

    • Generate your starfield with your first nebula.
    • Create a new transparent layer below the nebula color layer
    • use the free selection tool to select your cloud area
    • Fill it with the desired color
    • Discard the selection
    • Apply a gaussion blur with the value of about 50
    • Set the opactiy of the layer to a value you like, I suggest arround 35 for dark and 15 to 20 for bright colors


    This will take about 30 seconds to do
    My Map Challenge Entries

    I use GIMP for all my maps.

    GIMP scripts and plug-ins overview


    Everything I post on this site uses the Creative Common Attribution-Noncommercial-Share Alike license. Only exception to this are any pyhton scripts which use the GPL.

    If you are using any of my posted stuff just use your rep stick on me

    Should you be interested in using anything I posted on commercial purpose drop me a pm.

  10. #10
    Administrator RobA's Avatar
    Join Date
    Apr 2007
    Location
    Niagara, Canada
    Posts
    5,567

    Default

    @bryguy - one more thing...

    Scheme scripts are slower and less flexible with their GUI, as python scripts can use the whole python GUI library (WX I think?).

    Both scheme and python are cross platform, unlike C that needs to be compiled with different targets to get binaries.

    The scheme (script-fu/tiny-fu/tiny-scheme) interpreter exists internal to GIMP, so every user has it. Python can be a pig to install in windows, and 90% of windows gimp users don't bother, so won't use python scripts.

    Another thing I didn't mention before is the mathmap plugin. http://www.complang.tuwien.ac.at/schani/mathmap/

    It can be quite powerful and easy for simple, single layer image manipulation. Though with its animation support it can do some pretty neat things, too, like this explosion example.

    -Rob A>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •