Jump to content
Sign in to follow this  
KNOSSOS

Prepar3D Tweak Assistant

Recommended Posts

Nickbe

Спасибо за быстрый и обстоятельный ответ, всё для себя уяснил.

Share this post


Link to post
Share on other sites
utah77

Юра, а нельзя ли добавить для измнения вот это? Изменяемые значения выделил красным. Это все в cloud.fx. очень важные настройки если летаем днем.
 
float4 colorIntensity = float4(fRed, fGreen, fBlue, saturate(alpha)) * color;
    diffuse = saturate( float4( .85f * colorIntensity.rgb + ( 0.33f * saturate( colorIntensity.rgb - 1 )), colorIntensity.a ));
diffuse.a = lerp(1.00, diffuse.a, fExp);
 
float blendDistance = 3000;  // Clouds will be fully volumize from 3000 meters, reducing to 0 at 6000
 
Out.position = mul(float4(position, 0.8), matWorld);
 
 
 
==========================
Тут изменяется sprite на group
 

/// Calculate the lighting of the clouds based on position of each corner
        GetPointDiffuse(Out.diffuse, position, spriteCenter.xyz, length(positionVector));
 
        position -= clusterOffset.xyz;
 
        Out.position = mul(float4(position, 1.0), matWorld);
    }
#else
 
        /// Calculate the lighting of the clouds based on position of each corner
        GetPointDiffuse( Out.diffuse, position, spriteCenter.xyz, cloudDistance );
 
=======================
 
Под спойлером файлик уже с изменениями (от 3.1, но там разница небольшая)

 

 

//---------------------------------------------------------------------------
// Prepar3d - Shader Effect Files
// Copyright © 2014, Lockheed Martin Corporation
//---------------------------------------------------------------------------

#include "ShaderMacros.h"
#include "ConstantBuffers.fxh"
#include
#include
#include
#define MAX_COLOR_LEVELS 5

shared Texture2DArray txBase : REGISTER(t,0);
shared Texture2D txNoise : REGISTER(t,1);
shared Texture2D txSceneDepth : REGISTER(t,SCENE_DEPTH_TEXTURE_REGISTER);

//perObject
shared cbuffer cbPerObjectCloudData : REGISTER(b,PER_MATERIAL_CB_REGISTER)
{
float fAlpha : packoffset(c0.x);
float fAlphaEdges : packoffset(c0.y);
float fRadius : packoffset(c0.z);
float fCloudExpandScale : packoffset(c0.w);

float fCloudExpandDistance : packoffset(c1.x);
float fCloudFadeDistanceInverse : packoffset(c1.y);
float fCloudFadeDistance : packoffset(c1.z);
float ColorLevelHeightLow : packoffset(c1.w);

float ColorLevelHeightMediumLow : packoffset(c2.x);
float ColorLevelHeightMedium : packoffset(c2.y);
float ColorLevelHeightMediumHigh : packoffset(c2.z);
float ColorLevelHeightHigh : packoffset(c2.w);

float fCloudEndFadeDistance : packoffset(c3.x);
float fCloudExpandSizeScale : packoffset(c3.y);
float fFiller0 : packoffset(c3.z);
float fFiller1 : packoffset(c3.w);

float4 ColorLevelColors[MAX_COLOR_LEVELS] : packoffset(c4);

};

struct VS_OUTPUT
{
float4x4 position : POSITION;
float4x4 diffuse : COLORS;
float4 cornerDots : DOT;
float4 uv : TEXCOORD;
float2 fFogDistance : FOG;
float BaseTextureIndex : TEXCOORD1;
float4 mAlt : ALTITUDE;
};

struct GS_OUTPUT
{
float4 position : SV_POSITION;
float2 uv : TEXCOORD;
float BaseTextureIndex : TEXCOORD1;
float2 localUV : TEXCOORD2;

#if defined(SHD_CLOUD_SHADOWS)
float z : BroughtToYouByTheLatterZ;
#elif defined(SHD_VIEW_CUBEMAP)
float4 diffuse : COLOR;
#else
float eyeDot : TEXCOORD3;
float mAlt : ALTITUDE;
float4 diffuse : COLOR;
float2 fFogDistance : FOG;
#endif

#if defined(SHD_GS_INSTANCING)
uint RTIndex : SV_RenderTargetArrayIndex;
#endif
};

struct PS_INPUT
{
#if !defined(SHD_CLOUD_SHADOWS)
float4 position : SV_POSITION;
#endif
float2 uv : TEXCOORD;
float BaseTextureIndex : TEXCOORD1;
float2 localUV : TEXCOORD2;

#if defined(SHD_CLOUD_SHADOWS)
float z : BroughtToYouByTheLatterZ;
#elif defined(SHD_VIEW_CUBEMAP)
float4 diffuse : COLOR;
#else
float eyeDot : TEXCOORD3;
float mAlt : ALTITUDE;
float4 diffuse : COLOR;
float2 fFogDistance : FOG;
#endif
};

