Skip to content

Commit a25ac8c

Browse files
committed
Packed Textures & Outlet Cleanup
Adjusted outlet environment instance lod for mobile, rebuilt the textures, and cleaned up some problem spots. Packed GrassCardsA and GrassClusterA's Card
1 parent bafaa1e commit a25ac8c

17 files changed

+23
-22
lines changed

docs/js/pxlNavLoader.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ const loaderPhrases = [
5050
// These can be adjusted from your `pxlRoom` but easily set defaults here
5151
const userSettings = Object.assign({}, pxlUserSettings);
5252
userSettings['height']['standing'] = 22.5; // Standing height in units; any camera in your room's FBX will override this height once loaded
53-
userSettings['height']['stepSize'] = 5; // Max step height in units
53+
userSettings['height']['stepSize'] = 4.5; // Max step height in units
5454
userSettings['movement']['scalar'] = 1.1; // Overall movement rate scalar
55-
userSettings['movement']['max'] = 12.0; // Max movement speed
56-
userSettings['movement']['easing'] = 0.55; // Easing rate between Step() calls
55+
userSettings['movement']['max'] = 10.0; // Max movement speed
56+
userSettings['movement']['easing'] = 0.75; // Easing rate between Step() calls
5757
userSettings['look']['mobile']['invert'] = true; // Invert the look controls on mobile devices
5858
userSettings['headBounce']['height'] = 0.3; // Bounce magnitude in units
59-
userSettings['headBounce']['rate'] = 0.025; // Bounce rate per Step()
59+
userSettings['headBounce']['rate'] = 0.04; // Bounce rate per Step()
6060
userSettings['headBounce']['easeIn'] = 0.03; // When move key is pressed, the ease into bounce; `bounce * ( boundInf + easeIn )`
6161
userSettings['headBounce']['easeOut'] = 0.95; // When move key is let go, the ease back to no bounce; `bounce * easeOut`
62-
userSettings['jump']['impulse'] = 0.625; // Jump impulse force applied to the player while holding the jump button
63-
userSettings['jump']['holdMax'] = 2.65; // Max influence of holding the jump button on current jump; in seconds
62+
userSettings['jump']['impulse'] = 0.75; // Jump impulse force applied to the player while holding the jump button
63+
userSettings['jump']['holdMax'] = 2.5; // Max influence of holding the jump button on current jump; in seconds
6464
userSettings['jump']['repeatDelay'] = 0.085; // Delay between jumps when holding the jump button
65-
userSettings['gravity']['ups'] = 0.30; // Units per Step() per Step()
65+
userSettings['gravity']['ups'] = 0.5; // Units per Step() per Step()
6666
userSettings['gravity']['max'] = 18.5; // Max gravity rate
6767

6868
// -- -- --
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

docs/js/pxlRooms/CampfireEnvironment/CampfireEnvironment.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ export class CampfireEnvironment extends RoomEnvironment{
789789
grassClusterUniforms.intensity.value = this.mobile ? 2.25 : 2.0; // Lower intensity for mobile devices
790790
grassCardsAUniforms.noiseTexture.value = this.pxlUtils.loadTexture( this.assetPath+"Noise_UniformWebbing.jpg" );
791791
grassCardsAUniforms.diffuse.value = this.pxlUtils.loadTexture( this.assetPath+"grassCardsA_diffuse.webp" );
792-
grassCardsAUniforms.alphaMap.value = this.pxlUtils.loadTexture( this.assetPath+"grassCardsA_alpha.jpg" );
792+
grassCardsAUniforms.alphaMap.value = this.pxlUtils.loadTexture( this.assetPath+"grassCardsA_mask.jpg" );
793793

794794

795795
let grassCardSettings = {
@@ -832,8 +832,8 @@ export class CampfireEnvironment extends RoomEnvironment{
832832
}]
833833
)
834834
grassClusterCardsUniforms.noiseTexture.value = this.pxlUtils.loadTexture( this.assetPath+"Noise_UniformWebbing.jpg" );
835-
grassClusterCardsUniforms.rgbMap.value = this.pxlUtils.loadTexture( this.assetPath+"grassClusterA_cards_diffuse.webp", null, {'encoding':SRGBColorSpace} );
836-
grassClusterCardsUniforms.alphaMap.value = this.pxlUtils.loadTexture( this.assetPath+"grassClusterA_cards_mask.jpg" );
835+
grassClusterCardsUniforms.rgbMap.value = this.pxlUtils.loadTexture( this.assetPath+"grassCardsA_diffuse.webp", null, {'encoding':SRGBColorSpace} );
836+
grassClusterCardsUniforms.alphaMap.value = this.pxlUtils.loadTexture( this.assetPath+"grassCardsA_mask.jpg" );
837837

838838
let grassLODSettings = {
839839
'depthScalar': 0.004,
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

docs/js/pxlRooms/OutletEnvironment/OutletEnvironment.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class OutletEnvironment extends RoomEnvironment{
7171
this.pxlCamFOV={ 'PC':60, 'MOBILE':80 };
7272

7373
// Near-Far Clipping Planes for your room
74-
this.pxlCamNearClipping = 3;
74+
this.pxlCamNearClipping = 2.25;
7575
this.pxlCamFarClipping = 12000;
7676

7777
// Room Fog Settings
@@ -362,7 +362,7 @@ builBugs(){
362362
)
363363
grassCardsAUniforms.noiseTexture.value = this.pxlUtils.loadTexture( this.assetPath+"Noise_UniformWebbing.jpg" );
364364
grassCardsAUniforms.diffuse.value = this.pxlUtils.loadTexture( this.assetPath+"grassCardsA_diffuse.webp" );
365-
grassCardsAUniforms.alphaMap.value = this.pxlUtils.loadTexture( this.assetPath+"grassCardsA_alpha.jpg" );
365+
grassCardsAUniforms.alphaMap.value = this.pxlUtils.loadTexture( this.assetPath+"grassCardsA_mask.jpg" );
366366

367367
let grassCardSettings = {
368368
'buildAlpha' : true,
@@ -444,7 +444,6 @@ builBugs(){
444444
[
445445
UniformsLib[ "lights" ],
446446
{
447-
'dataTexture' : { type:'t', value: null },
448447
'coastLineTexture' : { type:'t', value: null },
449448
'rippleTexture' : { type:'t', value: null },
450449
'noiseTexture' : { type:'t', value: null },
@@ -453,7 +452,6 @@ builBugs(){
453452
'intensity': { type:'f', value:1 },
454453
}]
455454
)
456-
waterWayUniforms.dataTexture.value = this.pxlUtils.loadTexture( this.assetPath+"WaterWay_Data.webp", textureOptionsSRGB );
457455
waterWayUniforms.coastLineTexture.value = this.pxlUtils.loadTexture( this.assetPath+"WaterWay_CoastLine.webp" );
458456
waterWayUniforms.rippleTexture.value = this.pxlUtils.loadTexture( this.assetPath+"WaterRipples_CoastalB.jpg" );
459457
waterWayUniforms.noiseTexture.value = this.pxlUtils.loadTexture( this.assetPath+"Noise_UniformWebbing.jpg", textureOptionsRepeat );
@@ -484,15 +482,13 @@ builBugs(){
484482
[
485483
UniformsLib[ "lights" ],
486484
{
487-
'dataTexture' : { type:'t', value: null },
488485
'rippleTexture' : { type:'t', value: null },
489486
'noiseTexture' : { type:'t', value: null },
490487
'fogColor' : { type: "c", value: this.fogColor },
491488
'rate': { type:'f', value:1 },
492489
'intensity': { type:'f', value:1 },
493490
}]
494491
)
495-
creekWaterUniforms.dataTexture.value = this.pxlUtils.loadTexture( this.assetPath+"CreekWater_Data.webp" );
496492
creekWaterUniforms.rippleTexture.value = this.pxlUtils.loadTexture( this.assetPath+"WaterRipples_CoastalB.jpg" );
497493
creekWaterUniforms.noiseTexture.value = this.pxlUtils.loadTexture( this.assetPath+"Noise_UniformWebbing.jpg" );
498494

docs/js/pxlRooms/OutletEnvironment/Shaders/waterWay.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ export function waterWayFrag(){
7373
uniform vec2 time;
7474
uniform float intensity;
7575
uniform float rate;
76-
uniform sampler2D dataTexture;
7776
uniform sampler2D coastLineTexture;
7877
uniform sampler2D rippleTexture;
7978
uniform sampler2D noiseTexture;
@@ -96,15 +95,20 @@ export function waterWayFrag(){
9695
vec3 pos = vPos*0.001;
9796
vec2 uv = vUv;
9897
99-
vec3 dataCd = texture2D( dataTexture, vUv ).rgb;
98+
float depth = min(1.0, max(0.0, gl_FragCoord.z / gl_FragCoord.w * .00015 )) * step( .930, gl_FragCoord.z );
99+
depth = pow( depth, 1.0-depth);
100+
101+
float depthFade = clamp( 2.-(depth*depth), 0.0, 1.0);
102+
depthFade *= depthFade*depthFade;
103+
100104
101105
uv.x = ( pos.x*1.2-timer*.19 );
102106
uv.y = ( pos.z*1.9+timer*.9 );
103107
104108
vec3 nCd=(texture2D(noiseTexture,uv).rgb-.5);
105109
106-
uv.x = ( pos.x*10.81-timer*17.1 + nCd.x*dataCd.r + nCd.z + dataCd.b );
107-
uv.y = ( pos.z*7.51+timer*10.1 + nCd.y*1.50 - nCd.x + dataCd.g );
110+
uv.x = ( pos.x*10.81-timer*17.1 + nCd.x * depth + nCd.z );
111+
uv.y = ( pos.z*7.51+timer*10.1 + nCd.y*1.50 - nCd.x );
108112
nCd = texture2D( noiseTexture, uv*.0135 ).rgb*.65+.35;
109113
110114
// -- -- --
@@ -128,7 +132,7 @@ export function waterWayFrag(){
128132
129133
// Calculate Alpha
130134
float alpha = clamp(((nCd.x*nCd.y*nCd.z)*.15)+.85, 0.0, 1.0) ;
131-
alpha = min(1.0,alpha + (dataCd.r*vCd.b)* min(1.0,vCd.r*2.0)) ;
135+
alpha = min(1.0,alpha + vCd.b * min(1.0,vCd.r*2.0) * depth ) ;
132136
vec4 Cd=vec4( .226,.27,.43, alpha );
133137
134138
@@ -171,6 +175,7 @@ export function waterWayFrag(){
171175
alpha *= min(1.0,vCd.r*10.0);
172176
Cd.a=alpha;
173177
178+
174179
// -- -- --
175180
176181

docs/pages/aboutMe/filmWork.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const pageListingData = {
4848
4949
<br>
5050
<br>I also added a multi-joint 'lookAt' which would blend their neck joints to look at a target smoothly.
51-
<br>&nbsp;&nbsp; I added in a joint rotation limits and calculated the linear algebra (target-to-joint space) to determine if the agent could look at their target or not.
51+
<br>&nbsp;&nbsp; I added in joint rotation limits and calculated the linear algebra (target-to-joint space) to determine if the agent could look at their target or not.
5252
5353
<br>
5454
<br>I could talk about the horse-and-jockey system I helped build, or the post-simulation joint editing tools, or the multi-limb IK with heel offsets & foot locking,

0 commit comments

Comments
 (0)