Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sat Nov 18, 2017 11:07 pm

All times are UTC




Post new topic  Reply to topic  [ 116 posts ]  Go to page Previous 1 2 3 4 5 6 Next
Author Message
PostPosted: Wed Sep 15, 2010 5:44 am 
Offline
Director
Director
User avatar

Joined: Sat Jan 03, 2009 6:17 pm
Posts: 597
Location: Chicago
I'd like to see the action you use in PS. I also use one but I get some blue pixels around the edges that I just can't get rid of. I also think it would be better if you used the same model in each scene. I'm not able to see the differences from one to the other since you used different models in each scene but from what you shown, the top 2 look the same.

_________________
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
: : = FYRA v250 = : : = AU NSW 86 Class Electric Locomotive = : : = AU QR EDI Bombadier IMU/SMU Trainset = : : = B-Class & VicPass = : : = MSTS Scotsman = : : = US Semi Trucks Pack = : :
: : = Steel Bridge = : : = Tube Bridge = : : = 2 New Earth Slopes = : : = Default Bridges w/ New Slopes added = : : = Camera Angles for Shape Viewer = : : = EU Semi Trucks Pack = : : = US Tank Cars 56' = : :
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Top
   
PostPosted: Thu Sep 16, 2010 1:47 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Sat Oct 03, 2009 9:30 am
Posts: 350
I've modified the previous reply. All the previews come from the same model. Comments are still wanted and it's absolutely OK if you think all these 3 are not good enough.

Tattoo: here is my PS action, but there are some precautions:
1. Set "Image Interpolation" to be "Bicubic Sharper" in "Preferences"->"General"
2. You will be unable to copy and paste anything while the action is running as the clipboard will be "hijacked".
3. There are many actions in my file. Just have a look at "Action for Railway Cars" if you want to learn the algorithm, but it is OK if you have interest to investigate the others of course. Most of them do the same things except the scale, but some of them have not been modified for ages so I'm not sure whether they can run properly with newer versions of PS.
4. What the last 3 steps do are to apply the palette. I'm not sure whether it can run properly when the palette files are absent. Only choose to run one of these 3 steps: The 1st one applies a normal vehicle palette, while the 2nd and the 3rd one apply the palette with company colors and primary company colors only respectively. Just delete them and record this step again if they throw out errors.


Attachments:
Automation for Loco(01062010).zip [7.53 KiB]
Downloaded 175 times

_________________
Visit Nanyue Express for my railway car drawings
Top
   
PostPosted: Sat Sep 18, 2010 2:21 am 
Offline
Director
Director
User avatar

Joined: Sat Jan 03, 2009 6:17 pm
Posts: 597
Location: Chicago
Thanks K.Y. for sharing those. Yours is way more involved than the one I setup. It's interesting how you got it to work as good as you did. Altho, I don't like that it deforms the roof edge some. It took me a minute to figure out how large you render your sprites to get the correct size to have a 110x110 sprite but I got it. I didn't look at the others yet tho. Thanks again...

EDIT: I just ran thru the steps in your action and it's actually not much different than the one I made except you use 'Free Transform' to scale the image down. The only part I'm wondering about is the size you render to. In the one step, it selects pixels at 1079 x 1919. So I'm guessing that you render your sprites at something like 1100 x 2000. That's pretty darn high. I only render to 330 x 330. Your way does work better than mine tho and thanks again for sharing them. After I found the correct size you rendered to, the roof edge isn't deformed.

I rendered a couple sprites at 1000 x 1000 cuz my camera is setup square and your action works great. It deformed the roof edge before, I guess because I had the wrong render size before. Thansk again. This actually works better than fusion. Fusion gives a dark edge around the model that I can't get rid of. I'll be using this more now..

_________________
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
: : = FYRA v250 = : : = AU NSW 86 Class Electric Locomotive = : : = AU QR EDI Bombadier IMU/SMU Trainset = : : = B-Class & VicPass = : : = MSTS Scotsman = : : = US Semi Trucks Pack = : :
: : = Steel Bridge = : : = Tube Bridge = : : = 2 New Earth Slopes = : : = Default Bridges w/ New Slopes added = : : = Camera Angles for Shape Viewer = : : = EU Semi Trucks Pack = : : = US Tank Cars 56' = : :
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Top
   
PostPosted: Fri Nov 26, 2010 5:57 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Sat Feb 28, 2009 4:27 pm
Posts: 144
Skype: cards525
Location: Chicago, Illinois, United States
Allite... So I got this 3d model to create a couple things...
What program should I use to make industries?
Ships?
Cars?