void GetScreenQuadPositions( out float4x3 output, in float width, in float height )
{
float halfWidth = width;
float halfHeight = height;
/// VALUE // Quadrant
output[0].x = -halfWidth; //-1
output[0].y = -halfHeight; //-1
output[0].z = 0;

output[1].x = halfWidth; // 1
output[1].y = -halfHeight; //-1
output[1].z = 0;

output[2].x = -halfWidth; // -1
output[2].y = halfHeight; // 1
output[2].z = 0;

output[3].x = halfWidth; // 1
output[3].y = halfHeight; // 1
output[3].z = 0;
}

void GetPointDiffuse( out float4 diffuse, in float3 corner, in float3 groupCenter )
{
//
// Sun lighting
//
// See bglfp.cpp, g2d_LightCloudFromNormal() - KEEP SHADER IN SYNC!
float3 cloudGroupNormal = normalize( corner.xyz - groupCenter );
float3 facingDirection = cross( cloudGroupNormal, float3( 0, 1, 0 ) );
float fIntensity = max( dot( cb_mLights[sUN_LIGHT].mDirection, cloudGroupNormal ), dot( cb_mLights[sUN_LIGHT].mDirection, facingDirection )) ;

if (fIntensity < -cb_mMedianLine)
{
// The "1.0001" in the line above is a hack to fix a bug
// observed on some hardware. Even though the else branch
// of this if/else was taken a divide by zero in this
// branch (when cb_mMedianLine is 1.0) caused the whole
// shader to go crazy.
fIntensity = cb_mMinIntensity + (cb_mMedianIntensity - cb_mMinIntensity) *
((1 + fIntensity) / (1.0001 - cb_mMedianLine));

}
else
{
fIntensity = cb_mMedianIntensity +
(1 - cb_mMedianIntensity) *
((fIntensity + cb_mMedianLine) / (1 + cb_mMedianLine));
}

float fRed = fIntensity * cb_mCloudDirectional.r + cb_mCloudAmbient.r;
float fGreen = fIntensity * cb_mCloudDirectional.g + cb_mCloudAmbient.g;
float fBlue = fIntensity * cb_mCloudDirectional.b + cb_mCloudAmbient.b;

//
// Height band lighting/coloring
//
// See SwarmCloud.cpp, GetColor() - KEEP SHADER IN SYNC!
float height = corner.y;
float4 baseColor;
float4 topColor;
float baseHeight;
float topHeight;

if (height <= ColorLevelHeightLow)
{
baseColor = ColorLevelColors[0];
topColor = ColorLevelColors[0];
baseHeight = ColorLevelHeightLow;
topHeight = ColorLevelHeightLow + 1; // +1 to avoid division by zero below
}
else if (height <= ColorLevelHeightMediumLow)
{
baseColor = ColorLevelColors[0];
topColor = ColorLevelColors[1];
baseHeight = ColorLevelHeightLow;
topHeight = ColorLevelHeightMediumLow;
}
else if (height <= ColorLevelHeightMedium)
{
baseColor = ColorLevelColors[1];
topColor = ColorLevelColors[2];
baseHeight = ColorLevelHeightMediumLow;
topHeight = ColorLevelHeightMedium;
}
else if (height <= ColorLevelHeightMediumHigh)
{
baseColor = ColorLevelColors[2];
topColor = ColorLevelColors[3];
baseHeight = ColorLevelHeightMedium;
topHeight = ColorLevelHeightMediumHigh;
}
else if (height <= ColorLevelHeightHigh)
{
baseColor = ColorLevelColors[3];
topColor = ColorLevelColors[4];
baseHeight = ColorLevelHeightMediumHigh;
topHeight = ColorLevelHeightHigh;
}
else
{
baseColor = ColorLevelColors[4];
topColor = ColorLevelColors[4];
baseHeight = ColorLevelHeightHigh;
topHeight = ColorLevelHeightHigh + 1; // +1 to avoid division by zero below
}

float s = (height - baseHeight) / (topHeight - baseHeight);
float4 color = lerp(baseColor, topColor, s);

//
// Fade in/out alpha
float distance_from_center = length(corner);
float alpha = 1.0f;

if (fAlpha > 0)
{
// Fading in from or out to the edges
float fMagnitude = 1.3f * fRadius - distance_from_center;
fMagnitude = max(0, fMagnitude);
alpha = fAlpha - fAlphaEdges * (fMagnitude / fRadius);
}
else
{
// Fading out to the core
alpha = -fAlpha - fAlphaEdges * (distance_from_center / fRadius);
}

float4 colorIntensity = float4(fRed, fGreen, fBlue, saturate(alpha)) * color;
diffuse = saturate( float4( 2.5f * colorIntensity.rgb + ( 0.10f * saturate( colorIntensity.rgb - 1 )), colorIntensity.a ));
}

