
yLacaute
Members-
Content Count
39 -
Joined
-
Last visited
-
Days Won
1
yLacaute last won the day on March 3 2018
yLacaute had the most liked content!
About yLacaute
-
Rank
Advanced Member
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
solved Load .babylon file programmatically
yLacaute replied to yLacaute's topic in Questions & Answers
Yes -
-
Hi, As the babylon format is a simple JSON file, is there a way to load it directly from code ? (if you already have a javascript variable equals to a babylonJS file) Thanks
-
solved Set texture per face of loaded mesh
yLacaute replied to yLacaute's topic in Questions & Answers
I give up. Working with uv coordinates manually is hell. Anyway this topic is solved. -
solved Set texture per face of loaded mesh
yLacaute replied to yLacaute's topic in Questions & Answers
What the... Great !! I must admit I used random 0 or 1 just to try with a length of 36... Have to undertand now and find the good values, I will update the PG with the final result, with exactly what I wanted Thank you !! -
solved Set texture per face of loaded mesh
yLacaute replied to yLacaute's topic in Questions & Answers
I tried many many things lol Please give it a try : whatever the length of the uv it changes nothing. -
solved Set texture per face of loaded mesh
yLacaute replied to yLacaute's topic in Questions & Answers
That is exactly why I opened this topic : why ? Here is the PG : https://www.babylonjs-playground.com/#JQDPT6#6 You can see it is easy to put a texture on a Babylon box, not in an imported plane from Blender. Keep in mind I am still speaking with a newbie langage, when i speak about "face" I speak about "face I I can select in blender" not "triangle" (So in the PG above, the plane is composed with 2 rectangular faces, but more triangles) -
solved Set texture per face of loaded mesh
yLacaute replied to yLacaute's topic in Questions & Answers
@Pryme8 I am using physicImpostors so I try to limit the number of mesh for performance, that's why I did not 2 planes I just succeed to import a plane from Blender, with 2 textures on it with repeat option. But there is something strange : the rendering in Blender is not the same than in BabylonJS. I played with the size property to repeat the textures (as explained here http://doc.babylonjs.com/resources/blender#textures) but the result is that the exported file is not exactly the same as the rendered view in Blender. See attached images. @Deltakosh You applied materials on a mesh created with Babylon, and all problems are coming when you applied materials from an imported mesh : you can't do the same as in your PG from what I have understood. -
solved Set texture per face of loaded mesh
yLacaute replied to yLacaute's topic in Questions & Answers
I am stuck. And mad. I don't mange to apply textures on loaded mesh (@Pryme8 I understand nothing to your PG which is too complicated for me to just set a f*#!#g texture, please note I am beginner) I tried to apply 2 repeated textures on Blender : it works "inside blender" but when I export : i lose the repeat option The video shared above show "a way of doing" by adapting textures to a shape : you build one image with all inside. I understand this can be useful for a complete object (a character for example) but I would like the opposite : I have a plane (with 2 faces) and each face should be attached to a texture (with offset and repeat option). As I already have a lot of textures, I want to exploit them and NOT create a new image containing existing texture. If many objects share the same texture, I load it many times, that has no sense for me. A solution could be to put ALL textures in a single image, but same, that is a crazy solution, the single image will become unusable (the hell to edit it). Currently, I fail on the simplest possible export : Blender > new plane Blender > add material > add texture from image > repeat x = 2 Blender rendering : it works Export Babylon > load > I see my texture, but without repeat option I can't find any good tutorial for basic things... please help My objectif is still the same as the first comment here : get a plane with 2 faces with 2 different textures applied (but now textures are directly applied in Blender instead of in babylonjs) -
solved Set texture per face of loaded mesh
yLacaute replied to yLacaute's topic in Questions & Answers
@Pryme8 Your PG looks very complicated Clearly lol GJ anyway To give you the context, I am trying to make a FPS and a map generator for the game, if I had to write so much code to put a texture I would stop immediately Especially that I have to learn everything (Babylon and Blender), I come from the "java world"... Currently I am trying to build all environment "parts" in Blender (like a wall, a wall with a door, etc because it is too hard to design custom mesh in Babylon) and assemble them by a JSON configuration file. So with all this discussion I will just set textures directly in Blender. -
solved Set texture per face of loaded mesh
yLacaute replied to yLacaute's topic in Questions & Answers
Thank you everyone So, if I resume, there is no easy way to apply a texture (or many) on an external loaded mesh (from a babylon file for example) even if It should be technically possible. We would prefer to : load an external object already textured or, create the object with the Babylon API and configure texture(s) at the build time -
solved Set texture per face of loaded mesh
yLacaute replied to yLacaute's topic in Questions & Answers
@Pryme8 I already can import textured meshes from Blender, but this is not my need I will check Babylon internal code because I think it is very strange that it is so easy to use faceUV from MeshBuilder with options, and so hard from an already loaded mesh. -
solved Set texture per face of loaded mesh
yLacaute replied to yLacaute's topic in Questions & Answers
Thank you, it is more complicated than I expected I updated the PG : https://www.babylonjs-playground.com/#JQDPT6#4 If I undertand correctly, the mesh got 6 vertices, 4 triangles => 12 indices. So I have to build an uv array of 12 * 2 = 24 (2 coordinates for each vertice) But wow ! This this just hell, I even not know the vertice order... And what about repeating the texture -
solved Set texture per face of loaded mesh
yLacaute replied to yLacaute's topic in Questions & Answers
I created this playground, you absolutely right it will be more easy to understand : https://www.babylonjs-playground.com/#JQDPT6#3 => The wall, in wireframe = true for better understanding of the 2 faces needed to be textured. -
solved Set texture per face of loaded mesh
yLacaute replied to yLacaute's topic in Questions & Answers
I speak about a polygonal face and the complexity is not a problem : my mesh is simple : a plane, 6 vertices, 2 faces. I could set my 2 textures in Blender, but I don't want to do that. I would like to set it by code with Babylon, whatever HOW, I just want myMesh.babylon loaded and set 2 textures on it I gave this link : https://doc.babylonjs.com/how_to/createbox_per_face_textures_and_colors It's the kind of things I want to do, but without using MeshBuilder ===> by using an already loaded mesh. -
solved Set texture per face of loaded mesh
yLacaute replied to yLacaute's topic in Questions & Answers
Sorry but I don't know how to be me clear anymore, I said everything. There is a playground in the first post and the challenge is simple : you load the Dude.babylon and you set him a specific texture on one face, the face you want.