Hello,
I want to get directional light shader information of 3ds max.
I defined light shader structure like below in my surface shader.
I attempted to access this way to shader information.Code:struct MaxDirectionalLight { struct GeneralParameters { miBoolean On; miColor Color; miScalar Multiplier; miScalar Contrast; miScalar SoftenDiffuseEdge; miBoolean AffectDiffuse; miBoolean AffectSpecular; miBoolean AmbientOnly; } generalParameters; struct DirectionalParameters { miScalar HotSpot; miScalar Falloff; miInteger Overshoot; miInteger Shape; miScalar Aspect; } directionalParameters; struct AttenuationParameters { miBoolean UseNearAttenuation; miScalar NearStart; miScalar NearEnd; miBoolean UseFarAttenuation; miScalar FarStart; miScalar FarEnd; miInteger Decay; miScalar DecayRadius; } attenuationParameters; struct ShadowParameters { miBoolean CastShadows; miColor ShadowColor; miScalar ShadowDensity; miBoolean ShadowAffected; miBoolean UseShadowProjector; miTag ShadowProjector; } shadowParameters; struct ProjectorParameters { miBoolean UseProjector; miTag Projector; } projectorParameters; struct AtmosphericShadows { miBoolean AtmospheresCastShadows; miScalar ShadowOpacity; miScalar ShadowAmount; } atmosphericShadows; struct LightIncludeExclude { int i_exclusionList; int n_exclusionList; miTag exclusionList[1]; } lightIncludeExclude; };
But could not to get dirLightData.Code:miTag realLight, shaderTag, shaderName; MaxDirectionalLight* dirLightData; mi_query(miQ_INST_ITEM, NULL, *light, &realLight); mi_query(miQ_LIGHT_SHADER, state, realLight, &shaderTag ); mi_query(miQ_FUNC_PARAM, state, shaderTag, &dirLightData);
Could you tell me how to get light shader information of 3ds Max from surface shader?


Reply With Quote