VS_OUTPUT VS(VS_INPUT In)
{
VS_OUTPUT Out = (VS_OUTPUT)0;

float4 spriteCenter = In.vPosition;
float3 groupCenter = In.vNormal.xyz;
float4 packedUV = In.cColor;
float2 packedCorner = In.Tex;
float bankRadian = In.fRBias[0];
float puffRadius = In.fRBias[1];

Out.BaseTextureIndex = GetTextureInstanceData(In.mInstanceIndex).FirstFourIndices.x;

GeoidTranform geoTrans = GetGeoidTranform(In.mInstanceIndex + 2);

// Get round world matrix
matrix matWorld = ComputeRoundWorldMatrix(geoTrans, cb_ViewOrigin);

// Set UV
Out.uv = packedUV;

// Offset the spritecenter with cluster offset. The cluster is a group of sprite to make up
// a cloud. This is needed b/c sometime we draw one cluster at a time to do sorting
float4 clusterOffset = GetCloudClusterOffset(In.mInstanceIndex);

float3x3 rotationMatrix;

#if defined(SHD_CLOUD_SHADOWS)

float3 shadowFacingVector = normalize(cb_mShadowLightDirection);

rotationMatrix[2] = shadowFacingVector;

rotationMatrix[0] = normalize(cross(rotationMatrix[2], float3(0, 1.0f, 0)));

rotationMatrix[1] = normalize(-cross(rotationMatrix[2], rotationMatrix[0]));
#elif defined(SHD_VIEW_CUBEMAP)
// We baked a value [0 or 1] into the w component to tell us if this draw call is per puff
int IsPuffDraw = saturate(clusterOffset.w);
clusterOffset.w = 0.0;
float3 positionVector = -mul(spriteCenter - clusterOffset, matWorld).xyz;
float3 cameraFacingVector = normalize(positionVector);

rotationMatrix[2] = normalize(cameraFacingVector);

rotationMatrix[0] = normalize(cross(rotationMatrix[2], float3(0, 1, 0)));

rotationMatrix[1] = normalize(-cross(rotationMatrix[2], rotationMatrix[0]));

#else

// We baked a value [0 or 1] into the w component to tell us if this draw call is per puff
int IsPuffDraw = saturate(clusterOffset.w);
clusterOffset.w = 0.0;
float3 positionVector = -mul(spriteCenter - clusterOffset, matWorld).xyz;
float3 cameraFacingVector = normalize(positionVector);

float3 screenFacingVector = normalize(-cb_mInverseView[2].xyz);
float cloudDistance = length(positionVector);
float blendDistance = 800; // Clouds will be fully volumize from 3000 meters, reducing to 0 at 6000

float facingBlend = saturate(((blendDistance - cloudDistance) / blendDistance) * IsPuffDraw);

rotationMatrix[2] = normalize(lerp(cameraFacingVector, screenFacingVector, facingBlend));

rotationMatrix[0] = normalize(cross(rotationMatrix[2], float3(0, 1, 0)));

rotationMatrix[1] = normalize(-cross(rotationMatrix[2], rotationMatrix[0]));

matrix worldView = mul(matWorld, cb_mViewToDevice);
#if defined(SHD_NO_NEAR_CLIP)
matrix worldViewProj = mul(worldView, cb_mNoNearProj);
#elif defined(SHD_NO_FAR_CLIP)
matrix worldViewProj = mul(worldView, cb_mNoFarProj);
#else
matrix worldViewProj = mul(worldView, cb_mProjToDevice);
#endif
#endif

Out.diffuse = (float4x4)0;

float4x3 quad = (float4x3)0;
float height = packedCorner.y;
float width = packedCorner.x;
GetScreenQuadPositions(quad, width*0.60, height*0.60);

[unroll]for (int i = 0; i < 4; i++)
{
// Perform rotation
float3 position = mul(quad.xyz, rotationMatrix);
/// Add the sprite center without scale to keep the diffuse color calculation identicle
position = spriteCenter.xyz + position;

#if defined(SHD_CLOUD_SHADOWS)
position = -clusterOffset.xyz + position;
Out.position = mul(float4(position, 1.0), matWorld);

}
#elif defined(SHD_VIEW_CUBEMAP)
/// Calculate the lighting of the clouds based on position of each corner
GetPointDiffuse( Out.diffuse, position, groupCenter.xyz );

position -= clusterOffset.xyz;

Out.position = mul(float4(position, 1.0), matWorld);
}
#else

/// Calculate the lighting of the clouds based on position of each corner
GetPointDiffuse( Out.diffuse, position, groupCenter.xyz );

//Out.diffuse = float4( 0*IsPuffDraw, facingBlend, 0, 1 );

/// Apply cluster offset and scale factor
position -= clusterOffset.xyz;

