From 8ae04fd1fbb66a7feaacc00f54ebf53fcdc65c71 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Tue, 10 Feb 2015 20:10:43 -0500 Subject: [PATCH] PlaceholderAssets: when assets fail to load, try to make the error appear visually --- .../main/java/com/jme3/texture/Texture.java | 2 +- .../java/com/jme3/util/PlaceholderAssets.java | 17 ++++++++++++++--- .../Common/Textures/MissingMaterial.png | Bin 0 -> 3714 bytes .../resources/Common/Textures/MissingModel.png | Bin 0 -> 3272 bytes .../Common/Textures/MissingTexture.png | Bin 0 -> 3321 bytes .../com/jme3/material/plugins/J3MLoader.java | 2 +- .../java/com/jme3/scene/plugins/MTLLoader.java | 2 +- 7 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 jme3-core/src/main/resources/Common/Textures/MissingMaterial.png create mode 100644 jme3-core/src/main/resources/Common/Textures/MissingModel.png create mode 100644 jme3-core/src/main/resources/Common/Textures/MissingTexture.png diff --git a/jme3-core/src/main/java/com/jme3/texture/Texture.java b/jme3-core/src/main/java/com/jme3/texture/Texture.java index 45cda623f..b41d2ac10 100644 --- a/jme3-core/src/main/java/com/jme3/texture/Texture.java +++ b/jme3-core/src/main/java/com/jme3/texture/Texture.java @@ -620,7 +620,7 @@ public abstract class Texture implements CloneableSmartAsset, Savable, Cloneable image = loadedTex.getImage(); } catch (AssetNotFoundException ex){ Logger.getLogger(Texture.class.getName()).log(Level.SEVERE, "Cannot locate texture {0}", key); - image = PlaceholderAssets.getPlaceholderImage(); + image = PlaceholderAssets.getPlaceholderImage(e.getAssetManager()); } }else{ // no key is set on the texture. Attempt to load an embedded image diff --git a/jme3-core/src/main/java/com/jme3/util/PlaceholderAssets.java b/jme3-core/src/main/java/com/jme3/util/PlaceholderAssets.java index c485b00ba..4fa0ca157 100644 --- a/jme3-core/src/main/java/com/jme3/util/PlaceholderAssets.java +++ b/jme3-core/src/main/java/com/jme3/util/PlaceholderAssets.java @@ -35,12 +35,12 @@ import com.jme3.asset.AssetManager; import com.jme3.audio.AudioBuffer; import com.jme3.audio.AudioData; import com.jme3.material.Material; -import com.jme3.math.ColorRGBA; import com.jme3.scene.Geometry; import com.jme3.scene.Spatial; import com.jme3.scene.shape.Box; import com.jme3.texture.Image; import com.jme3.texture.Image.Format; +import com.jme3.texture.Texture; import com.jme3.texture.image.ColorSpace; import java.nio.ByteBuffer; @@ -71,15 +71,22 @@ public class PlaceholderAssets { (byte)0xFF, (byte)0xFF, (byte)0xFF, }; + @Deprecated public static Image getPlaceholderImage(){ ByteBuffer tempData = BufferUtils.createByteBuffer(3 * 4 * 4); tempData.put(imageData).flip(); return new Image(Format.RGB8, 4, 4, tempData, null, ColorSpace.Linear); } + public static Image getPlaceholderImage(AssetManager assetManager){ + return assetManager.loadTexture("Common/Textures/MissingTexture.png").getImage(); + } + public static Material getPlaceholderMaterial(AssetManager assetManager){ Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); - mat.setColor("Color", ColorRGBA.Red); + Texture tex = assetManager.loadTexture("Common/Textures/MissingMaterial.png"); + tex.setWrap(Texture.WrapMode.Repeat); + mat.setTexture("ColorMap", tex); return mat; } @@ -88,7 +95,11 @@ public class PlaceholderAssets { // the user's expected scale... Box box = new Box(1, 1, 1); Geometry geom = new Geometry("placeholder", box); - geom.setMaterial(getPlaceholderMaterial(assetManager)); + Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); + Texture tex = assetManager.loadTexture("Common/Textures/MissingModel.png"); + tex.setWrap(Texture.WrapMode.Repeat); + mat.setTexture("ColorMap", tex); + geom.setMaterial(mat); return geom; } diff --git a/jme3-core/src/main/resources/Common/Textures/MissingMaterial.png b/jme3-core/src/main/resources/Common/Textures/MissingMaterial.png new file mode 100644 index 0000000000000000000000000000000000000000..799b70c18f5cb6c015ec9ef7dec9cc345ee6a175 GIT binary patch literal 3714 zcmW+(c{G%98-3q*X3Pv4W0!SgXD}#D5o5Au8%uVXP_~Xn8B2*b3S%iPD1-`$VicjM z5lW?$y;7#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1z;< zAHi$2ZZ?k%dwQu^v*PX3iW-j-+I18>ffVM~={&j8j?FHtb?vJu)P=tn5{ zs}iRXYV2|~fu(P>n=LqeF&oK zR0f3Cz?<694&*?(N$+dsiZgk=$MP32A_XX<)6^U*V;h3Oe3#TdNJaK_^ zRFSrL?43wv{1&(XSy9D_>w3qA(xl2Su|H_T(=PELnZzfn3m@xLhD5g(u4i1i0j-5z zjNZezIN)%#hj!ty)O?g(HPO8E-1GLbKIv-cuFg?xe^i$v31dpKvJxYkvM!*x+z`Gd ziVc-CZ}BqBhAsv)t%<8Ub0TzL{_J^vS@y!em!)XzdvbaGPK*a%RfO*$f4tvWs6NF? z7%bfRhtn7%ixW@!8x=ortWsp9l1N}6B7N+hB0cE0DXG@VCCTo5Tw?o)NXU)5UVw;P z8z@H(rx{k$#aE8ZVI3^phq3dU4Umo zv~d~_pRs#9R6a#i;k9qB%71hYki@C)a^rqC^yP(>D@q`8hjy+py=W&7MX0*g{?f!| zgx-(X;Tf)H*krh(BUW?Z;KAI%p_>PqK9N)|nQvY&;d-s7(t~q;Qm*^j>b&=U(CTeO zZOmioTJr}j4Di}M-=_}B4SP!W-s42d=JyKIdSAUD-lr+py}OKNH&e!=qZoo?)ZwmU zvF}8zR=@gfz~+cJUS5}&F{jr)U*SwXwoF-j##KppANPt^%9kD+a_h)fd$=57`Zy;n zcq@-B>cI(x-KYW{uC29lh&cX7r_CX~pK;2bS}7?O*@GxHp*yIRkEO23$+Ki-tE8Ru zn@}HWrL0(FFY?NzD{41vuSMW#+EWGDIE5y37qxOg?rT_=x?G+aZqW|++4i&zl}#2? z=s~Xep{~SddvN0$(pRrieW-$5Tv8KcEGHa7HaqkGxT3~-Nj>RbivL+1(8gKDI%%

literal 0 HcmV?d00001 diff --git a/jme3-core/src/main/resources/Common/Textures/MissingModel.png b/jme3-core/src/main/resources/Common/Textures/MissingModel.png new file mode 100644 index 0000000000000000000000000000000000000000..d59a78ce7edc96893041c86816dd3e8371840fa9 GIT binary patch literal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GqWe=xRKCy`WvV&USRRewZYbsTTg6XNYfaz<~^YA)4zcZqfmwTbNJ zpYmqo6_}w}a3odBY6nrRGg>`8IeGs22hyV=Dmt;2S@qIN*(n{DN+YKmPvLkOYFm7C zqcy;zXm7X7Mvj;~lNBWUqB>4W6uGi_N5jBfGEE9NAD^5`6JG z8O{e&k*iu?W-)*`ztoadnkf%7t0ekbYb{Qx=wl7_$M~4Sy3#%gjv_e4UZok_ds?=D z&h`Gvb*9(qbQ>dJlKVQV1lvash&qK-StL16s3_CpeURCNT^SL>*8JPDLcH$<8LB%S&S wwI}+xA$A*bkT~ngm7)@63eO|TcruTHwB+50@TehC?w1BEO|48G8!;mP2Png*aR2}S literal 0 HcmV?d00001 diff --git a/jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java b/jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java index dc8592abe..23310f12f 100644 --- a/jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java +++ b/jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java @@ -165,7 +165,7 @@ public class J3MLoader implements AssetLoader { tex.setWrap(WrapMode.Repeat); } }else{ - tex = new Texture2D(PlaceholderAssets.getPlaceholderImage()); + tex = new Texture2D(PlaceholderAssets.getPlaceholderImage(assetManager)); if (repeat){ tex.setWrap(WrapMode.Repeat); } diff --git a/jme3-core/src/plugins/java/com/jme3/scene/plugins/MTLLoader.java b/jme3-core/src/plugins/java/com/jme3/scene/plugins/MTLLoader.java index 8ee833346..f09eae150 100644 --- a/jme3-core/src/plugins/java/com/jme3/scene/plugins/MTLLoader.java +++ b/jme3-core/src/plugins/java/com/jme3/scene/plugins/MTLLoader.java @@ -182,7 +182,7 @@ public class MTLLoader implements AssetLoader { texture.setWrap(WrapMode.Repeat); } catch (AssetNotFoundException ex){ logger.log(Level.WARNING, "Cannot locate {0} for material {1}", new Object[]{texKey, key}); - texture = new Texture2D(PlaceholderAssets.getPlaceholderImage()); + texture = new Texture2D(PlaceholderAssets.getPlaceholderImage(assetManager)); texture.setWrap(WrapMode.Repeat); texture.setKey(key); }