Skip to main content
Topic: Render Post-Processor tool (Read 38466 times) previous topic - next topic

Re: Render Post-Processor tool

Reply #35
Ideally, what is needed is something that turns the render outputs from Blender (black background, individual files, images not aligned in exactly the right places to work) into an image that Simutrans can use (correct blue background, single file, images precisely aligned) automatically, instead of having manually to select, copy, paste, align and then remove the alignment markers from each image. Can your tool do this without adding so many extra OSA-related steps that it is actually no less work than doing it manually without OSA?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: Render Post-Processor tool

Reply #36
Oh my... Only if you asked for that before... :D
I Let's start with it!

You can set the correct background to your blender render outputs inside blender itself. Into the world panel (press F5 until you see a panel with the tabs "preview", "world", ...), pick the upper left color selector (just below "WO:World") and write in the "Hex" textbox the correct background (E7FFFF). This will work for you only if you select "SKY" option in the render tab (render buttons, the option on the bottom left corner of render tab).

Once your background is the correct one, alignment becomes much easier. It's very difficult to make alignment automatic, but Shades tool makes our task muuuuuch easier. It allows to load a background image that you can use as a template, and with a single mouse click you can pick your vehicle and move it to the correct position. This is done without layers, copying or selecting.

If you never used shades, I encourage you to try it right now! For me it's a must for simutrans content painters!  8)

Re: Render Post-Processor tool

Reply #37
Ahh, this is very interesting - thank you! Where can I find Shades? Also - any progress on the Blender scripts?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: Render Post-Processor tool

Reply #38
You can find Shadeshere: http://forum.simutrans.com/index.php?topic=5389.0

Here are my blender scripts for rendering different views for simutrans.
http://files.[ simutrans [dot] us (site down, do not visit) ]/files/get/MXV8fq-NHR/blender-scripts.7z

The scripts move the camera and the sun of the scene to each of the four/eight needed positions, and then render the scene and saves to disk the image with the proper view suffix. The scripts can only be used if:
a) The scene has a single light source of type "sun" named "sol".
b) The scene has a single camera named "cam".

Cam and sun distance to the object is fixed, but you can modify all that in the script to add more light sources or other objects. As long as I didn't find any way to rotate objects properly, I hardcoded in the script the position and angle for each object.

Re: Render Post-Processor tool

Reply #39
Alignment shouldn't be a problem. Once you find the right camera positions, you should be able to leave them alone and render multiple objects with the object in the correct position already. Is there some reason I can't think of why alignment should be a problem that has to be solved more than once for each building size? Seems to me there should be one and only one correct camera placement for each rendered tile image.
Once found, that position should be included in the template blend file (as a camera object locked in place).
--Skreyola
You can also help translate for your language with SimuTranslator.

Re: Render Post-Processor tool

Reply #40
That may work with buildings. But think of a vehicle: depending on type of vehicle and vehicle length it must be aligned to the tile heading each direction, not to the camera.

Re: Render Post-Processor tool

Reply #41
That may work with buildings. But think of a vehicle: depending on type of vehicle and vehicle length it must be aligned to the tile heading each direction, not to the camera.
You can have multiple cameras in Blender, so you just position each camera position once (and position the model on the correct side of the center so it'll be on the correct portion of the road)... Oh, I see what you're saying. But that still (seems like it) should be fairly simple to solve, with a little bit of experimentation to produce a table of vehicle center coordinates.
Tip: Have your vehicle model's location center at ground level.
--Skreyola
You can also help translate for your language with SimuTranslator.

Re: Render Post-Processor tool

Reply #42
Of course it can be done, but sincerely, I feel far more easy aligning the render output with Shades (which is really quick) that implementing multiple cameras in Blender (I prefer a single one) and aligning the object to the tile. But anyway, that's a matter of "feeling"; some will be more comfortable working the first way, some will prefer the second way :)

Re: Render Post-Processor tool

Reply #43
Zeno: I can totally respect that.
--Skreyola
You can also help translate for your language with SimuTranslator.

 

Re: Render Post-Processor tool

Reply #44
Link at first post updated, thanks Igor for reporting.

About the script, thanks very much for sharing your modifications james. I'll take a look to the script, I'll try to fix errors if any and then upload the newest version to the project page.