BrickED - 3D Sprite Editor - b905 RELEASED!

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
uzurpator
Tycoon
Tycoon
Posts: 2226
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Re: BrickED - 3D Sprite Editor

Post by uzurpator »

Today I made the autosave and some performance improvements. I was also hunting the crash that prevented me from completing the work yesterday, but to no avail.

Anyhow - this is the generated sprite:
paris_house.PNG
paris_house.PNG (4.85 KiB) Viewed 3156 times
And this is the model from which it was generated:
bricked_2.PNG
bricked_2.PNG (136.28 KiB) Viewed 3155 times
User avatar
Quast65
Tycoon
Tycoon
Posts: 2798
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: BrickED - 3D Sprite Editor

Post by Quast65 »

Will it also incorporate shading?
Right now it looks to me that the grey sidewall has the same color in each view.

Edit:
It also doesnt seem to generate a consistent shape for the groundtile.
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
User avatar
uzurpator
Tycoon
Tycoon
Posts: 2226
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Re: BrickED - 3D Sprite Editor

Post by uzurpator »

If by shading you mean lightning - then here:
cube_2.PNG
cube_2.PNG (12.9 KiB) Viewed 3066 times
this is the same brick, but lit from a different direction, and, of course, it is palette correct.

If by shading, you mean the color gradients on a single wall, that is up to the artist. For now, it is a little tedious because the paint tool requires a click on every brick, but the painting operation is next on my TODO list, along with cube-selection. Darken/lighten tools are also planned.

The ground tile is a toughie, as I don't control how Vulkan, which means 'GPU' does it - as it is to rasterization to decide. If anything - it will require either fixes by hand or some sort of automation later in the pipeline.
User avatar
Quast65
Tycoon
Tycoon
Posts: 2798
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: BrickED - 3D Sprite Editor

Post by Quast65 »

uzurpator wrote: 16 Nov 2024 13:19 If by shading you mean lightning - then here:
Yes, I mean that ;-)
If by shading, you mean the color gradients on a single wall, that is up to the artist.
That is what I would call texturing.

The lighting is most important as it is plays a crucial role in how the game looks, good that that is in it.
The ground tile is a toughie, as I don't control how Vulkan, which means 'GPU' does it - as it is to rasterization to decide. If anything - it will require either fixes by hand or some sort of automation later in the pipeline
It could be handy then to just advise to not draw in a groundtile to begin with. So just the structure. It can then be placed on a groundtile (if needed) before coding. It maybe saves also some rendering time.
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
luxtram
Route Supervisor
Route Supervisor
Posts: 418
Joined: 10 May 2016 19:09

Re: BrickED - 3D Sprite Editor

Post by luxtram »

uzurpator wrote: 15 Nov 2024 19:56 Anyhow - this is the generated sprite:
paris_house.PNG
This is getting good. Very interesting. When do you plan to do a beta release to let other people to test it too?

Also why not GPL? It would give you a little better control over the code.
California City Sets viewtopic.php?t=76786
1000 building set viewtopic.php?t=75250
User avatar
uzurpator
Tycoon
Tycoon
Posts: 2226
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Re: BrickED - 3D Sprite Editor

Post by uzurpator »

Quast65 wrote: 16 Nov 2024 14:51 It could be handy then to just advise to not draw in a groundtile to begin with. So just the structure. It can then be placed on a groundtile (if needed) before coding. It maybe saves also some rendering time.
Everything is up to the user to decide. That being said - you are guaranteed to be either _on_ the tile or a pixel off, which is trivial to fix in post-production, or I"ll even make it done automatically. Speed is irrelevant, even 360 sprites of TTD size are done pretty much instantaneously.

luxtram wrote: 16 Nov 2024 16:06 This is getting good. Very interesting. When do you plan to do a beta release to let other people to test it too?
Download link to build 596 is in the first post. I do this as a side hustle to make some money - at some point - so I'm not going to open-source it. However, If I did, I certainly would not GPL it.
User avatar
Mrsunman
Transport Coordinator
Transport Coordinator
Posts: 331
Joined: 26 Jul 2023 22:58
Location: Sydney, Australia

Re: BrickED - 3D Sprite Editor - b596 RELEASED!

Post by Mrsunman »

