Page 1 of 2

Problem in Blendigo. Material_Index error (RESOLVED)

Posted: Thu Nov 20, 2008 6:35 pm
by ZachZJG
When i try to render my scene, this error occurs: Image

i don't know why. I've removed doubles and recalculated normals on everything. I can't find any mention of this error anywhere else on the Indigo forums.

If someone could download the blend files and then get it to work, it would be greatly appreciated. Just tell me what to fix.

thanks in advance.

Posted: Thu Nov 20, 2008 8:33 pm
by SmartDen
version please

Posted: Fri Nov 21, 2008 3:20 am
by ZachZJG
SmartDen wrote:version please
sorry, forgot about that.

Blendigo 1.1.5
Indigo 1.1.14


UPDATE: Now Blendigo 1.1.13 and Indigo 1.1.13

Posted: Fri Nov 21, 2008 7:33 am
by palawat
If you're in the learning stage (like I am), make sure that both Indigo and Blendigo version are matched, ie. try Indigo 1.1.13 with Blendigo 1.1.13

As for the time being, SmartDen is ironing Blendigo 1.1.13 but you can still play with the latest release. Just make sure you read the 1.1.13 thread for some issues you might encounter.

Hope this helps.

Posted: Fri Nov 21, 2008 12:12 pm
by ZachZJG
Ok i changed everything to 1.1.13 but I still get the "material_index is out of bounds" error.

Update: Ok so i removed the chair model and it starts to work again. (at the time of this posting the renderer has finished the part where it says "Done initial warmup." the render itself has not yet started.)

that narrows it down to the chair model that had the out of bounds material thing. Anybody know what that means?

Posted: Fri Nov 21, 2008 12:24 pm
by ZachZJG
Update to my above post:
Now the render started, but everything is all black. I'll give it some more time, but this is unusual.

Posted: Fri Nov 21, 2008 9:20 pm
by SmartDen
your glass has no volume ;)

Posted: Sat Nov 22, 2008 3:26 am
by ZachZJG
SmartDen wrote:your glass has no volume ;)
But it's not the glass that's the problem. I'm rendering just the floor, table, and glass and it's fine. Although the glass has a weird black outline. The lack of volume may be causing that outline. So thanks for that tip.


The problem is the chair model. It is what's causing the error.

Can somebody please look at the blend file and see what is wrong?

if not, how do you reduce the # of triangles in a mesh without changing its look/quality?

Posted: Sat Nov 22, 2008 4:52 am
by SmartDen
ZachZJG wrote:Update to my above post:
Now the render started, but everything is all black. I'll give it some more time, but this is unusual.
are you kidding?! GLASS IN THE WINDOW HAVE NO VOLUME, therefor all's black

Posted: Sat Nov 22, 2008 11:49 am
by ZachZJG
I thought you meant the glass on the table. Ok that helps me when i get the final render, but what about the error i get? I narrowed it down to the chair model, but I don't see what is wrong with it.

Everything renders without the chair, but with the chair I get the error.

I also can't render the chair by itself.

what exactly is a triangle material_index?

Posted: Sat Nov 22, 2008 4:34 pm
by Big Fan
here is a quick fix up for indigo 1.1.14 should be ok for other versions just dont use my script :wink:

Items fixed:
exit portal - flipped normal - must be inward (also tidied to be rectangular - but not important)
end wall - tidied up overlapping geometry around window and wall end - gave edge split modifier
window glass plane - deleted (if you did have glass sheet it needs to be offset from the portal by at least the "nudge" distance)
chair - removed doubles and separated mesh parts with different materials
walls - extruded to make light tight at corners
table legs - convert curves to meshes
floor - apply scale and rotation
environment -apply world scale of 1/10th
removed various redundant object/material shares
(sorry materials are slightly different - removed textures for the quickie trial render - need to do these to suit your blendigo version)

+ maybe other stuff cant remember ATM
HTH

Posted: Sat Nov 22, 2008 11:20 pm
by ZachZJG
Thank you so much, Big Fan.

So whenever an object results in a material_index error, I should remove doubles and seperate it into smaller meshes?

P.S. Thanks for tidying up my wall modeling. I am not very good at modeling.

Posted: Sun Nov 23, 2008 7:21 am
by Big Fan
the 'degenerate triangles' message in indigo is usually an indicator of 'doubles' in the blender mesh
-you should remove doubles where ever you get that warning as a first solution - it usually fixes it
-sometimes it happens because the modelling is otherwise 'unusual' - your wall window could be a candidate.
get into the habit of 'removing doubles' and 'applying scale and rotation' in your scene preparation

I havent looked to see how smartden has changed his script code lately but the material index error probably is related to having a mesh in blender with multiple materials assigned
In this case to fix it I just separated the parts of the mesh according to material -ie its not the size thats the issue...
You can do this in edit mode using the 'link and materials' panel to select the vertices with the same material then shortcut "P"
Most probably smartden should investigate the issue properly.

BTW another pointer- be careful not to overdo the degree of subsurf - it can slow down blendigo export a lot to generate a lot of most likely unnecessary triangles
the chair leather is a case in point - you have edge loops near the corners that restrict the rounding of the object during subsurf and the object is pretty prismatic anyway so a ss of 2 doesnt achieve much

keep up the good work
its a pity the blendigo wiki is still not restored after the site hack -it might be helpful as a newbie to read

Posted: Sun Nov 23, 2008 8:13 am
by fused
Big Fan wrote:the 'degenerate triangles' message in indigo is usually an indicator of 'doubles' in the blender mesh
thats not correct. IIRC degenerate polygons are polygons where the area is 0.

Posted: Sun Nov 23, 2008 8:18 am
by Borgleader
fused wrote:
Big Fan wrote:the 'degenerate triangles' message in indigo is usually an indicator of 'doubles' in the blender mesh
thats not correct. IIRC degenerate polygons are polygons where the area is 0.
you're both correct. i think. doubles are two vertices so close theyre "in the same spot". by removing doubles you turn these two vertices into one. hence removing degenerate triangles in most/all cases.

degenerate triangles which are polygons where the area is 0.