float4 worldPos = mul( float4(position,1.0), matWorld );
Out.mAlt = worldPos.y;

Out.position = mul( float4(position,1.0), worldViewProj );

// Calculate fade distance and alpha
float fFadeDistance = Out.position.w;
fFadeDistance = min(fFadeDistance, fCloudFadeDistance);
fFadeDistance -= fCloudEndFadeDistance;

float fOneOverRange = rcp( fCloudFadeDistance - fCloudEndFadeDistance );
float fAlphaFade = fFadeDistance * fOneOverRange;

/// Apply fading at the far clip. This prevents clouds popping in/out at the far clip
#if defined(SHD_FADE_AT_FAR_CLIP)
fAlphaFade = FarClipAlphaFade(Out.position.w, fAlphaFade);
#endif
/// Apply a distance fade relative to the camera
Out.diffuse.w *= fAlphaFade;

/// Apply fade when sprite is behind the near clip
////if( Out.position.w < cb_NearClip && Out.position.w > fCloudEndFadeDistance )
////{
//// Out.position.z = 0;
//// Out.position.w = cb_NearClip;
////}
bool bOverrideZ = (Out.position.w < cb_NearClip);
bOverrideZ = bOverrideZ && (Out.position.w > fCloudEndFadeDistance);

Out.position.z *= !bOverrideZ;

float fUseNear = cb_NearClip * bOverrideZ;
Out.position.w = Out.position.w * !bOverrideZ + fUseNear;
Out.cornerDots = 1 - abs( dot( normalize( worldPos.xyz ), cb_mInverseView[ 2 ].xyz ));
}
#endif

#if !defined(SHD_CLOUD_SHADOWS) && !defined(SHD_VIEW_CUBEMAP)
// Compute fog
float3 vSpriteCenter = spriteCenter.xyz - clusterOffset.xyz;
Out.fFogDistance.x = FogVS(float4(vSpriteCenter, 1), matWorld, float4(cb_mEyePoint.xyz, 1));
Out.fFogDistance.y = facingBlend;
#endif

return Out;
}

#if defined(SHD_GS_INSTANCING)
[instance(SHD_GS_INSTANCE_COUNT)]
[maxvertexcount(4)]
void GS(point VS_OUTPUT input[1], inout TriangleStream SpriteStream,
uint InstanceID : SV_GSInstanceID)
#else
[maxvertexcount(4)]
void GS(point VS_OUTPUT input[1], inout TriangleStream SpriteStream)
#endif
{
GS_OUTPUT output;

output.BaseTextureIndex = input[0].BaseTextureIndex;
float2 lowerleft = input[0].uv.xy;
float2 upperright = input[0].uv.zw;

#if defined(SHD_CLOUD_SHADOWS)
output.RTIndex = InstanceID;

// Bottom left
output.position = mul(input[0].position[0], cb_mCloudViewProjection[instanceID]);
output.z = output.position.z; // pass down real z to PS
output.position.z *= saturate(output.position.z); // pancake just in case
output.uv.x = lowerleft.x;
output.uv.y = lowerleft.y;
output.localUV.x = -1;
output.localUV.y = 1;
SpriteStream.Append(output);

// Bottom right
output.position = mul(input[0].position[2], cb_mCloudViewProjection[instanceID]);
output.z = output.position.z; // pass down real z to PS
output.position.z *= saturate(output.position.z); // pancake just in case
output.uv.x = lowerleft.x;
output.uv.y = upperright.y;
output.localUV.x = 1;
output.localUV.y = 1;
SpriteStream.Append(output);

// Top Left
output.position = mul(input[0].position[1], cb_mCloudViewProjection[instanceID]);
output.z = output.position.z; // pass down real z to PS
output.position.z *= saturate(output.position.z); // pancake just in case
output.uv.x = upperright.x;
output.uv.y = lowerleft.y;
output.localUV.x = -1;
output.localUV.y = -1;
SpriteStream.Append(output);

// Top right
output.position = mul(input[0].position[3], cb_mCloudViewProjection[instanceID]);
output.z = output.position.z; // pass down real z to PS
output.position.z *= saturate(output.position.z); // pancake just in case
output.uv.x = upperright.x;
output.uv.y = upperright.y;
output.localUV.x = 1;
output.localUV.y = -1;
SpriteStream.Append(output);

SpriteStream.RestartStrip();
#elif defined(SHD_VIEW_CUBEMAP)

output.RTIndex = InstanceID;

#if defined(SHD_NO_NEAR_CLIP)
matrix viewProj = mul(cb_mViewCubemap[instanceID], cb_mNoNearProj);
#elif defined(SHD_NO_FAR_CLIP)
matrix viewProj = mul(cb_mViewCubemap[instanceID], cb_mNoFarProj);
#else
matrix viewProj = mul(cb_mViewCubemap[instanceID], cb_mProjToDevice);
#endif

// Bottom left
output.position = mul(input[0].position[0], viewProj);
output.diffuse = input[0].diffuse[0];
output.uv.x = lowerleft.x;
output.uv.y = lowerleft.y;
output.localUV.x = -1;
output.localUV.y = 1;
SpriteStream.Append(output);

// Bottom right
output.position = mul(input[0].position[2], viewProj);
output.diffuse = input[0].diffuse[2];
output.uv.x = lowerleft.x;
output.uv.y = upperright.y;
output.localUV.x = 1;
output.localUV.y = 1;
SpriteStream.Append(output);

// Top Left
output.position = mul(input[0].position[1], viewProj);
output.diffuse = input[0].diffuse[1];
output.uv.x = upperright.x;
output.uv.y = lowerleft.y;
output.localUV.x = -1;
output.localUV.y = -1;
SpriteStream.Append(output);

// Top right
output.position = mul(input[0].position[3], viewProj);
output.diffuse = input[0].diffuse[3];
output.uv.x = upperright.x;
output.uv.y = upperright.y;
output.localUV.x = 1;
output.localUV.y = -1;
SpriteStream.Append(output);

SpriteStream.RestartStrip();

#else
output.fFogDistance = input[0].fFogDistance;
output.mAlt = input[0].mAlt.y;

// Bottom left
output.position = input[0].position[0];
output.diffuse = input[0].diffuse[0];
output.eyeDot = input[0].cornerDots[0];
output.uv.x = lowerleft.x;
output.uv.y = lowerleft.y;
output.localUV.x = -1;
output.localUV.y = 1;
SpriteStream.Append(output);

// Bottom right
output.position = input[0].position[2];
output.diffuse = input[0].diffuse[2];
output.eyeDot = input[0].cornerDots[2];
output.uv.x = lowerleft.x;
output.uv.y = upperright.y;
output.localUV.x = 1;
output.localUV.y = 1;
SpriteStream.Append(output);

// Top Left
output.position = input[0].position[1];
output.diffuse = input[0].diffuse[1];
output.eyeDot = input[0].cornerDots[1];
output.uv.x = upperright.x;
output.uv.y = lowerleft.y;
output.localUV.x = -1;
output.localUV.y = -1;
SpriteStream.Append(output);

// Top right
output.position = input[0].position[3];
output.diffuse = input[0].diffuse[3];
output.eyeDot = input[0].cornerDots[3];
output.uv.x = upperright.x;
output.uv.y = upperright.y;
output.localUV.x = 1;
output.localUV.y = -1;
SpriteStream.Append(output);

SpriteStream.RestartStrip();
#endif
}

