Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Tue Oct 15, 2024 1:31 pm
All times are UTC + 0
How to add custom palette for voxels using Phobos?
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [9 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Thu Feb 22, 2024 10:07 pm    Post subject:  How to add custom palette for voxels using Phobos? Reply with quote  Mark this post and the followings unread

I've been experimenting with the palette used for units(voxels). It ended up messing with the palettes for buildings, infantries, and other shps.
I've tried searching if I could give the units(voxels) have their own custom palette and saw this:
https://ppmforums.com/topic-54148/custom-palette-for-voxel/

I stopped messing with palettes for a while and did other things like making new voxels and saw in Phobos website in "Fixed / Improved Logics":
- Both voxel and SHP vehicle units should now correctly respect custom palette set through Palette. (Starkku)

I'm wondering what this meant. I've put Palette=unit.pal first then Palette=unit both in artmd and rulesmd for a unit(voxel) and nothing happened.

Back to top
View user's profile Send private message
Darkstorm
Commander


Joined: 20 Jan 2008
Location: Texas

PostPosted: Fri Feb 23, 2024 8:23 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'm pretty sure the default logic of Palette=blah.pal is that it looks for blahtem.pal, blahsno.pal, etc.

Back to top
View user's profile Send private message ModDB Profile ID
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Fri Feb 23, 2024 8:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

Whatever support there is for the palette, remember the VPL controls voxel lighting and it expects certain colours to be where they are, so choosing a different palette for a voxel will probably look like hot garbage.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Fri Feb 23, 2024 11:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

Darkstorm wrote:
I'm pretty sure the default logic of Palette=blah.pal is that it looks for blahtem.pal, blahsno.pal, etc.


I've changed the names to blahtem.pal, blahsno.pal, etc. Still nothing happened. Tried it on both artmd.ini and rulesmd.ini.

G-E wrote:
Whatever support there is for the palette, remember the VPL controls voxel lighting and it expects certain colours to be where they are, so choosing a different palette for a voxel will probably look like hot garbage.


I've already change the VPL a long time ago so it stays closer to what it looks like in the VXLSE. The reason why I needed to know how to add custom palette is more for the buildings.
For example, the green in the Nuclear Reactor animation when it glows uses the unittem.pal palette so if I change it, it will also change the color of the glow of the Nuclear Reactor into that color as well as other buildings that uses the unittem.pal palette

Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sat Feb 24, 2024 7:41 am    Post subject: Reply with quote  Mark this post and the followings unread

Well that wasn't the question, you asked about voxels specifically, and if you change the VPL you just change unit*.pal with it, no special code required.

But to answer the simplest way to use a new unit*.pal with voxels while using the old version for buildings is to replace the lib*.pal files with the old unit equivalents, and just add Palette=lib to every building art entry. Thus you can instantly use existing art with correct colours.

Then you can leverage Ares/Phobos CustomPalette= for unique cases.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Sat Feb 24, 2024 8:45 am    Post subject: Reply with quote  Mark this post and the followings unread

The question was to add custom palette to voxels and the reason was because I have a problem with the buildings using the unit*.pal,
so I plan to just change the units palette since I might have custom colors for each faction to use.

Another thing is that putting palette=lib didn't work. Just so anyone could test, I'll give some files and an image of what my Nuclear Reactor looks.
Please show me the code you used for artmd.ini for both unit and buildings if you were able to use custom palette for them both. Just add this to artmd.ini and use Image=MORG to your unit in rulesmd.ini:
(MORG has a different color originally. I just changed it so it would look noticeably different using the unused section of the palette)
Code:
[MORGUE]
Voxel=yes
Remapable=yes
Cameo=FALCICON
AltCameo=FALCUICO



Pink Reactor.png
 Description:
 Filesize:  51.96 KB
 Viewed:  1905 Time(s)

Pink Reactor.png



unittem.pal
 Description:

Download
 Filename:  unittem.pal
 Filesize:  768 Bytes
 Downloaded:  2 Time(s)


MORG.hva
 Description:

Download
 Filename:  MORG.hva
 Filesize:  88 Bytes
 Downloaded:  2 Time(s)


MORG.vxl
 Description:

Download
 Filename:  MORG.vxl
 Filesize:  88.97 KB
 Downloaded:  1 Time(s)


Back to top
View user's profile Send private message
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sat Feb 24, 2024 10:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

Palette=lib in the art.ini entry for the building, it works because I use it in my mod, but like I say you have to copy the old unit pals to lib pals to override the original lib pals.

I'm doing exactly what you're trying to do, I have new unit pals, and a new VPL, all the voxels are converted to the new palette, and all the buildings that need the old one have Palette=lib. That's it, no magic involved.

BTW my Liberty uses my new unit pals because it has a bronze tonal range.

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Ousagi
Cyborg Soldier


Joined: 02 Nov 2022

PostPosted: Sun Feb 25, 2024 12:38 am    Post subject: Reply with quote  Mark this post and the followings unread

I don't know how but it works now. I put the art.ini and put Palette=lib again and it works now. Even deleting art.ini and adding Palette=lib to units and buildings works now. I guess that's kind of magical. After hours of repeatedly putting Palette=lib, Palette=libtem, Palette=lib.pal, Palette=libtem.pal, CustomPalette=lib, CustomPalette=libtem, CustomPalette=lib.pal, CustomPalette=libtem.pal, and now going back to Palette=lib finally worked! I don't know if it had something to do with having art.ini rather than artmd.ini fixed it but it works now even if I delete art.ini. Thanks for the help! Maybe my game might've bugged out or something but it's finally over and I could use custom palettes now! Very Happy  Very Happy  Very Happy

Back to top
View user's profile Send private message
kenosis
Commander


Joined: 19 Aug 2009
Location: Moscow State University

PostPosted: Tue Feb 27, 2024 12:01 am    Post subject: Reply with quote  Mark this post and the followings unread

CustomPalette should work for animations.
Palette flag exist in unmodded yr but can be used only once without patches

_________________
Tired of grabbing my random SHP conversions? Why not learn to create SHPs for yourself?

Back to top
View user's profile Send private message Send e-mail Visit poster's website Skype Account Yahoo Messenger Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [9 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 4.4548s ][ Queries: 14 (4.1643s) ][ Debug on ]