Jump to content

Foxy's Random Stuff


Foxbox

Recommended Posts

This was the main reason why I wrote my own renderer. However, there is another approach, which will work fine for objects which are entirely non-remappable (as here), or objects that are almost entirely remappable. The solution is to simply remove the remappable colors from the palette you use when you convert the image to indexed color. The only time this doesn't work is if you have remappable areas and also non remappable areas in the same color. I saw one approach based on splitting the image into two, palettizing with different palletes and then recombining them.

  • Like 2
Link to comment

@X7123M3-256

do you know the hexa-decimal value for both remapable colors? Because the palletizing method looks promizing. But for that i need the value.

For some reason, an entire color range got removed.

  • from: #47af27
  • to: #0f3f00

Basicly, 6 types of green got removed in this image, so are there more than 2 colors that are remapped?

 

Link to comment
2 hours ago, Foxy said:

do you know the hexa-decimal value for both remapable colors? Because the palletizing method looks promizing. But for that i need the value.

Sure. The primary remap colors are palette indices 243-254 (0xF3-0xFE in hex). The secondary remap colors are indices 202-213 (0xCA-0xD5) and the tertiary remap colors are 46-57 (0x2E-0x39).

The primary remap colors are used only for remapping and never appear in game, so you should exclude them from your palette. There are also non-remappable greens, so this does not mean you can't have green areas, but if your object contains green areas and it's remappable then you'll have to work a bit harder to avoid them getting mixed up. The secondary and tertiary remap colors are only remapped if the object is remappable, so there's no need to remove them from the palette - they should show as the expected colors if they are not remapped.

  • Like 1
Link to comment
3 hours ago, X7123M3-256 said:

Sure. The primary remap colors are palette indices 243-254 (0xF3-0xFE in hex). The secondary remap colors are indices 202-213 (0xCA-0xD5) and the tertiary remap colors are 46-57 (0x2E-0x39).

Thank you.

But i was expecting the value as RBG :D

0xRRGGBB

I actually need to manually put in ALL remaining 223 colors*. In the attached image, you can see under "HTML-Notation" the marked area. This Hex-value a 6 digit number, as you may know. All numbers together are the color, that is NOT indexed. Just like HTML and CSS.

hex-color.jpg.cd43463016978e5a62bdd8baab9449b6.jpg

 

the color: 0xFE could be in the red spectrum, the blue spectrum or the green spectrum without the other 2 values.

 

*Typing it manually was actually a lie... now that i think about it, i will probably just write a simple batch file for this *lol*

Edited by Foxy
Link to comment

You can find RGB values for the game palette here. (I link this and not the OpenRCT2 source because they assign different values to the remap colors - OpenRCT2 will give you orange colors for the primary remap, but most tools expect green. I'm not sure of the reason for the difference - it doesn't really matter, but consistency would be nice)

However, there's a much easier way: open any RCT2 screenshot in GIMP and then navigate to the palette window. It will show you the current palette, and you can save it for reuse. This will not give you the primary remap colors (they are all shown as black), but as mentioned above, you don't need them for this anyway.

There are a few other palette values you need to exclude when converting images for use in game. The water colors and the chain lift colors will animate, which is probably not what you want. There are a few other values whose purpose I don't actually know. The colors you want to include are in blocks of 12, from dark shades to light shades.

Edited by X7123M3-256
Link to comment

i think, i messed it up :D

I did what you said: opend an screenshot, dublicated the palette of the screenshot, opend the entrance and importet the palette.

TraEntr_palette.jpg.94bcb728404798a383007479b1f37c6c.jpg

Looks like the colors need to be in the same position in order to work. When i export the palette of an screenshot, the first  appearance of the color red in the screenshot is not the same as in the entrance. This is why it got messed up.

 

Link to comment

I have no idea what you've managed to do there, to be honest, but here's what I did:  start with the true color image (which is most likely what you are rendering). Open that in RGB mode, then go to Image->Mode, and select "Indexed". Then select the pallete you got from the screenshot, and set "dithering" to "Floyd-Steinberg". That should convert the image to indexed color.

Edited by X7123M3-256
  • Like 1
Link to comment
35 minutes ago, Foxy said:

Maybe i should mask the green area --> index palette --> copy&paste it back on the true Color image.

RCT2 cannot use true color images, so they will be converted anyway. I think the problem is that your lighting is way too dark. IIRC, the object editor doesn't dither, so it will pick the closest palette color. The dithered image is a better approximation of the actual color of the model, but it does look noisy when given a shade that doesn't have a close match in the palette. You can try turning dithering off if you'd prefer, but I'd say the light needs to be brighter anyway. Lighting is really difficult to get right, and at this point I've pretty much given up trying.

 

Link to comment

So, i need to increase the light in such a way, that it matches the version, where the green pixel got removed.

hmm. this wont be easy, but i'll give it a try.

What me annoys, is that i have to switch back and forth between each image in Gimp. Now i have to learn python  .___.

  • Like 1
Link to comment

It's been years since I last used 3DS Max, but I think it has an option for ambient light. Set this high enough for the dark side, and then set the directional light's intensity to get the light side right. Once rendered, GIMP can apply the colour pallet with dithering for you. This tutorial here shows how to do that in Photoshop, GIMP probably has a similar feature for it.

  • Like 1
Link to comment
32 minutes ago, Broxzier said:

Set this high enough for the dark side, and then set the directional light's intensity to get the light side right

I tried that. You can get two sides to match, but the remaining sides then come out wrong. I tried using line search and gradient descent to minimize an overall error function, but I was not able to fit the data well, and even when you have a side that matches by the numbers, the visual appearance is often very different. I've pretty much given up with trying to get the lighting to look remotely decent.

  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...