#if defined(SHD_CLOUD_SHADOWS)
#if USE_VARIANCE_SHADOWS==1
float2 PS(PS_INPUT In): SV_TARGET
{
float2 depthValues = float2(0.0f,0.0f);

float4 cColor = txBase.Sample( samWrap, float3(In.uv,In.BaseTextureIndex) );

[branch]if (cColor.a < 0.5f)
{
discard;
}

depthValues.x = In.z;
depthValues.y = depthValues.x * depthValues.x;

return depthValues;
}
#else
float2 PS(GS_OUTPUT In): SV_TARGET
{
float4 cColor = txBase.Sample( samWrap, float3(In.uv,In.BaseTextureIndex) );
return float2(1.0f-cColor.a,In.z);
}
#endif
#elif defined(SHD_VIEW_CUBEMAP)
float4 PS(GS_OUTPUT In) : SV_TARGET
{
float4 cColor = In.diffuse * txBase.Sample(samWrap, float3(In.uv, In.BaseTextureIndex));

return cColor;
}
#else
float4 PS(PS_INPUT In): SV_TARGET
{
float4 cColor = In.diffuse * txBase.Sample( samWrap, float3(In.uv,In.BaseTextureIndex) );

#define VOLUMIZE
#ifdef VOLUMIZE
if( In.fFogDistance.y > .001f )
{
float3 noise = 0;
float noiseScale = saturate( 1 - ( In.localUV.x * In.localUV.x + In.localUV.y * In.localUV.y )) / 2.75;

[unroll]for(int i =2; i<3; i++)
{
noise += dot( normalize( txNoise.Sample( samWrap, In.uv / i ).rgb ), float3( 0, 1, 0 )) * cb_mCloudDirectional.rgb / 8;
}

cColor.rgb = saturate( cColor.rgb + ( In.fFogDistance.y * noise ) );
//cColor.r = 0;
cColor.a = max( saturate( In.fFogDistance.y * In.eyeDot * noiseScale ), cColor.a );
}
#endif

// Apply IR if active
#if defined(SHD_IR_ACTIVE)
cColor = ApplyIr(cColor);
return FogIR(cColor, In.fFogDistance.x);
#endif //SHD_IR_ACTIVE

//Soft edges.
#if defined(SHD_CLOUD_FADE_AT_Z)
#endif

#if !defined(SHD_NO_FOG)
//Compute fog contribution.
#if defined(SHD_VOLUMETRIC_FOG)
cColor = VolumetricFogPS( In.mAlt, cColor, In.fFogDistance.x / 2.0, cb_mFogDensity, cb_mFogColor.xyz);
#else
cColor = float4( FogPS( cColor.xyz, In.fFogDistance.x / 2.0, cb_mFogDensity, cb_mFogColor.xyz ), cColor.a );
#endif //SHD_VOLUMETRIC_FOG
#endif //!SHD_NO_FOG

DEBUG_MARK(cColor)

return cColor;
}
#endif

 

 

