tham_kathy

Members

28

• Last visited

• Rank
Member
• Birthday October 7

• Gender
Female

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

1. Adding a Roof to a House Built from Plans

Actually I understood everything clearly except that UV thing. So I just removed that code from my research project and now there is no texture for the roof. 😁 https://www.babylonjs-playground.com/#4GBWI5#120 Thanks for the help @Wingnut You guys really helped me during my research project. Thanks again.

Anyone ??? 😔
3. Build a House from a Floorplan

@JohnK Can you explain this bit more if you don't mind ?
4. Adding a Roof to a House Built from Plans

Can anyone please explain the code here? I'm really confused with the complex formulas here. Went through the code for days but couldn't understand it properly. Really appreciate this help. example -> https://www.babylonjs-playground.com/#4GBWI5#110 Thanks
5. Build a House from a Floorplan

One last thing; What is the purpose of using indices array? for(var w = 0; w <nbWalls; w++) { indices.push(w, (w + 1) % nbWalls, nbWalls + (w + 1) % nbWalls, w, nbWalls + (w + 1) % nbWalls, w + nbWalls); // base indices } currentLength = indices.length; for(var i = 0; i <currentLength/3; i++) { indices.push(indices[3*i + 2] + 2*nbWalls, indices[3*i + 1] + 2*nbWalls, indices[3*i] + 2*nbWalls ); // top indices } for(var w = 0; w <nbWalls; w++) { indices.push(w, w + 2 *nbWalls, (w + 1) % nbWalls + 2*nbWalls, w, (w + 1) % nbWalls + 2*nbWalls, (w + 1) % nbWalls); // inner wall indices indices.push((w + 1) % nbWalls + 3*nbWalls, w + 3 *nbWalls, w + nbWalls, (w + 1) % nbWalls + nbWalls, (w + 1) % nbWalls + 3*nbWalls, w + nbWalls); // outer wall indices } And what does this mean? Thanks
6. Build a House from a Floorplan

Question is regarding example https://www.babylonjs-playground.com/#4GBWI5. I don't understand how outer walls and footprint is created. I'm confused with the below code and can anyone please explain the below code step by step? Thanks for(var w = 0; w <= nbWalls; w++) { angle = Math.acos(BABYLON.Vector3.Dot(line, nextLine)/(line.length() * nextLine.length())); direction = BABYLON.Vector3.Cross(nextLine, line).normalize().y; lineNormal = new BABYLON.Vector3(line.z, 0, -1 * line.x).normalize(); line.normalize(); outerData[(w + 1) % nbWalls] = walls[(w + 1) % nbWalls].corner.add(lineNormal.scale(ply)).add(line.scale(direction * ply/Math.tan(angle/2))); line = nextLine.clone(); walls[(w + 3) % nbWalls].corner.subtractToRef(walls[(w + 2) % nbWalls].corner, nextLine); }
7. How to calculate hipped/gabled roofs from outline coordinates?

Actually I didn't get it. Can you please explain bit more?
8. How to calculate hipped/gabled roofs from outline coordinates?

@JohnK What about planes that have labels more than 4? Below is the roofprint that I'm trying. One plane has 6 labels so it's not creating . Any solution? This is the code -> http://www.babylonjs-playground.com/#4GBWI5#105 (Zoom out if you can't see anything)
9. How to calculate hipped/gabled roofs from outline coordinates?

I'm creating roofs for a given house shape at runtime using straight skeleton of the shape. And for that I really appreciate your help.! Thanks for everything
10. How to calculate hipped/gabled roofs from outline coordinates?

@JohnK I tried your code above.When I play the scene, the roof is created. But when I rotate, some parts of the roof are dissapearing. Below is my html file. (I'm uploading my html file cuz I don't know how to create a playground.) index.html
11. How to join two walls as one?

🤜@JohnK Thanks a looot.. 🙏 U saved my life 😁😁
12. How to join two walls as one?

@JohnK Actually what I'm doing is creating houses at run time by reading the given floor plan. I get an array of coordinates by reading the floor plan and I'm passing the array values to the buildFromPlan method. I don't find any method which I can used to automate this process for the number of rooms. If I use your suggestion, I have no idea how give values for the positions. Anyway, thanks a lot.!
13. How to join two walls as one?

This is the html file of my code.
14. How to join two walls as one?

This is what I get when I substract 2 rooms. Or is there a way to hide the lines that separate two rooms? Or is it possible to merge those two meshes from 0.5cm without changing their original positions? Then there will be only one wall in between two rooms. I'm very new to this 3D stuff so plz help me to find a solution
15. Draw Calls

I tried with different uv values but the texture is not appearing as it is. The way I calculated uv values is; var uvs = []; for(var p = 0; p < positions.length / 3; p++) { uvs.push((positions[3 * p] - (-4)) / 6, (positions[3 * p + 1] - (-4)) / 8); } Can you please suggest me a way to apply the texture as it is for both outer walls and inner walls separately?