Just tried it yesterday, seems pretty neat, although there is a list of some things i wish for, if that's OK :D :
- Able to draw lines and smooth pen curves (Currently you can only place one-at-a-time)
- Model imports from other sources? a converter?
- better sorting of the TTD pallete in the left, you could take note from the MS DOS pallete and how it's organized.

This project looks really good still! It'll be a great tool to make uniquely shaped buildings and such, as well as suppling their 4 views. cheers :mrgreen:
Simcity 4 asset pack [ON HOLD] : viewtopic.php?t=91847&start=20
MMS object set [FILES AVAILABLE] : viewtopic.php?t=91903
TTDmas 2024 object set [WIP] :viewtopic.php?p=1272351#p1272351
Winner of the SOTM: 9/24
All my assets are GPL-2

To do list:
- Hutt housing objects
- Hutt road set and objects
- Hutt parks
ebla71
Route Supervisor
Route Supervisor
Posts: 489
Joined: 14 Apr 2021 21:48
Location: Earth

Re: BrickED - 3D Sprite Editor

Post by ebla71 »

uzurpator wrote: 16 Nov 2024 18:15 Download link to build 596 is in the first post.
Interesting and very helpful for a person who isn't precisely a big graphics artist like me - thank you very much.

Tried to draw something and then turn into a NewGRF, but nmlc complains

Code: Select all

nmlc ERROR: Image file "gfx/test_0.png": 8bpp image does not have a palette
although file "transport_tycoon_palette.png" is in the indicated folder "..\BrickED_build_596\content\palettes" and color selection looks like in the tutorial
User avatar
uzurpator
Tycoon
Tycoon
Posts: 2226
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Re: BrickED - 3D Sprite Editor - b596 RELEASED!

Post by uzurpator »

Mrsunman wrote: 16 Nov 2024 20:11 - Able to draw lines and smooth pen curves (Currently you can only place one-at-a-time)
Stroke paint and stroke shade/texture is on my TODO.
- Model imports from other sources? a converter?
Considering what BrickED does - highly unlikely. Voxel formats might be importable with some work but straight meshes - that would require "pay me lots of euros" of effort.
- better sorting of the TTD pallete in the left, you could take note from the MS DOS pallete and how it's organized.
In 'content/palettes' there is a palette file which you can order any way you want. You can also create a copy of It and edit 'content/config/config.txt' to point the editor to a different palette file.
ebla71 wrote: 16 Nov 2024 23:43 nmlc ERROR: Image file "gfx/test_0.png": 8bpp image does not have a palette
Ok - that is a problem I didn't forsee. nmlc seems to require indexed png images, while BrickED generates regular ones, albeit with colors limited to TTD palette. I'll work around it, but the library I'm using does not support indexed pngs.
ebla71
Route Supervisor
Route Supervisor
Posts: 489
Joined: 14 Apr 2021 21:48
Location: Earth

Re: BrickED - 3D Sprite Editor - b596 RELEASED!

Post by ebla71 »

uzurpator wrote: 17 Nov 2024 10:04
ebla71 wrote: 16 Nov 2024 23:43 nmlc ERROR: Image file "gfx/test_0.png": 8bpp image does not have a palette
Ok - that is a problem I didn't forsee. nmlc seems to require indexed png images, while BrickED generates regular ones, albeit with colors limited to TTD palette. I'll work around it, but the library I'm using does not support indexed pngs.
It can kinda be fixed when you use a template *.png file for example in GIMP which already has the palette incorporated and then copy/paste the BrickED image into that.

However, when doing so I ran into another problem:

Code: Select all

nmlc warning: "summit_cross.nml", line 29: "gfx/summit_cross_2.png" at [x: 89, y: 2]: 136 of 2816 pixels (4%) are animated, but ANIM isn't in flags
The sprite still shows up when NewGRF is loaded, but with some very weird psychedelic animation colors 8)

Strangely, the *.png itself does not show this (BrickED image is 2nd from left), only inside OTTD:

Image
ebla71
Route Supervisor
Route Supervisor
Posts: 489
Joined: 14 Apr 2021 21:48
Location: Earth

Re: BrickED - 3D Sprite Editor - b596 RELEASED!

Post by ebla71 »