Share this post


Link to post
Share on other sites
KNOSSOS

Юра, а нельзя ли добавить для измнения вот это? 

 

Спасибо за предложения!

с blenddistance понятно,

sprite менять на group - пятнистые облака - тоже в принципе [хотя pe11e попытался этот твик в RSP засунуть, но раскритиковали, сильно на любителя, ИМХО].

mul(float4(position, 0.8), matWorld - ползунок добавить? Или там обязательно 1.0, как в дефолте? Тогда просто галочку с этого твика снять и все.

А вот как обозвать два этих числа и объяснить на что каждое из них в отдельности влияет:  diffuse = saturate( float4( .85f * colorIntensity.rgb + ( 0.33f * saturate( colorIntensity.rgb - 1 )), colorIntensity.a )); ?

Share this post


Link to post
Share on other sites
utah77

sprite менять на group - пятнистые облака - тоже в принципе [хотя pe11e попытался этот твик в RSP засунуть, но раскритиковали, сильно на любителя, ИМХО].

 

Ну да, это на любителя. Лично мне очень нравится, скриншоты все видели.

 

 

 

mul(float4(position, 0.8), matWorld - ползунок добавить? Или там обязательно 1.0, как в дефолте? Тогда просто галочку с этого твика снять и все.

 

По дефолту 0.8. Сорри, да, по дефолту 1.0, перепутал. Больше 1.0 вроде не работает. Да, можно просто вкл/выкл сделать чекбоксом.

 

 

 

А вот как обозвать два этих числа и объяснить на что каждое из них в отдельности влияет:  diffuse = saturate( float4( .85f * colorIntensity.rgb + ( 0.33f * saturate( colorIntensity.rgb - 1 )), colorIntensity.a )); ?

 

А вот хрен знает ))) Этот параметр забеляет облачность и в сочетании с groupCenter очень круто днем выглядит. Также, одновременно с этим, как бы растворяет в горизонте (как в FSX примерно).

Но опять же, повторю, это только для дневного времени настройки плюс я не проверял в 3.2. Сегодня проверю.

Попробуйте использовать мой cloud.fx, в спойлере код.

Share this post


Link to post
Share on other sites
KNOSSOS

 

По дефолту 0.8. Сорри, да, по дефолту 1.0, перепутал. Больше 1.0 вроде не работает. Да, можно просто вкл/выкл сделать чекбоксом.

 

Уже в утилите сделано. Твик называется "Cloud shadows extended size". Этот чекбокс вместо 1.0 0.8 ставит. 

 

.85f * colorIntensity.rgb + ( 0.33f * saturate( colorIntensity.rgb - 1 )) - по 0.85 никаких вопросов, как это назвать и как работает. А вот 0.33 - хз...

Share this post


Link to post
Share on other sites
utah77

Уже в утилите сделано. Твик называется "Cloud shadows extended size". Этот чекбокс вместо 1.0 0.8 ставит. 

 

.85f * colorIntensity.rgb + ( 0.33f * saturate( colorIntensity.rgb - 1 )) - по 0.85 никаких вопросов, как это назвать и как работает. А вот 0.33 - хз...

 

...and raise the second value to increase the saturation (try 0.93f) to make sunrise and sunset colours pop a bit more.

 

Блин, опять откатываюсь на 3.1... это пипец с горизонтом и видимостью. Вот как можно было испортить уже испорченное? ((

Share this post


Link to post
Share on other sites
SkyLam

Вопрос к Юрию по поводу the luminosity of urban areas at night. Прилагаю картинки с выключенным tesselation и с включенным.

В шейдерах не менял подсветку. И не устанавливал орбикс. Всё по дефолту. Видимо орбикс застилает текстурами светимость при включенном tesselation, но вопрос не в этом. Когда включен tesselation, подсветка городов уходит в красный цвет (довольно не приятно). Если поставить орбикс и скорректировать шейдеры, то становиться ещё краснее. Можно ли поменять цвет подсветки ленкласса на более нейтральный при включённом tesselation.

post-79060-0-32601700-1464243387_thumb.png

post-79060-0-94502600-1464243398_thumb.png

Edited by AlexL-81

Share this post


Link to post
Share on other sites
SkyLam

Вот так выглядит город без tesselation. Не правда ли замечательно. Иной вариант печаль (красное пятно)

post-79060-0-81214400-1464244333_thumb.png

Edited by AlexL-81

Share this post


Link to post
Share on other sites
utah77

Вот так у меня сейчас выглядит препар 3.1. Утилитой я не пользуюсь, привык руками уже :)

Моя довольна ;)

 