_________________
Finished Projects:
Raven Valley Autoworks Scenario
Lincoln Park Coal
Projects in Alpha:
Uphradies Pass
Image


Top
   
PostPosted: Fri Nov 26, 2010 9:17 am 
Offline
Chief Executive
Chief Executive

Joined: Sun Nov 20, 2005 12:10 pm
Posts: 675
Location: Australia; Melbourne
What ever program you feel best at... because mind you, you also got to create the images required.

_________________
Image


Top
   
PostPosted: Fri Nov 26, 2010 9:49 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Sat Feb 28, 2009 4:27 pm
Posts: 144
Skype: cards525
Location: Chicago, Illinois, United States
BlenderUser wrote:
What ever program you feel best at... because mind you, you also got to create the images required.


I meant I have the 3d models and that stuff... Just what program converts them into Usable DATS?

_________________
Finished Projects:
Raven Valley Autoworks Scenario
Lincoln Park Coal
Projects in Alpha:
Uphradies Pass
Image


Top
   
PostPosted: Fri Nov 26, 2010 11:32 pm 
Offline
Chief Executive
Chief Executive

Joined: Sun Nov 20, 2005 12:10 pm
Posts: 675
Location: Australia; Melbourne
well depending on what you used to create the models... Locomotion uses dats; that are formed by coding, and sprites/images.

Now somewhere around here (If I can find the like ill post); theres a list of the angels that the images need to be in, and how many.

Also, the coding, will be a bit tricky if you plan on doing it yourself (But as time goes on you may be faster).
The Tool is called.. LocoTool... (May have to do a little searching); but you just need to move the images files and the coding file into locotool and a .dat should be created (I think; its been ages)

_________________
Image


Top
   
PostPosted: Fri Jan 14, 2011 2:24 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Sat Oct 03, 2009 9:30 am
Posts: 350
I've just found some typing mistake in the blender rendering script which may cause errors. Please download it again and I'm sorry for any inconvenience caused :oops:

_________________
Visit Nanyue Express for my railway car drawings


Top
   
PostPosted: Thu Feb 24, 2011 11:30 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Sat Oct 03, 2009 9:30 am
Posts: 350
I've had an idea of proposing a complete solution for those who would like to stick to open-source software when there are plenty of people asking me how to make the objects. The macro recording function of Photoshop is great, but it is absent in gimp. I've spent several months on learning script-fu to automate sprite preparation by gimp, and a little success has been achieved. 8)

_________________
Visit Nanyue Express for my railway car drawings


Top
   
PostPosted: Fri Feb 25, 2011 3:51 pm 
Offline
Tycoon
Tycoon

Joined: Mon Jul 10, 2006 12:43 am
Posts: 1797
Location: Spain
I can send You some GIMP and IrfanView scripts for Windows.

_________________
Sorry if my english is too poor, I want learn it, but it isn't too easy.


Top
   
PostPosted: Fri Mar 11, 2011 4:01 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Sat Oct 03, 2009 9:30 am
Posts: 350
I've just finished the very first version of the sprite processing script for GIMP, but there are a few limitations and precautions:

