Jump to content

How to change mesh material to gray


HenryPeng
 Share

Recommended Posts

Completely agree with @iiceman, it would be highly inefficient to go through them again. The color Curve is a separate object to allow sharing in the scene in order to create something consistent and author it in one place.

But in case you wonder why your code does not work, it is fixed here: http://www.babylonjs-playground.com/#11BH6Z#169

I only fixed a typo. In this code:

if (material.cameraColorCurves) { // This will affect only if it is already assigned and do the opposite of your goal. You miss a !
	material.cameraColorCurves = curve;
} else {
	material.cameraColorCurves = null;
}

 

 

Link to comment
Share on other sites

@Sebavan I started playing around with the color grading because it very cool and something for my game (well, if it ever gets done ;) ). It took me a while before I figured out that I have to use the 2.5 beta version to see results. Everything worked on the playground as I expected but not errors and no results in my game. But I got that now. So here is the problem: I used the LateSunset.3dl that I found in an example. The color change is pretty close to what I want (a day and night cycle) but at day time the colors get too bright and at night some colors seem weird (the desert sand color and the snowy mountain tips white - screenshots below). How do I change that? I assume I have to edit the 3dl file, but it's just numbers for me so no clue what to do. Any hint or tutorial that I can follow to get the colors I want?

too_bright.JPG

weird_white_and_yellow.JPG

Link to comment
Share on other sites

Hello,

There is 2 things you could do to transform the rendered color to your desired results:

  1. Use of the curves which works close from the photoshop ones. You can animate Hue Saturation and Value (and also only on shadows or average or highlights) to match your desired rendering. Animating in the game could smoothly go between one setup and the others. This is briefly covered here: https://www.blender.org/manual/de/compositing/types/color/hue_saturation.html
  2. Use of Lookup tables. On his one, each color of the rendered pixels is mapped to another colors. The 3dl file is a common format that photoshop can generate from your transformation setup. Basically it contains an array of all the colors remapped to their expected new result. A good example of creation is: https://helpx.adobe.com/photoshop/using/export-color-lookup-tables.html . 

As I am pretty bad at art :-) I do not know which way would be the easiest to create the setup. Maybe somebody else could help on the photoshop creation of the setups. either through HSV or through 3dl LUT?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...