Share this post


Link to post
Share on other sites
KNOSSOS

Вопрос к Юрию по поводу the luminosity of urban areas at night. Прилагаю картинки с выключенным tesselation и с включенным.

В шейдерах не менял подсветку. И не устанавливал орбикс. Всё по дефолту. Видимо орбикс застилает текстурами светимость при включенном tesselation, но вопрос не в этом. Когда включен tesselation, подсветка городов уходит в красный цвет (довольно не приятно). Если поставить орбикс и скорректировать шейдеры, то становиться ещё краснее. Можно ли поменять цвет подсветки ленкласса на более нейтральный при включённом tesselation.

 

Когда включена тесселяция, в работе детище локхидов - GPUTerrain.fx, где все нововведения по воде, тесселяции и т.п. Когда тесселяция выключена - древний шейдер, наверное, еще Майками сделанный (?) - terrain.fx.

В шейдере локхидов есть такие строчки:

 
   float3 EmissiveColor = txEmissive.Sample(samClamp, Input.TexBase.xyw).xyz;   //Input.Emissive;
   EmissiveColor = (EmissiveColor*EmissiveColor);
 
в которых входной цвет текстуры фактически усиливается по оттенку - краснеет. И становится темнее. 
Просто закомментируйте    EmissiveColor = (EmissiveColor*EmissiveColor);
т.е. чтобы было вот так:
   float3 EmissiveColor = txEmissive.Sample(samClamp, Input.TexBase.xyw).xyz;   //Input.Emissive;
//   EmissiveColor = (EmissiveColor*EmissiveColor);
Зачем нужно было это делать, трудно сказать, но цвета текстуры сильно сдвигаются в красное. Возможно, это сделано для совместимости с аддонами или по другим причинам?
Не для массового потребления, но попробуйте. Возможно, где-то это вылезет на огнях, дорожках, 3D объектах, надо тестить досконально.
 
 
 
 

Вот так у меня сейчас выглядит препар 3.1. Утилитой я не пользуюсь, привык руками уже :)

Моя довольна ;)

 

Да, 3.1 это лучшее что у них было, ИМХО

  • Upvote 1

Share this post


Link to post
Share on other sites
SkyLam
Просто закомментируйте    EmissiveColor = (EmissiveColor*EmissiveColor);
т.е. чтобы было вот так:
   float3 EmissiveColor = txEmissive.Sample(samClamp, Input.TexBase.xyw).xyz;   //Input.Emissive;
//   EmissiveColor = (EmissiveColor*EmissiveColor);

Сработало. Буду тестить с орбиксом.

Share this post


Link to post
Share on other sites
klim86

 Если нужно назначить пост-эффекты на aircrafts cameras или scenario cameras, после их активации утилитой (инсталляции в сим), это можно сделать руками в соответствующих разделах  aircrafts.cfg. Расширение функций по автоматическому управлению PTA всеми возможными камерами не планируется.

 

Юрий, подскажите пожалуйста что нужно добавить в aircrafts.cfg.? Хочу к кастомным видам добавить пост-эффект. Спасибо!

Share this post


Link to post
Share on other sites
KNOSSOS

Юрий, подскажите пожалуйста что нужно добавить в aircrafts.cfg.? Хочу к кастомным видам добавить пост-эффект. Спасибо!

http://www.prepar3d.com/SDKv3/LearningCenter/utilities/camera_configuration/camera_configuration.html

здесь букварь.

В двух словах - для нужного крафта находите в aircraft.cfg секции с камерами CameraDefinition.XXX 

и в секцию прописываете PostProcess00=/....

Share this post


Link to post
Share on other sites
Sins

Вот так у меня сейчас выглядит препар 3.1. Утилитой я не пользуюсь, привык руками уже :)

Моя довольна ;)

 

 

 

Вот! Наконец-то я увидел нормальные облака в Препаре. Буду снова устанавливать Препар, на этот раз с твиками.

Share this post


Link to post
Share on other sites
utah77

Вот! Наконец-то я увидел нормальные облака в Препаре. Буду снова устанавливать Препар, на этот раз с твиками.

 

Просите Юрия, чтобы добавил Saturation настройки в утилиту для cloud.fx, без них не будет нормальных облаков )

И все, что я выше написал, тоже, включая blend и возможность замены спрайтов на группы )

 