ebla71 wrote: 18 Nov 2024 03:08 It can kinda be fixed when you use a template *.png file for example in GIMP which already has the palette incorporated and then copy/paste the BrickED image into that.

However, when doing so I ran into another problem:

The sprite still shows up when NewGRF is loaded, but with some very weird psychedelic animation colors 8)

Strangely, the *.png itself does not show this (BrickED image is 2nd from left), only inside OTTD
Additional information which might be relevant for bug tracking:

Export of sprites from BrickED was at significant magnification (10x or 100x) but then I had to scale the graphics back down in GIMP in order to match the template.

Could it be this added the strange "animation pixels"?!?
User avatar
uzurpator
Tycoon
Tycoon
Posts: 2226
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Re: BrickED - 3D Sprite Editor - b604 RELEASED!

Post by uzurpator »

Shameless bump for build 604, with some improvements.
ebla71 wrote: 18 Nov 2024 14:48 Additional information which might be relevant for bug tracking:

Export of sprites from BrickED was at significant magnification (10x or 100x) but then I had to scale the graphics back down in GIMP in order to match the template.

Could it be this added the strange "animation pixels"?!?
OTTD uses some colors in its palette for special-fx - such as water, translucency, or fire ( like on the oil refinery ). If those pixels find themselves on a sprite in random places, you will find the result to be a blinking mess. Since GIMP has no idea what kind of meaning pixels have, it used closest approximation of color from the available palette when it resizes the image from the 10/100x magnification to the proper size. This is not going to work.

For pixel-perfect and palette-correct results in quarter views, you need to compensate for deformations that come from the 3d perspective. There really isn't a good solution for this because you are working with 1-brick->1-pixel paradigm. In quarter view this 1-brick is more like 0.7 of a pixel - and since pixels cannot be merged.

If you take the 'paris-edited.ase_brk' model and render it as BrickED suggests in the window, you are going to get a pixelized mess of incorrect size:
paris_ed_mag.png
paris_ed_mag.png (3.35 KiB) Viewed 2609 times
If you render it with sizes 32/60/32 for the quarter views, you are going to get a proper building:
paris_0.png
paris_0.png (3.7 KiB) Viewed 2609 times
Note that those 32/60/32 is the _size_ of the model. This, effectively, undoes the 3d perspective deformations, and once 1brick->1px returns to be true. However this only works in quarter views, as in any other angle such transformation is not useful.

If you worked solely with 3-4-5 pixels per each brick, the result is going to look fine. Because OTTD is paletted in 8-bpp, you can't brute force 10x magnification and then scale down the result.
User avatar
uzurpator
Tycoon
Tycoon
Posts: 2226
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Re: BrickED - 3D Sprite Editor - b622 RELEASED!

Post by uzurpator »

Bumping for the glory of Release 622. It took a little time to get it going as I needed to rework a part of my linear algebra when hunting for the erratic behavior of light. There are some other improvements, the release notes are as such:

Release Notes:
1. Added a possibility to press 'Del' key to erase selection.
2. Added a possibility to press 'Esc' to stop current operation ( like paint, place brick, etc )
3. Added focused brighten / darken brush
4. You can now drag the model view when placing bricks
5. Added an arrow showing the direction of light
6. Fixed an issue with light direction being erratic at extreme camera angles
7. Updated 'paris-edited' sample
8. Sprite generation window now remembers some values on subsequent openings
User avatar
uzurpator
Tycoon
Tycoon
Posts: 2226
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Re: BrickED - 3D Sprite Editor - b645 RELEASED!

Post by uzurpator »

Bump, because Update:
DOWNLOAD: BrickED b645
Release Notes:
1. Various bugfixes, which are not visible to the user, but allow further expansion of the project
2. Sprite size info is now saved to the model file
User avatar
uzurpator
Tycoon
Tycoon
Posts: 2226
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Re: BrickED - 3D Sprite Editor - b645 RELEASED!

Post by uzurpator »

Bump, because Update:
DOWNLOAD: BrickED v905
Release Notes:
1. Various bugfixes, which are not visible to the user, but allow further expansion of the project
2. You can now specify a color gradient for a brick. Here is an example of using this feature.
foobar.PNG
foobar.PNG (129.75 KiB) Viewed 420 times
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot] and 11 guests