Soul Linker Posted June 5, 2014 Share Posted June 5, 2014 Hi everyone.Yep anothe one makin his own minecraft.Want to ask u is there method make textures looks like minecraft.Most problem is in leaves and their opacity...Somthin like gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);Looks like i need mess with RenderTargetTexture(size, options) options.samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODEoptions.generateMipMaps = true Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 5, 2014 Share Posted June 5, 2014 Hello I do not understand your question:) If related to textures and opacity (for leaves) here an example:http://www.babylonjs.com/playground/#1XKIKA Quote Link to comment Share on other sites More sharing options...
Soul Linker Posted June 5, 2014 Author Share Posted June 5, 2014 how to make texture looks pixellate with texture 16x16 px? without making 256x256 texture Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 5, 2014 Share Posted June 5, 2014 You can create just a small part of your texture in 16x16 and replicate it by using texture.uScale and texture.vScale Quote Link to comment Share on other sites More sharing options...
Soul Linker Posted June 5, 2014 Author Share Posted June 5, 2014 got pic1..need pic2.. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 5, 2014 Share Posted June 5, 2014 then create a 16x16 with exactly your texture and use uScale = 1 and vScale = 1 Quote Link to comment Share on other sites More sharing options...
Soul Linker Posted June 5, 2014 Author Share Posted June 5, 2014 and i will got smooth corners... Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 5, 2014 Share Posted June 5, 2014 Get your point Check the latest version on the github I added a new function: BABYLON.Mesh.forceSamplingMode(mode) Mode can be: BABYLON.Mesh.NEAREST_SAMPLINGMODE = 1; BABYLON.Mesh.BILINEAR_SAMPLINGMODE = 2; BABYLON.Mesh.TRILINEAR_SAMPLINGMODE = 3; Quote Link to comment Share on other sites More sharing options...
Soul Linker Posted June 6, 2014 Author Share Posted June 6, 2014 // Get the canvas element from our HTML belowvar canvas = document.getElementById("renderCanvas");// Load BABYLON 3D enginevar engine = new BABYLON.Engine(canvas, true);var scene = new BABYLON.Scene(engine);var camera = new BABYLON.ArcRotateCamera("Camera", 1, 0.8, 10, new BABYLON.Vector3(0, 0, 0), scene);var pl = new BABYLON.Mesh.CreatePlane("plane", 4, scene)var mat = new BABYLON.StandardMaterial("default", scene);var txtr = new BABYLON.Texture("textures/leaves.png", scene);txtr.forceSamplingMode(BABYLON.Texture.TRILINEAR_SAMPLINGMODE)txtr.hasAlpha = truemat.diffuseTexture = txtrpl.material = mat// Attach the camera to the scenescene.activeCamera.attachControl(canvas);// Once the scene is loaded, just register a render loop to render itengine.runRenderLoop(function () {scene.render();});Still no Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 6, 2014 Share Posted June 6, 2014 I think this is too early. the texture is not ready (due to file loading) when you call the function I changed the API to :var txtr = new BABYLON.Texture("textures/leaves.png", scene, BABYLON.Texture.NEAREST_SAMPLINGMODE); Quote Link to comment Share on other sites More sharing options...
Soul Linker Posted June 6, 2014 Author Share Posted June 6, 2014 wont .. ok ill leave that for now...ps perfomance test looks great Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 7, 2014 Share Posted June 7, 2014 Could you just prepare me a little sample I will try to use it to get what you need Quote Link to comment Share on other sites More sharing options...
Soul Linker Posted June 7, 2014 Author Share Posted June 7, 2014 Here is texture. i need all kind of cubes with all textures looking exacly as minecraft Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 9, 2014 Share Posted June 9, 2014 I meant: could you setup a small jsfiddle or bjs playground? Quote Link to comment Share on other sites More sharing options...
adrian_dan Posted June 11, 2014 Share Posted June 11, 2014 Looks awesome, Though, when building large terrain, you might want to consider constructing special geometry to reduce the number of polygons for hidden faces. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.