Только тогда явно надо будет делать русскую версию, так как зная уровень понимания английского у наших соотечественников в скором времени их препары будут напоминать мультики, типа, «Губка Боб...».

Вообще, Юре надо вторую версию сделать, обозвать ее Сasual P3D tweaks и в центре разместить одну единственную красную кнопку — «Сделать красиво!».

 

А нынешнюю версию обозвать Expert и давать доступ к настройкам только после прохождения тестов на адекватное восприятие окружающего пространства и знания процессов постобработки.

Share this post


Link to post
Share on other sites
KNOSSOS

Вау! Какой фейерверк высокомерия!

И мне, походу, прописали всю биографию на ближайшие полгода... :D

Share this post


Link to post
Share on other sites
utah77

Не, я ж со всем возможным почтением :)

Просто действительно без этих настроек от попкорна даже днем не избавиться. Можно, конечно, размер повышать, но тогда даже очень мощные карты лягут.

Share this post


Link to post
Share on other sites
klim86

http://www.prepar3d.com/SDKv3/LearningCenter/utilities/camera_configuration/camera_configuration.html

здесь букварь.

В двух словах - для нужного крафта находите в aircraft.cfg секции с камерами CameraDefinition.XXX 

и в секцию прописываете PostProcess00=/..

Во, получилось! Спасибо!

Share this post


Link to post
Share on other sites
AKPOM1991

пользователи p3d v3.1 . Скиньте пожалуйста оригинальные файлы GPUTerrain.fx , General.fx , GPUTerrain.fxh из папки ShadersHLSL.

Share this post


Link to post
Share on other sites
klim86

пользователи p3d v3.1 . Скиньте пожалуйста оригинальные файлы GPUTerrain.fx , General.fx , GPUTerrain.fxh из папки ShadersHLSL.

Вот https://cloud.mail.ru/public/EQZ9/AxhCoP7hi

Share this post


Link to post
Share on other sites
Vitali

Вот так у меня сейчас выглядит препар 3.1. Утилитой я не пользуюсь, привык руками уже :)

Моя довольна ;)

 

Уважаемый utah77,видео просто улёт, несколько раз пересматривал, не мог оторваться. У меня такая просьба к вам, не могли-бы вы поделится вашими настройками Пожалуйста? И  всеми там примочками, просто я всегда летал в FSX и решил перейти на Prepar3D,но все там твики, файлы, самому не осилить,но уж очень хочется хотя-бы приблизительную картинку получить,как у вас. Почитал форум Железо у меня почти идентичное с вашим, извините за не скромность!!!! Заранее спасибо!!!

  • Upvote 1

Share this post


Link to post
Share on other sites
Solovey

Уважаемый utah77,видео просто улёт, несколько раз пересматривал, не мог оторваться. У меня такая просьба к вам, не могли-бы вы поделится вашими настройками Пожалуйста? И  всеми там примочками, просто я всегда летал в FSX и решил перейти на Prepar3D,но все там твики, файлы, самому не осилить,но уж очень хочется хотя-бы приблизительную картинку получить,как у вас. Почитал форум Железо у меня почти идентичное с вашим, извините за не скромность!!!! Заранее спасибо!!!

Зачем же так лебезить и заискивать то?

  • Upvote 2

Share this post


Link to post
Share on other sites
Vitali

Зачем же так лебезить и заискивать то?

Послушайте милый человек,никто здесь не лебезит, и никогда  и ни перед кем,а просто  хотел спросить у знающего человека помочь, настроить стимулятор ,потому- что для меня все эти тонкости  по настройки самому не осилить, поможет человек, отлично, нет, так нет, на нет и суда нет.А вежливость, не значит,лебезить, а вы наверное с каким-то комплексом, да?

Share this post


Link to post
Share on other sites
Romchique

просто  хотел спросить у знающего человека помочь, настроить стимулятор

Ну вот если бы Вы удосужились немного почитать ветку, Вы бы прочитали, что человек настроек не даёт, и, в общем-то, он прав. Ибо Вы его настройки примените, у вас получится картинка совершенно другая, а потом Вы же этого человека задолбаете вопросами.

  • Upvote 1
  • Downvote 1

Share this post


Link to post
Share on other sites
Vitali

Ну вот если бы Вы удосужились немного почитать ветку, Вы бы прочитали, что человек настроек не даёт, и, в общем-то, он прав. Ибо Вы его настройки примените, у вас получится картинка совершенно другая, а потом Вы же этого человека задолбаете вопросами.

Ребята, ну вы блин даёте, человек даже ещё не ответил, а вы, один зачем так лебезить,второй вопросами задолбаете, вперёд забегаете, и за кого-то говорите,вот такие как вы наверное и задолбали,активисты блин, просто спросил помочь,нормально и даже не вас, а уже дебаты какие-то пошли, не получится, вернусь в FSX назад, по моему это вы лебезите здесь!!! Дети блин!!!

  • Upvote 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...