[Bf-cycles] Crash on higher vertex count with subd

F Escobar materialesescobar at hotmail.es
Sat Mar 3 09:26:14 CET 2018


@Mohamed Mesh::add_vertex has the same problem

@Brecht I'll try to figure how to do that, if it helps the call stack points to
cycles.exe!_malloc_base Line 34
cycles.exe!_aligned_offset_malloc_base line 133
________________________________
De: Bf-cycles <bf-cycles-bounces at blender.org> en nombre de Brecht Van Lommel <brechtvanlommel at pandora.be>
Enviado: viernes, 2 de marzo de 2018 19:08
Para: Discussion list to assist Cycles render engine developers
Asunto: Re: [Bf-cycles] Crash on higher vertex count with subd

Do you have a backtrace of the crash? I can't immediately think of a reason this would happen.

On Fri, Mar 2, 2018 at 2:33 PM, F Escobar <materialesescobar at hotmail.es<mailto:materialesescobar at hotmail.es>> wrote:
I've tried to create a super basic subd mesh with this code

mesh->subdivision_type = ccl::Mesh::SUBDIVISION_LINEAR;
int numVertex = 3000;
mesh->verts.resize(numVertex);
printf("resized %i\n", numVertex);
for(int i=0;i<numVertex;i++)
mesh->verts[i] = ccl::make_float3(0, 0, 0);

int indices[3];
indices[0] = 0;
indices[1] = 1;
indices[2] = 2;
mesh->reserve_subd_faces(1, 0, 3);
mesh->add_subd_face(indices, 3, 0, false);

if (!mesh->subd_params) {
mesh->subd_params = new ccl::SubdParams(mesh);
}
ccl::SubdParams& sdparams = *mesh->subd_params;
sdparams.camera = scene->camera;

ccl::Object *object = new ccl::Object();
object->mesh = mesh;
scene->objects.push_back(object);

And yes... it only should generate one triangle, btw it shouldn't be rendered since all the vertex are in the same place (0,0,0) but that is not the question

If I change numVertex  from 3000 to 300 it doesn't crash so it is related to the amount of vertex but anyway 3k is a pretty low amount.

Any idea on this?

Regards, F.


_______________________________________________
Bf-cycles mailing list
Bf-cycles at blender.org<mailto:Bf-cycles at blender.org>
https://lists.blender.org/mailman/listinfo/bf-cycles


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-cycles/attachments/20180303/bd077d03/attachment.html>


More information about the Bf-cycles mailing list