Mesh poly intelligent optimization

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
caperaven
Posts: 0
Joined: Fri Nov 12, 2004 12:04 pm

Mesh poly intelligent optimization

Post by caperaven »

Is there a script that can optimize a mesh poly count.
If you take a quad and you sub devide it a few times and you run this script you should end up with a quad again.

This script should try to reduce polycount to absolute min with out loosing detail on the model. Spesifically looking at something like using it on a terrain generated from noise. you sit with a lot of faces that could easy become one face.

I think such a script would add great value to blender.

Do you know of such a script or internal blender function that will "weld" faces intelligently?

z3r0_d
Posts: 289
Joined: Wed Oct 16, 2002 2:38 am
Contact:

Post by z3r0_d »

there isn't anything other than the decimator [in the edit buttons, move the slider... you loose your uv coords, material assignments, vertex colors and probably some other things]

which has some bugs I dont' think have been worked out [or dicussed?] with large nonconvex flat regions.

doing this in python would be too slow.

halibut
Posts: 0
Joined: Fri Apr 25, 2003 2:02 pm
Contact:

Post by halibut »

In object mode, under the edit buttons there is a decimater function. This sort of does what you are looking for but not very well.

caperaven
Posts: 0
Joined: Fri Nov 12, 2004 12:04 pm

Post by caperaven »

I know about the decimator.
However for this you have to indicate the target poly count.
You will also loose detail.

What I am talking about will try to optimize intelligently to the lowest poly count practical with out loosing detail.

If I may make such a request, I think such a tool would be well received and be very popular amoung those who share a similar interest in lowest possible count / but detaild polies.

z3r0_d
Posts: 289
Joined: Wed Oct 16, 2002 2:38 am
Contact:

Post by z3r0_d »

caperaven wrote:I know about the decimator.
However for this you have to indicate the target poly count.
You will also loose detail.

What I am talking about will try to optimize intelligently to the lowest poly count practical with out loosing detail.

If I may make such a request, I think such a tool would be well received and be very popular amoung those who share a similar interest in lowest possible count / but detaild polies.
you could probably make a python script to generate this "ideal polycount" for when using the decimator.

I have a mesh library I'd use for that, but not with me at the moment.

well anway, what you are really asking for is a decimator which takes for input the angle across an edge, and decimates until that angle is exceeded on all edges [set it to zero and you shouldn't loose any detail]. such a decimator would probably have other inputs, but this is not the ideal techique for polygon reduction anyway.

I don't think the "loose extra polygons only" feature would be very useful. Automatic polygon reduction tools NEVER produce meshes which are user-friendly, and they also very frequently produce meshes which aren't lit well with vertex lighting. A good artist ought to be able to manage their own flat regions, but hopefully in a few releases they will be aided by real NGONs like in wings3d.

caperaven
Posts: 0
Joined: Fri Nov 12, 2004 12:04 pm

Post by caperaven »

Thanks dude.

I will do this manually in meen time.
I basically use blender not for final production, but as a modeling tool to export. Using my own renderer that does some fancy footing for optimization in real time rendering.

For this the lowest possible poly count is always a bonus.
But for now I will just stick t manual rip out and replace routines.

Thaks anyways

Post Reply