Ejemplo n.º 1
0
static PassType get_pass_type(BL::RenderPass b_pass)
{
	switch(b_pass.type()) {
		case BL::RenderPass::type_COMBINED:
			return PASS_COMBINED;

		case BL::RenderPass::type_Z:
			return PASS_DEPTH;
		case BL::RenderPass::type_NORMAL:
			return PASS_NORMAL;
		case BL::RenderPass::type_OBJECT_INDEX:
			return PASS_OBJECT_ID;
		case BL::RenderPass::type_UV:
			return PASS_UV;
		case BL::RenderPass::type_VECTOR:
			return PASS_MOTION;
		case BL::RenderPass::type_MATERIAL_INDEX:
			return PASS_MATERIAL_ID;

		case BL::RenderPass::type_DIFFUSE_DIRECT:
			return PASS_DIFFUSE_DIRECT;
		case BL::RenderPass::type_GLOSSY_DIRECT:
			return PASS_GLOSSY_DIRECT;
		case BL::RenderPass::type_TRANSMISSION_DIRECT:
			return PASS_TRANSMISSION_DIRECT;

		case BL::RenderPass::type_DIFFUSE_INDIRECT:
			return PASS_DIFFUSE_INDIRECT;
		case BL::RenderPass::type_GLOSSY_INDIRECT:
			return PASS_GLOSSY_INDIRECT;
		case BL::RenderPass::type_TRANSMISSION_INDIRECT:
			return PASS_TRANSMISSION_INDIRECT;

		case BL::RenderPass::type_DIFFUSE_COLOR:
			return PASS_DIFFUSE_COLOR;
		case BL::RenderPass::type_GLOSSY_COLOR:
			return PASS_GLOSSY_COLOR;
		case BL::RenderPass::type_TRANSMISSION_COLOR:
			return PASS_TRANSMISSION_COLOR;

		case BL::RenderPass::type_EMIT:
			return PASS_EMISSION;
		case BL::RenderPass::type_ENVIRONMENT:
			return PASS_BACKGROUND;
		case BL::RenderPass::type_AO:
			return PASS_AO;
		case BL::RenderPass::type_SHADOW:
			return PASS_SHADOW;

		case BL::RenderPass::type_DIFFUSE:
		case BL::RenderPass::type_COLOR:
		case BL::RenderPass::type_REFRACTION:
		case BL::RenderPass::type_SPECULAR:
		case BL::RenderPass::type_REFLECTION:
		case BL::RenderPass::type_MIST:
			return PASS_NONE;
	}
	
	return PASS_NONE;
}
Ejemplo n.º 2
0
static PassType get_pass_type(BL::RenderPass b_pass)
{
	switch(b_pass.type()) {
		case BL::RenderPass::type_COMBINED:
			return PASS_COMBINED;

		case BL::RenderPass::type_Z:
			return PASS_DEPTH;
		case BL::RenderPass::type_MIST:
			return PASS_MIST;
		case BL::RenderPass::type_NORMAL:
			return PASS_NORMAL;
		case BL::RenderPass::type_OBJECT_INDEX:
			return PASS_OBJECT_ID;
		case BL::RenderPass::type_UV:
			return PASS_UV;
		case BL::RenderPass::type_VECTOR:
			return PASS_MOTION;
		case BL::RenderPass::type_MATERIAL_INDEX:
			return PASS_MATERIAL_ID;

		case BL::RenderPass::type_DIFFUSE_DIRECT:
			return PASS_DIFFUSE_DIRECT;
		case BL::RenderPass::type_GLOSSY_DIRECT:
			return PASS_GLOSSY_DIRECT;
		case BL::RenderPass::type_TRANSMISSION_DIRECT:
			return PASS_TRANSMISSION_DIRECT;
		case BL::RenderPass::type_SUBSURFACE_DIRECT:
			return PASS_SUBSURFACE_DIRECT;

		case BL::RenderPass::type_DIFFUSE_INDIRECT:
			return PASS_DIFFUSE_INDIRECT;
		case BL::RenderPass::type_GLOSSY_INDIRECT:
			return PASS_GLOSSY_INDIRECT;
		case BL::RenderPass::type_TRANSMISSION_INDIRECT:
			return PASS_TRANSMISSION_INDIRECT;
		case BL::RenderPass::type_SUBSURFACE_INDIRECT:
			return PASS_SUBSURFACE_INDIRECT;

		case BL::RenderPass::type_DIFFUSE_COLOR:
			return PASS_DIFFUSE_COLOR;
		case BL::RenderPass::type_GLOSSY_COLOR:
			return PASS_GLOSSY_COLOR;
		case BL::RenderPass::type_TRANSMISSION_COLOR:
			return PASS_TRANSMISSION_COLOR;
		case BL::RenderPass::type_SUBSURFACE_COLOR:
			return PASS_SUBSURFACE_COLOR;

		case BL::RenderPass::type_EMIT:
			return PASS_EMISSION;
		case BL::RenderPass::type_ENVIRONMENT:
			return PASS_BACKGROUND;
		case BL::RenderPass::type_AO:
			return PASS_AO;
		case BL::RenderPass::type_SHADOW:
			return PASS_SHADOW;

		case BL::RenderPass::type_DIFFUSE:
		case BL::RenderPass::type_COLOR:
		case BL::RenderPass::type_REFRACTION:
		case BL::RenderPass::type_SPECULAR:
		case BL::RenderPass::type_REFLECTION:
			return PASS_NONE;
#ifdef WITH_CYCLES_DEBUG
		case BL::RenderPass::type_DEBUG:
		{
			if(b_pass.debug_type() == BL::RenderPass::debug_type_BVH_TRAVERSAL_STEPS)
				return PASS_BVH_TRAVERSAL_STEPS;
			break;
		}
#endif
	}
	
	return PASS_NONE;
}
Ejemplo n.º 3
0
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Get Blender render-pass type translated to Octane pass type
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
inline Passes::PassTypes BlenderSession::get_octane_pass_type(BL::RenderPass b_pass) {
	switch(b_pass.type()) {
		case BL::RenderPass::type_COMBINED:
            return Passes::COMBINED;

        case BL::RenderPass::type_EMIT:
            return Passes::EMIT;
        case BL::RenderPass::type_ENVIRONMENT:
            return Passes::ENVIRONMENT;
        case BL::RenderPass::type_DIFFUSE_DIRECT:
            return Passes::DIFFUSE_DIRECT;
        case BL::RenderPass::type_DIFFUSE_INDIRECT:
            return Passes::DIFFUSE_INDIRECT;

        case BL::RenderPass::type_REFLECTION:
            if(scene->passes->reflection_direct_pass)
                return Passes::REFLECTION_DIRECT;
            else if(scene->passes->reflection_indirect_pass)
                return Passes::REFLECTION_INDIRECT;
            else
                return Passes::LAYER_REFLECTIONS;

        case BL::RenderPass::type_REFRACTION:
            return Passes::REFRACTION;
        case BL::RenderPass::type_TRANSMISSION_COLOR:
            return Passes::TRANSMISSION;
        case BL::RenderPass::type_SUBSURFACE_COLOR:
            return Passes::SSS;

        case BL::RenderPass::type_NORMAL:
            if(scene->passes->geom_normals_pass)
                return Passes::GEOMETRIC_NORMAL;
            else if(scene->passes->shading_normals_pass)
                return Passes::SHADING_NORMAL;
            else
                return Passes::VERTEX_NORMAL;

        case BL::RenderPass::type_Z:
            return Passes::Z_DEPTH;
        case BL::RenderPass::type_MATERIAL_INDEX:
            return Passes::MATERIAL_ID;
        case BL::RenderPass::type_UV:
            return Passes::UV_COORD;
        case BL::RenderPass::type_OBJECT_INDEX:
            return Passes::OBJECT_ID;
        case BL::RenderPass::type_AO:
            return Passes::AMBIENT_OCCLUSION;

        case BL::RenderPass::type_SHADOW:
            if(scene->passes->layer_shadows_pass)
                return Passes::LAYER_SHADOWS;
            else if(scene->passes->layer_black_shadows_pass)
                return Passes::LAYER_BLACK_SHADOWS;
            else
                return Passes::LAYER_COLOR_SHADOWS;

        case BL::RenderPass::type_VECTOR:
		case BL::RenderPass::type_DIFFUSE_COLOR:
		case BL::RenderPass::type_GLOSSY_COLOR:
		case BL::RenderPass::type_GLOSSY_INDIRECT:
		case BL::RenderPass::type_TRANSMISSION_INDIRECT:
		case BL::RenderPass::type_GLOSSY_DIRECT:
		case BL::RenderPass::type_TRANSMISSION_DIRECT:
		case BL::RenderPass::type_DIFFUSE:
		case BL::RenderPass::type_COLOR:
		case BL::RenderPass::type_SPECULAR:
		case BL::RenderPass::type_MIST:
            return Passes::PASS_NONE;
        default:
            return Passes::PASS_NONE;
	}
    return Passes::PASS_NONE;
} //get_octane_pass_type()