1. Copy & paste the script into a .scm file using notepad, then put the file under
(install directory of GIMP)\share\gimp\2.0\scripts\
2. The script will become available under Main Menu -> Tools -> Batch Sprite Processing
2. You need to prepare and add the palettes manually into GIMP first before you can apply them to the images (don't ask me how to do so since you can learn it by having a look at GIMP documentation).
3. Adjusting dither amount is impossible in GIMP
4. It only accepts PNGs as input images.

The only advantage of using this GIMP script over PS macro is that it will not "hijack" the clipboard. I haven't tried to compare the resulting sprites prepared by these 2 ways as the script is developed in my office during working hours :lol: :lol:

Code:
(define (script-fu-sprite-process-batch inDir scale palette)
   (let*
      (
         (file-list (cadr (file-glob (string-append inDir "\\*.png") 1)))
      )
      (while (not (null? file-list))
         (let*
            (
               (file-name (car file-list))
               (image (car (gimp-file-load 0 file-name file-name)))
               (drawable (car (gimp-image-active-drawable image)))
               (base-layer (aref (car (cdr (gimp-image-get-layers image))) 0))
               (base-layer-duplicated (car (gimp-layer-copy base-layer TRUE)))
               (mask-layer (car (gimp-layer-copy base-layer TRUE)))
               (image-width (car (gimp-image-width image)))
               (image-height (car (gimp-image-height image)))
               (new-width (* scale image-width))
               (new-height (* scale image-height))
            )

            (gimp-layer-add-alpha base-layer)
            (gimp-image-add-layer image base-layer-duplicated -1)
            (gimp-image-set-active-layer image base-layer-duplicated)
            (set! drawable (car (gimp-image-active-drawable image)))
            (gimp-selection-all image)
            (gimp-selection-shrink image 1)
            (gimp-by-color-select drawable '(0 0 255) 0 3 FALSE FALSE 0 FALSE)
            (gimp-edit-clear drawable)
            (gimp-selection-none image)
            (gimp-layer-scale-full base-layer-duplicated new-width new-height FALSE 3)

            (gimp-image-set-active-layer image base-layer)
            (gimp-layer-scale-full base-layer new-width new-height FALSE 0)

            (gimp-image-add-layer image mask-layer -1)
            (gimp-image-set-active-layer image mask-layer)      
            (set! drawable (car (gimp-image-active-drawable image)))
            (gimp-by-color-select drawable '(0 0 255) 0 0 FALSE FALSE 0 FALSE)
            (gimp-image-raise-layer-to-top image mask-layer)
            (gimp-selection-invert image)
            (gimp-layer-add-alpha mask-layer)
            (gimp-edit-clear drawable)
            (gimp-layer-scale-full mask-layer new-width new-height FALSE 0)
            (gimp-image-crop image new-width new-height 0 0)
            (gimp-image-merge-visible-layers image 2)
            (gimp-selection-none image)
            (set! drawable (car (gimp-image-active-drawable image)))
            (gimp-convert-indexed image 2 4 256 FALSE FALSE palette)
            (file-png-save2 1 image drawable file-name file-name 0 9 0 0 0 0 0 0 1)
            (gimp-image-delete image)
         )
         (set! file-list (cdr file-list))
      )         
   )         
)

(script-fu-register
   "script-fu-sprite-process-batch"                                          ;func name
   "Batch Sprite Processing"                                             ;menu label
   "Process the sprites generated by 3D programs for use in Locomotion"                     ;description
   "K.Y.Chung"                                                   ;author
   "copyright 2011, K.Y.Chung; 2009, the GIMP Documentation Team"                     ;copyright notice
   "23 Feb 2011"                                                   ;date created
   "*"                                                         ;image type that the script works on
   SF-DIRNAME   "Input Directory"         ""
   SF-VALUE      "Scale Factor"            "0.1"
   SF-PALETTE   "Palette Name"            ""
)
(script-fu-menu-register "script-fu-sprite-process-batch" "<Image>/Tools")

_________________
Visit Nanyue Express for my railway car drawings


Top
   
PostPosted: Wed Jul 06, 2011 3:40 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Sat Oct 03, 2009 9:30 am
Posts: 350
Here is a good news for Blender users (including me of course :lol: ) The stable version of the rendering script for Blender 2.5+ has been completed. The old reply with the quick and dirty adaptation of the script has been deleted since we don't need it anymore :P Most known bugs have been solved. It is really painful for migrating from Blender 2.4x to 2.5x but I've found the beauty and elegance of the latter. The UI of the rendering script has been integrated into the UI of Blender prefectly. I've provided 2 branches of the rendering script, they do exactly the same thing except they are called from different areas.

Let me have a quick introduction on how to use it first:
Attachment:
auto_renderer_usage.png [222.31 KiB]
Downloaded 2 times

1. Open the "User Preferences" window
2. Click "Install Add-On" and add the zip file downloaded below. I'm not sure whether it really works, but you can extract and then add the 2 .py files separately if it fails. You can add one of them only also, depends on your needs.
3. Choose "Render" category to browse the related add-ons.
4. Enable those add-ons titled "Auto renderer for Locomotion. Again it's totally up to you to choose any one of them to activate.
5. If you choose Menu Edition, the script can be fired by choosing "Render for Locomotion" under "Render" in the main menu.
6. If you choose Panel Edition, the script can be fired on the last tab in "Render" tab under Properties window.


Attachments:
auto_renderer_3.zip [5.97 KiB]
Downloaded 121 times

_________________
Visit Nanyue Express for my railway car drawings
Top
   
PostPosted: Sun Jul 24, 2011 9:20 am 
Offline
Traffic Manager
Traffic Manager

Joined: Sun Jun 06, 2010 10:08 am
Posts: 145
Location: Finland
K.Y.Chung, I tried your rendering script but when I try to run it, it just causes blender to freeze. I'm using blender 2.58 and I installed the script with your instructions.

Edit: Actually it didn't freeze, alltough I couldn't do anything it was still taking pictures. I used the option to rotate the mesh object and I got about 20 identical imaged (20 because I thought that Blender froze so I closed it).

_________________
- Fractal design R3 case - Asus P8P67 Motherboard - Intel Core i7-2600k 3,4Ghz - AMD Radeon HD6950 Direct CU II 2GB - 8GB DDR3 1600Mhz -


Top
   
PostPosted: Fri Jul 29, 2011 4:24 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Sat Oct 03, 2009 9:30 am
Posts: 350
mc.crab wrote:
K.Y.Chung, I tried your rendering script but when I try to run it, it just causes blender to freeze. I'm using blender 2.58 and I installed the script with your instructions.

Edit: Actually it didn't freeze, alltough I couldn't do anything it was still taking pictures. I used the option to rotate the mesh object and I got about 20 identical imaged (20 because I thought that Blender froze so I closed it).


Yes, Blender will appear to be frozen when the script is running. Just keep patient until all the 136 images (in case of railway vehicles) have been generated. You can verify this by opening the output directory to see if new images keep generated or not. Sometimes you may also need to keep refresh the explorer window to browse new images. If you've already got 20 images generated and there is nothing wrong on those images, the script is supposed to be running properly :wink:

_________________
Visit Nanyue Express for my railway car drawings


Top
   
PostPosted: Sat Jul 30, 2011 7:01 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Sun Jun 06, 2010 10:08 am
Posts: 145
Location: Finland
Ok thanks.
There is a problem with the images. For some reason every image was takes from the same angle. So I had sprite.001 20 times.

_________________
- Fractal design R3 case - Asus P8P67 Motherboard - Intel Core i7-2600k 3,4Ghz - AMD Radeon HD6950 Direct CU II 2GB - 8GB DDR3 1600Mhz -


Top
   
PostPosted: Tue Aug 09, 2011 1:37 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Sat Oct 03, 2009 9:30 am
Posts: 350
Sorry for answering late as I don't visit here frequently recently, after I've finished my rail vehicle packs scheduled this year :lol:

I guest your vehicle is composed with several objects. You need to merge all the "parts" into a single mesh object and being selected as the active object before running the script. Try again and feel free to ask me if you still have problems. :wink:

_________________
Visit Nanyue Express for my railway car drawings


Top
   
PostPosted: Tue Aug 09, 2011 3:12 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Sun Jun 06, 2010 10:08 am
Posts: 145
Location: Finland
Thanks, it works :D :D

_________________
- Fractal design R3 case - Asus P8P67 Motherboard - Intel Core i7-2600k 3,4Ghz - AMD Radeon HD6950 Direct CU II 2GB - 8GB DDR3 1600Mhz -


Top
   
 Post subject: Sketchup To DAT
PostPosted: Wed Aug 17, 2011 6:27 pm 
Offline
Engineer
Engineer

Joined: Wed Jun 29, 2011 2:02 pm
Posts: 111
Skype: southwest7371
Location: United States
I was wondering how to you convert a file from sketchup into a dat or blender file, cause i was working on a station thats very cool and i wanna try it in the game, i might release it too, i searched and couldn't find anything helpful.


Top
   
PostPosted: Thu Aug 18, 2011 3:51 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Sat Oct 03, 2009 9:30 am
Posts: 350
You can export the sketchup file into .DAE (collada) format then import it in Blender. If you are using sketchup pro , you can export the model into .3DS also (and it should be a better choice). You need to break down the model until it can't be further broken down before exporting. Of course, you also need to adjust the materials, scale, lights....etc to get the best result 8)

_________________
Visit Nanyue Express for my railway car drawings


Top
   
PostPosted: Thu Aug 25, 2011 4:37 pm 
Offline
Engineer
Engineer

Joined: Wed Jun 29, 2011 2:02 pm
Posts: 111
Skype: southwest7371
Location: United States
K.Y.Chung wrote:
You can export the sketchup file into .DAE (collada) format then import it in Blender. If you are using sketchup pro , you can export the model into .3DS also (and it should be a better choice). You need to break down the model until it can't be further broken down before exporting. Of course, you also need to adjust the materials, scale, lights....etc to get the best result 8)

Ok since im using sketchup(not pro) i import into blender, but after that how to i get it to a DAT File?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 116 posts ]  Go to page Previous 1 2 3 4 5 6 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.