About Store Forum Documentation Contact
Donations:
289$/mo



Post Reply 
Palette mode query
Author Message
3DRaddict Offline
Member

Post: #1
Palette mode query
Please could somebody explain what is the meaning of Palette mode (as opposed to Blend mode) and when to use it? What is the difference between PALETTE and PALETTE1, and when to use either of them?
07-08-2015 08:46 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Bronze Supporter

Post: #2
RE: Palette mode query
i believe that RM BLEND is only for alpha,
RM palete you can use color instead of just alpha.
palete1 is just a second color set ?

Code:
RM_BLEND         , // alpha blending
   RM_PALETTE       , // color palette #0 (rendering is performed using 'Renderer.color_palette'  texture)
   RM_PALETTE1      , // color palette #1 (rendering is performed using 'Renderer.color_palette1' texture)

-----
   Display& colorPaletteAllow(  Bool      on     );   Bool      colorPaletteAllow()C {return _color_palette_allow;} // set/get if RM_PALETTE/RM_PALETTE1 rendering modes are allowed, disabling them increases rendering performance, default=true (false for Mobile)
   Display& colorPalette     (C ImagePtr &palette); C ImagePtr& colorPalette     ()C {return _color_palette[0]   ;} // set/get color palette image that is used during RM_PALETTE  rendering mode, palette textures need to have a height of 4 pixels (width can be set freely), where each row represents an intensity color palette for respectively (red, green, blue, alpha) components when rendering in RM_PALETTE  mode, default=Images.ptrGet("Gfx/Fx/color palette.gfx")
   Display& colorPalette1    (C ImagePtr &palette); C ImagePtr& colorPalette1    ()C {return _color_palette[1]   ;} // set/get color palette image that is used during RM_PALETTE1 rendering mode, palette textures need to have a height of 4 pixels (width can be set freely), where each row represents an intensity color palette for respectively (red, green, blue, alpha) components when rendering in RM_PALETTE1 mode, default=NULL
07-08-2015 09:02 AM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #3
RE: Palette mode query
I don't even know half of how it works, but I did some testing with it a loooong time before.

Basically, palette allows you to change how the rendering is performed by inputting a palette texture (check the assets/fx/cel light palette.png for reference, it has to be 1 pixel high).

You can supply 2 different textures (PALETTE and PALETTE1), using D.colorPalette/1 and then switch rendering mode.

I can't find the example in which I used it anymore, but I used it to change colours of my particles to better fit together.

Sorry for this lacking explanation. Esenthel will jump in soon and set it all right. pfft
07-08-2015 09:10 AM
Find all posts by this user Quote this message in a reply
3DRaddict Offline
Member

Post: #4
RE: Palette mode query
Thanks both of you.

Yes, I was unclear how an actual palette texture looked. I've always thought of a palette in terms of a an artist... i.e. a strip of color blocks of the artist's choice.
So from the EE explanation I guess its a 4 pixel high strip of color blocks.

Question: How to access any particular color from this strip?

EDIT: Just had a look at the Cell Shading tutorial... did give me a better understanding.
But a fuller explanation of a palette's use would still help me.
(This post was last modified: 07-08-2015 09:44 AM by 3DRaddict.)
07-08-2015 09:29 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply