POV-Ray : Newsgroups : povray.advanced-users : Vertex colors rendering Server Time
2 Oct 2025 22:58:40 EDT (-0400)
  Vertex colors rendering (Message 1 to 7 of 7)  
From: yesbird
Subject: Vertex colors rendering
Date: 29 Sep 2025 20:39:08
Message: <68db26ac@news.povray.org>
Working on file converter, I am importing vertex colors from FBX,
but cant figure out why POV-Ray rendering is so much different from
ZBrush. Maybe there is a way to control color distribution and
smoothness ?

Please find images and scene in attachment.
-- 
YB


Post a reply to this message


Attachments:
Download 'cube_vc.inc.txt' (2 KB) Download 'scene.png' (29 KB) Download 'scene.pov.txt' (3 KB) Download 'zb.png' (402 KB)

Preview of image 'scene.png'
scene.png

Preview of image 'zb.png'
zb.png


 

From: Bald Eagle
Subject: Re: Vertex colors rendering
Date: 29 Sep 2025 21:25:00
Message: <web.68db308787a1b5a91f9dae3025979125@news.povray.org>
yesbird wrote:
> Working on file converter, I am importing vertex colors from FBX,
> but cant figure out why POV-Ray rendering is so much different from
> ZBrush. Maybe there is a way to control color distribution and
> smoothness ?
>
> Please find images and scene in attachment.
> --
> YB

You might not want to color by vertex.
Maybe color the entire cube with a gradient and use blend_mode.

https://wiki.povray.org/content/Reference:Pigment_Map

That's all I have - for the moment.

- BW


Post a reply to this message

From: Bald Eagle
Subject: Re: Vertex colors rendering
Date: 29 Sep 2025 21:40:00
Message: <web.68db340187a1b5a91f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> yesbird wrote:
> > Working on file converter, I am importing vertex colors from FBX,
> > but cant figure out why POV-Ray rendering is so much different from
> > ZBrush. Maybe there is a way to control color distribution and
> > smoothness ?
> >
> > Please find images and scene in attachment.
> > --
> > YB
>
> You might not want to color by vertex.
> Maybe color the entire cube with a gradient and use blend_mode.
>
> https://wiki.povray.org/content/Reference:Pigment_Map
>
> That's all I have - for the moment.
>
> - BW

#version 3.8;

global_settings {assumed_gamma 1.0}

#include "functions.inc"

camera {
 location <0, 0, -20>
 look_at <0, 0, 0>
 right x*image_width/image_height
 up y
 sky y
}

sky_sphere {pigment {rgb 1}}

light_source {<0, 50, -50> rgb 1}


box {-5, 5
 pigment {
  gradient x
  pigment_map {
   blend_mode 0 // or 3
   [0, rgb y]
   [0.5, rgb 1]
   [1, rgb z]
  }
  scale sqrt (200)
  translate x*sqrt (200)/2
  rotate z*45
 }
}


Post a reply to this message


Attachments:
Download 'yesbirdcolorcube.png' (29 KB)

Preview of image 'yesbirdcolorcube.png'
yesbirdcolorcube.png


 

From: Bald Eagle
Subject: Re: Vertex colors rendering
Date: 29 Sep 2025 21:55:00
Message: <web.68db383c87a1b5a91f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> That's all I have - for the moment.

OK - I think that also maybe the colors for your vertices are done wrong.

Make your top left and bottom right four vertices white
top right two vertices blue
bottom left two vertices green


#declare model = mesh2 {
vertex_vectors {
  8,
  <-0.20000000298023224,0.20000000298023224,0.20000000298023224>, // 0 Left Top
Rear
  <0.20000000298023224,0.20000000298023224,0.20000000298023224>,  // 1 Right Top
Rear
  <0.20000000298023224,0.20000000298023224,-0.20000000298023224>, // 2 Right Top
Front
  <-0.20000000298023224,0.20000000298023224,-0.20000000298023224>, // 3 Left Top
Front
  <-0.20000000298023224,-0.20000000298023224,0.20000000298023224>, // 4 Left
Bottom Rear
  <0.20000000298023224,-0.20000000298023224,0.20000000298023224>, // 5 Right
Bottom Rear
  <0.20000000298023224,-0.20000000298023224,-0.20000000298023224>, // 6 Right
Bottom Front
  <-0.20000000298023224,-0.20000000298023224,-0.20000000298023224>, // 7 Left
Bottom Front
  }

texture_list {
 8,
 texture{pigment{rgb 1}}
 texture{pigment{rgb z}}
 texture{pigment{rgb z}}
 texture{pigment{rgb 1}}
 texture{pigment{rgb y}}
 texture{pigment{rgb 1}}
 texture{pigment{rgb 1}}
 texture{pigment{rgb y}}
}

face_indices {
  12,
  <0,1,2>, 0,1,2,
  <2,3,0>, 2,3,0,
  <4,5,1>, 4,5,1,
  <1,0,4>, 1,0,4,
  <5,6,2>, 5,6,2,
  <2,1,5>, 2,1,5,
  <6,7,3>, 6,7,3,
  <3,2,6>, 3,2,6,
  <7,4,0>, 7,4,0,
  <0,3,7>, 0,3,7,
  <7,6,5>, 7,6,5,
  <5,4,7>, 5,4,7,
  }
}


Post a reply to this message


Attachments:
Download 'cube_scene.png' (23 KB)

Preview of image 'cube_scene.png'
cube_scene.png


 

From: yesbird
Subject: Re: Vertex colors rendering
Date: 29 Sep 2025 22:10:31
Message: <68db3c17@news.povray.org>
On 30/09/2025 04:21, Bald Eagle wrote:
> You might not want to color by vertex.
> ...

Thanks for the suggestion, but I would like to keep vertex colors for
more complicated paintings, then trivial gradients.

Increasing number of polygons solves this problem and it looks fine
now, but don't you know how to make colors more saturated ?

Please, look at attachments.
-- 
YB


Post a reply to this message


Attachments:
Download 'scene.png' (42 KB) Download 'scene.pov.txt' (4 KB) Download 'model.zip' (2003 KB)

Preview of image 'scene.png'
scene.png

From: yesbird
Subject: Re: Vertex colors rendering
Date: 29 Sep 2025 22:14:00
Message: <68db3ce8$1@news.povray.org>
On 30/09/2025 04:54, Bald Eagle wrote:
> OK - I think that also maybe the colors for your vertices are done wrong.
> 
> Make your top left and bottom right four vertices white
> top right two vertices blue
> bottom left two vertices green
> 
Thanks, it looks much better !
I've checked it already, but see now any errors, will try again.
-- 
YB


Post a reply to this message

From: yesbird
Subject: Re: Vertex colors rendering
Date: 29 Sep 2025 22:34:34
Message: <68db41ba@news.povray.org>
On 30/09/2025 04:54, Bald Eagle wrote:
> 
> OK - I think that also maybe the colors for your vertices are done wrong.
> 

No, now I see that the problem is not in POV-Ray - 3js renders this
cube the same way (attached). Sorry for inconvenience.
-- 
YB


Post a reply to this message


Attachments:
Download 'cube.png' (420 KB)

Preview of image 'cube.png'
cube.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.