-
Posts
26 -
Joined
-
Last visited
About arek3D
- Birthday 01/01/1990
Profile Information
-
Gender
Male
-
Location
Warsaw
-
Interests
3D graphic, programming
Contact Methods
-
Skype
arekcj
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
arek3D's Achievements
Newbie (1/14)
6
Reputation
-
It was like this: 1. I imported .babylon files which were exported from 3DS Max. So they had StandardMaterials. 2. Then I decided to put on them PBRMetallicRoughnessMaterials to try to solve FB issue with strange reflections, and I used dispose() function for all StandardMaterials from the scene. 4. Then I saved to .glb the whole scene and the size of the file was bigger, above 3MB (so maybe dispose() method didn't delete std materials immediately or completely). 5. So I decided to come back to Standard Materials and tried to convert it properly to GLTF. 6. Now I know that this is impossible, because during the conversion metallicFactor -> 0, and to look decently on Facebook it should be 1.0 in my case (Which was not too obvious, because I did not want to have reflections at all). Unlit extension helped in my project, but it would be great to have the possibility to choose it during the exporting to a .glb file. As I said I reported this issue to Facebook at 14th Nov, but haven't received any response yet. Their engines display the same file differently on desktop and mobiles.
- 14 replies
-
arek3D reacted to a post in a topic: Strange reflection on .glb files on mobiles exported from Babylon JS
-
function _solveForRoughness(specularPower) { var t = Math.pow(specularPower / P3.x, 0.333333); return _cubicBezierCurve(t, P0.y, P1.y, P2.y, P3.y); } var diffuse = babylonStandardMaterial.diffuseColor.toLinearSpace().scale(0.5); var opacity = babylonStandardMaterial.alpha; var specularPower = BABYLON.Scalar.Clamp(babylonStandardMaterial.specularPower, 0, this._maxSpecularPower); var roughness = _solveForRoughness(specularPower); var glTFPbrMetallicRoughness = { baseColorFactor: [ diffuse.r, diffuse.g, diffuse.b, opacity ], metallicFactor: 0, roughnessFactor: roughness, }; return glTFPbrMetallicRoughness; }; Thank you for your answer. Yes, Modo exports Roughness=1 and Metallic=1 and this is the reason of difference! I checked that on Facebook and the effect is the same. Thank you! I noticed that in babylonjs.serializers.js the metallicFactor is always = 0 in _solveForRoughness() function. I need to use StandardMaterials on my objects, so my materials always will use this function (if I use PBR materials in Babylon I exceed the 3MB Facebook limit for the 3D post). I noticed also that StandardMaterial in Babylon JS has the roughness property (it helps to define how blurry the reflections should appears in the material). Don't you think that during conversion from Standard Material to PBR it should be like this: f(specularPower) -> metallicFactor f(roughness) -> roughnessFactor Instead of: 0 -> metallicFactor f(specularPower) -> roughnessFactor What do you think @bghgary? Thank you very much for help!
- 14 replies
-
arek3D reacted to a post in a topic: Strange reflection on .glb files on mobiles exported from Babylon JS
-
The method in the Babylon JS Serializers "GLTF2Export.GLBAsync()" exports actualy the same visual result like 3dsMax exporter. The only difference I saw in the HEX Editor was the file from 3DS Max has Roughness = 0.99 instead of 1. The object exported using GLBAsync() is shiny despite of roughness=1, metallic=0 on mobiles on FB. And it is distinctly brighter than e.g. from Modo also on desktop. White color from Modo is closer to #FFFFFF than from Babylon JS, and Modo also uses glTF and PBR metallic roughness model. But of course these reflections from Facebook scene could affect colors on the object and the problem could be only with roughness and metallic part. Thank you @bghgary for the information about unlit extension and your glTF-Shell-Extensions tool. It helped to avoid weird reflections on Facebook on mobiles exported from Babylon JS, but of course it is only workaround, because there is no shading at all.
- 14 replies
-
arek3D reacted to a post in a topic: Strange reflection on .glb files on mobiles exported from Babylon JS
-
Thanks for your help @bghgary! Yes, I know that pure black or white with no reflections do not exist in the real world. But Modo also uses PBR materials and the range of colors is wider. Also, the roughness is greater. The darkest box exported from Babylon JS looks distinctly brighter than e.g. the black frame of my LCD screen. Also, I can see a lot of objects around me that are more rough than this box on FB mobile. It is very shiny despite of roughness = 1. I hope that glTF working group will fix those inconsistencies between the most popular renderers. Or maybe Facebook developers will allow changing the reflection map from their scene to have more control of the final effect. What do you mean by " add the unlit extension manually to the glTF file"? I have tried to add those lines to the material in the text editor, but I have noticed before, that every try of editing .glb file causes an error during Facebook upload and I do not know why. Maybe I use incorrect encoding?
- 14 replies
-
Thanks @Deltakosh but I also tried that and also used PBR materials with roughness=1, metallic=0 etc. I cannot achieve totally black and also totally white color on mobiles without any reflections. This is possible from Modo, so I do not think it is an Facebook's issue, however I reported this also to them. I have not received any response yet. Here is the playground: https://playground.babylonjs.com/#QEZVMP And here is my test scene. I use the newest exporter for 3DS Max 2016 (ver. 1.3.9): boxScene.zip Hope it will help
- 14 replies
-
Hi, I have noticed that there is a difference in displaying .glb files between desktop and mobiles e.g. on Facebook. The files exported from babylonjs.serializers using GLTF2Export.GLBAsync() or 3DS max + Babylon JS plugin has strange reflection despite of specular=0, roughness=1, metallic=0 etc. I have tried many combination with Std and PBR materials and I always have this strange reflection on mobiles. I decided to try Modo and the effect is much better. So probably you have a bug in babylonjs.serializers and 3DS max plugin. I have noticed that in attached file called "babylonJS.glb" which was exported from 3DS max "roughnessFactor" is 0.9 and should be 1.0 if I use standard material with specular = 0. GLB files: babylonJS.glb Modo.glb Screenshot from the smartphone (Android/iOS, the effect is the same), 3DS max + Babylon JS plugin and the same effect after using babylonjs.serializers.js GLTF2Export.GLBAsync() method: Screenshot from the smartphone when Modo was used (on smartphone the box is totally black - so the effect is actually perfect). And the effect which we can see on the desktop web browser (as you can see the file exported from Babylon JS is not totally black, but it should be. However the worst thing is this reflection on mobiles):
- 14 replies
-
arek3D reacted to a post in a topic: Should simplify() method work with custom mesh?
-
arek3D reacted to a post in a topic: Should simplify() method work with custom mesh?
-
arek3D reacted to a post in a topic: Should simplify() method work with custom mesh?
-
Should simplify() method work with custom mesh?
arek3D replied to arek3D's topic in Questions & Answers
I am working with meshes where are huge amount of faces. This is only an example but the behaviour is the same. I think the second part of your answer is the reason. So here is the next question - how to weld these vertexes to have one object instead of bunch of faces?- 4 replies
-
- simplify
- custom mesh
-
(and 1 more)
Tagged with:
-
Hi! I have created a custom mesh like this: new BABYLON.Mesh("custom", this.scene) And after added simplify() method, nothing has been changed. I have created a playground for testing this issue. As you can see, the same settings in simplify() method change the structure of sphere, but do not change my custom mesh: https://playground.babylonjs.com/#JT9SFV#4 Is it a bug, or it is impossible to add simplify() method to custom mesh?
- 4 replies
-
- simplify
- custom mesh
-
(and 1 more)
Tagged with:
-
Ok, I have found why my string was empty when I console.log my custom mesh. I do not have UV data in my model and in OBJExport.OBJ() method there is a condition which skips such meshes: if (!trunkVerts || !trunkNormals || !trunkUV || !trunkFaces) { continue; }
- 38 replies
-
- obj
- babylon to obj
-
(and 1 more)
Tagged with:
-
Hi, I have a problem with export an .obj file using custom mesh. Should it work with this kind of mesh? I created a geometry which is displayed correctly in canvas and after console.log the list of vertexes is empty. I tested that with a standard cube and it worked correctly. Here is how I am doing it (more or less): this.customMesh = new BABYLON.Mesh("custom", this.scene); //... a lot of "positions.push" var normals = []; var vertexData = new BABYLON.VertexData(); BABYLON.VertexData.ComputeNormals(positions, indices, normals); vertexData.positions = positions; vertexData.indices = indices; vertexData.normals = normals; vertexData.applyToMesh(this.customMesh); var mat = new BABYLON.StandardMaterial("mat", scene); this.customMesh.material = mat; var obj = BABYLON.OBJExport.OBJ([this.customMesh],true,'birdie'); var objlink = BABYLON.Tools.FileAsURL(obj); var mtl = BABYLON.OBJExport.MTL(this.customMesh,true); var mtllink = BABYLON.Tools.FileAsURL(mtl); console.log("obj = ", obj); console.log("objlink = ", objlink); console.log("mtl = ", mtl); console.log("mtllink = ", mtllink);
- 38 replies
-
- obj
- babylon to obj
-
(and 1 more)
Tagged with:
-
arek3D reacted to a post in a topic: Babylon exporter 0.40.0 does not work with 3ds Max 2016
-
Hi, I have installed a new version of Babylon exporter using this: https://github.com/BabylonJS/Exporters/blob/master/3ds Max/Max2Babylon-0.40.0.zip I upacked this, unblock, then deleted previous version and paste those dlls. Here is what I get: Exportation started Exporting nodes Exportation cancelled: External component has thrown an exception. Have you had similar issues?
-
GameMonetize reacted to a post in a topic: DynamicTexture on mesh from .babylon file causes a problem.
-
Wingnut reacted to a post in a topic: DynamicTexture on mesh from .babylon file causes a problem.
-
DynamicTexture on mesh from .babylon file causes a problem.
arek3D replied to arek3D's topic in Questions & Answers
Thank you @Wingnut for your workaround!! I wrote proper UV values for my meshes and it works! In my free time, I will try to fix that issue with the newest exporter, which I had and I will test this strange UV behavior once again. Or maybe I should change 3ds max to 2017 version- 12 replies
-
- dynamictexture
- uv
-
(and 2 more)
Tagged with:
-
arek3D reacted to a post in a topic: DynamicTexture on mesh from .babylon file causes a problem.
-
arek3D reacted to a post in a topic: DynamicTexture on mesh from .babylon file causes a problem.
-
Wingnut reacted to a post in a topic: DynamicTexture on mesh from .babylon file causes a problem.
-
DynamicTexture on mesh from .babylon file causes a problem.
arek3D replied to arek3D's topic in Questions & Answers
I think UV channel is correct in my mesh (this is default plane from 3ds max 2016. So UV must be correct. Moreover, I made a PG which prove that UV is incorrect only if I use DynamicTexture (in this example textures are swapped in the loop every 60 frames) http://www.babylonjs-playground.com/#1CMD3G#39 This is quite strange, isn't it?- 12 replies
-
- dynamictexture
- uv
-
(and 2 more)
Tagged with:
-
arek3D reacted to a post in a topic: DynamicTexture on mesh from .babylon file causes a problem.
-
DynamicTexture on mesh from .babylon file causes a problem.
arek3D replied to arek3D's topic in Questions & Answers
Thank you very much for your answers! I will check that PG tomorrow. But how to explain the fact that when I put a standard texture, it works well on the same plane? Imho without UV channel it would not be possible. I use 3ds max 2016, with max2babylon exporter, but not the newest version, because it shows errors.- 12 replies
-
- dynamictexture
- uv
-
(and 2 more)
Tagged with: