Otsapinta-alan laskin

Python-kielen käyttäminen
Post Reply
Xjazz
Posts: 28
Joined: 06.12.2008, 12:57

Otsapinta-alan laskin

Post by Xjazz »

Terve

Tuon fdm4bge projektin tiimoilta poikii kaikenlaista.

Tässä olisi skripti, joka laskee renderöidystä kuvasta objektin tai objektien otsapinta-alan pikselien värien ja määrän perusteella.
Laskenna perustana on referenssi objektin tunnettu pinta-ala sekä väri.

Image

http://fdm4bge.1g.fi/Files/10001/FA/ble ... a_01.blend

ReadMe
# Color-to-Area calculator (wip) by Xjazz
#
# Get the object's visible area from any angle.
#
# No limitations for the object shape or number of the objects.
#
# 0. Disable or move all light sources.
#
# 1. the The green shadeless reference area object normal must point to the camera center.
#
# 2. The green reference area object must be fully visible in camera view.
# Use ONLY a scaling and moving in object mode. Do not 'Apply Scale' function.
#
# 3. The target object must be completely inside of the green reference area.
#
# 4. Render the scene AND when finished, move or zoom the render window a bit.
# For some reason this is needed OR script can find a Render Result.
#
# 5. Run a script and wait the processing.
# The Yellow figure is target object area and black figure is a reference object area.
#
# ALWAYS RENDER THE SCENE BEFORE YOU RUN THE SCRIPT.
#
# High render resolution gives a higher area accuracy
Post Reply