Vertex colouring from last jPCT-AE version

Started by mxar, September 29, 2014, 11:57:20 AM

Previous topic - Next topic

EgonOlsen

You have to enable transparency on the Object3D and assign an alpha value that fits to the fourth component of your vertex color.


mxar

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.





EgonOlsen

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.


mxar


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



EgonOlsen

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.

mxar

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

EgonOlsen

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.