clipka <ano### [at] anonymousorg> wrote:
> Am 04.11.2016 um 12:59 schrieb LanuHum:
>
> > At textures no name. How to initialize?
>
> I'm not sure what you mean.
>
> POV-Ray's render engine does not use any names -- neither for objects
> nor for textures. That's just a thing used in the parser to make life
> easier for users.
File Scene.pov:
#declare Tex0 = texture {...}
#declare Tex1 = texture {...}
#declare Tex2 = texture {...}
#declare Tex3 = texture {...}
#declare Foo = blender_object { "foo" }
1. Load mesh from Blender. I do not create BlenderMesh. I immediately create a
Povray Mesh2.
#include "core/shape/mesh.h"
Mesh* Object = new Mesh();
...........................
//Mesh uses four texture.
for( i=0; i < 4; i++) Textures[i] = Create_Texture();
or
for( i=0; i < 4; i++) Textures[i] = NULL;
Object->Data = reinterpret_cast<MESH_DATA *>(POV_MALLOC...
Object->Data->Normals = Normals;
Object->Data->Triangles = Triangles;
Object->Data->Vertices = Vertices;
Object->Data->UVCoords = UVCoords;
Object->Textures = Textures; // !!!!!!!!!
Object->Data->Number_Of_Normals = number_of_normals;
Object->Data->Number_Of_Triangles = number_of_triangles;
Object->Data->Number_Of_Vertices = number_of_vertices;
Object->Data->Number_Of_UVCoords = number_of_uvcoords;
Object->Number_Of_Textures = number_of_textures;
2. Parse Scene.pov
char *s;
...
CASE(BLENDER_OBJECT_TOKEN)
Parse_Begin();
s = Parse_C_String();
Object = addBlenderObject(std::string(s));
Object -> Textures[0] = Tex0 // How to implement this?
Object -> Textures[1] = Tex1
Object -> Textures[2] = Tex2
Object -> Textures[3] = Tex3
POV_FREE(s);
Parse_End();
END_CASE
???????? :)
Post a reply to this message
|