Author Topic: Vertex colouring from last jPCT-AE version  (Read 3464 times)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Vertex colouring from last jPCT-AE version
« Reply #15 on: October 29, 2014, 05:55:06 pm »
You have to enable transparency on the Object3D and assign an alpha value that fits to the fourth component of your vertex color.

Offline mxar

  • int
  • **
  • Posts: 73
    • View Profile
Re: Vertex colouring from last jPCT-AE version
« Reply #16 on: October 30, 2014, 12:23:49 pm »
thanks

Offline mxar

  • int
  • **
  • Posts: 73
    • View Profile
Re: Vertex colouring from last jPCT-AE version
« Reply #17 on: November 07, 2014, 10:51:08 am »
Hi again,

how can i apply vertex normals to  object3D when i call  this constructor ?

 Object3D object3D = Object3D(float[] coordinates, float[] uvs, int[] indices, int textureId)

Also ,do you know if .3ds model can have embedded  textute images?

I mean if it is possible  the texture images  not be  separated from the .3ds file.

Thanks in advance.





Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Vertex colouring from last jPCT-AE version
« Reply #18 on: November 07, 2014, 12:18:53 pm »
You can't. That constructor doesn't support vertex normals. By default, jPCT calculates the vertex normals on its own. About the texture inside a 3ds file: No, not as far as i know.

Offline mxar

  • int
  • **
  • Posts: 73
    • View Profile
Re: Vertex colouring from last jPCT-AE version
« Reply #19 on: November 07, 2014, 09:34:03 pm »
OK, thanks.

Offline mxar

  • int
  • **
  • Posts: 73
    • View Profile
Re: Vertex colouring from last jPCT-AE version
« Reply #20 on: November 11, 2014, 08:47:34 am »

Hi again,

there are cases vertex normal are pre-known. In such case, these normals describe the real-world object more accurately than the calculated ones.

Is there a way to give the jPCT-AE engine the known normal?

Can I use vertex or fragment shaders to use the pre-known vertex normals when building Object3D models with this constructor?


 Object3D object3D = Object3D(float[] coordinates, float[] uvs, int[] indices, int textureId)

Thanks in advance



Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Vertex colouring from last jPCT-AE version
« Reply #21 on: November 11, 2014, 08:21:25 pm »
Try this version: http://jpct.de/download/beta/jpct_ae.jar

I've added a new constructor that takes an additional normals arrays of the same size as the coordinates array and applies it.

Offline mxar

  • int
  • **
  • Posts: 73
    • View Profile
Re: Vertex colouring from last jPCT-AE version
« Reply #22 on: November 12, 2014, 10:02:37 am »
Many thanks,

 this beta version is exactly the same with 1.29 version?

 The addition of new Object3D constructor is the only difference with version 1.29?

Thanks in advance

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Vertex colouring from last jPCT-AE version
« Reply #23 on: November 12, 2014, 10:13:35 am »
Yes, more or less. It also includes a correction in the spelling of the createPyramid() method in ExtendedPrimitives, but other than that, it's the same thing.

Offline mxar

  • int
  • **
  • Posts: 73
    • View Profile
Re: Vertex colouring from last jPCT-AE version
« Reply #24 on: November 12, 2014, 10:15:23 am »
Ok

thanks