Skip to content

Commit 922dc62

Browse files
committed
Cleaned up SaltFlatsEnv & HeightMap
_Reduced textures & fbx file size for SaltFlats _Fixed alpha/scaling behavior left from earlier dev
1 parent 2f54314 commit 922dc62

23 files changed

+158
-104
lines changed

docs/js/pxlAssets/RabbitDruidA/workspace.mel

Lines changed: 0 additions & 31 deletions
This file was deleted.

docs/js/pxlNav.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Binary file not shown.

docs/js/pxlRooms/OutletEnvironment/OutletEnvironment.js

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export class OutletEnvironment extends RoomEnvironment{
6161
// The FBX file to load for your room
6262
// Defaults to " ./ pxlRooms / *YourRoomEnv* / Assets / *YourSceneFile.fbx* "
6363
this.sceneFile = this.assetPath+"OutletEnvironment.fbx";
64+
//this.sceneFile = this.assetPath+"OutletEnvironment.glb";
6465

6566
// Environment Shader
6667
this.spiralizerUniforms={};
@@ -158,15 +159,15 @@ buildDust(){
158159
builBugs(){
159160
//if( this.mobile ) return;
160161

161-
let vertexCount = 500; // Point Count
162-
let pScale = 10.0; // Point Base Scale
163-
let visibleDistance = 400; // Proximity Distance from Camera
162+
let vertexCount = 300; // Point Count
163+
let pScale = 6.25; // Point Base Scale
164+
let visibleDistance = 500; // Proximity Distance from Camera
164165
let particleOpacity = 1.0; // Overall Opacity
165-
let opacityRolloff = 0.9; // Distance-opacity falloff multiplier
166+
let opacityRolloff = 0.85; // Distance-opacity falloff multiplier
166167

167168
let jumpHeightMult = 17.0; // How high the bugs jump
168169
let wanderInfluence = 0.85; // How much the particle sways
169-
let wanderFrequency = 3.50; // How frequent the sway happens
170+
let wanderFrequency = 3.75; // How frequent the sway happens
170171

171172
// -- -- --
172173

@@ -180,24 +181,37 @@ builBugs(){
180181
grassBugsSettings["proxDist"] = visibleDistance;
181182
grassBugsSettings["fadeOutScalar"] = opacityRolloff;
182183
grassBugsSettings["additiveBlend"] = false;
184+
185+
grassBugsSettings["tint"].set( .85, .72, .55 );
183186

184187
grassBugsSettings["jumpHeightMult"] = jumpHeightMult;
185-
grassBugsSettings["offsetPos"].y = .1 ;
188+
grassBugsSettings["offsetPos"].y = .2 ;
186189

187190
grassBugsSettings["wanderInf"] = wanderInfluence;
188191
grassBugsSettings["wanderFrequency"] = wanderFrequency;
189192

193+
// Use a texture from the internal `pxlAsset` folder; ( RGB, Alpha )
194+
195+
// For the darker tones, few of the white dust
196+
grassBugsSettings["atlasPicks"] = [
197+
...grassBugsSystem.dupeArray([0.0,0.0],4), ...grassBugsSystem.dupeArray([0.25,0.],4),
198+
...grassBugsSystem.dupeArray([0.0,0.25],4), ...grassBugsSystem.dupeArray([0.25,0.25],4),
199+
...grassBugsSystem.dupeArray([0.0,0.5],2), ...grassBugsSystem.dupeArray([0.25,0.5],2),
200+
];
201+
grassBugsSystem.setAtlasPath( "sprite_dustAtlas_rgb.jpg", "sprite_dustAtlas_alpha.jpg" );
202+
203+
204+
/*
205+
// For more of the lighter & bluer dustLiquid textures -
190206
grassBugsSettings["atlasPicks"] = [
191207
...grassBugsSystem.dupeArray([0.0,0.],4), ...grassBugsSystem.dupeArray([0.25,0.],4),
192208
...grassBugsSystem.dupeArray([0.50,0.],4), ...grassBugsSystem.dupeArray([0.75,0.],4),
193209
...grassBugsSystem.dupeArray([0.50,0.25],4), ...grassBugsSystem.dupeArray([0.75,0.25],4),
194210
...grassBugsSystem.dupeArray([0.50,0.5],2), ...grassBugsSystem.dupeArray([0.75,0.5],2),
195211
...grassBugsSystem.dupeArray([0.50,0.75],3), ...grassBugsSystem.dupeArray([0.75,0.75],3)
196212
];
197-
198-
// Use a texture from the internal `pxlAsset` folder; ( RGB, Alpha )
199213
grassBugsSystem.setAtlasPath( "sprite_dustLiquid_rgb.jpg", "sprite_dustLiquid_alpha.jpg" );
200-
214+
*/
201215

202216
// Set height map
203217
grassBugsSystem.setHeightMapPath( this.assetPath+"bug_heightMap.webp" );
@@ -212,6 +226,7 @@ builBugs(){
212226

213227
// Generate geometry and load texture resources
214228
grassBugsSystem.build( grassBugsSettings, bugObj );
229+
215230
this.particleList[systemName] = grassBugsSystem;
216231
}
217232

@@ -519,8 +534,18 @@ builBugs(){
519534

520535
//
521536
// -- -- --
522-
523-
let fieldFbxLoader = this.pxlFile.loadRoomFBX( this );// , null, null, true );
537+
538+
// 'meshIsChild' - Some GLTF compressions splits Meshes -&- Transforms into Parent-Child relationships
539+
// Read transforms from the parent, but apply the material + settings to the child
540+
let loadSettings = Object.assign( {}, this.pxlFile.getSettings() );
541+
loadSettings['filePath'] = this.sceneFile;
542+
loadSettings['fileType'] = this.pxlEnums.FILE_TYPE.GLB; // Optional; Default is 'AUTO'
543+
loadSettings['filePath'] = this.assetPath+"OutletEnvironment.glb";
544+
loadSettings['filePath'] = this.assetPath+"OutletEnvironment_blender.glb";
545+
loadSettings['meshIsChild'] = true; // If your GLB has been "optimized" to split transforms & meshes
546+
loadSettings['enableLogging'] = true;
547+
//let fieldFbxLoader = this.pxlFile.loadRoom( this, loadSettings );
548+
let fieldFbxLoader = this.pxlFile.loadRoom( this );
524549

525550
// -- -- -- -- -- -- -- -- -- -- -- -- -- //
526551

Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)