-
Hello, I'd like to chime in here and say thanks for this great program @jnsmalm ! I'm creating a cube (Mesh3D.createCube(material)) but I'm stuck when i try to add the texture that I made from UV unwrapping a cube while playing with blender recently. At the moment in the test I'm adding here, I went back to using a single texture but I've added the UV texture for ref. so you can see what I'm going after. Clicking on the roll button animates through the six faces. (there are issues with resizing the html so you might need to refresh) As well I was poking around here in discussions and found someone asking about using textures on the faces of a cube but you mentioned something about using the SkyBoxMaterial and I couldnt get that to load in my webpack setup... I'm using pixi3d 1.6.1 and pixijs 6.5.1 As a separate issue as I mentioned I was able to follow a tutorial on blender and made a gltf file that works with the UV texture but I get an error message about missing textures when i try to use it with pixi3d as a model after loading with the threeGLTFLoader. I'd say I prefer using the pixi3d code to create a cube if I could just get a better handle on how to skin it. It is so quick to integrate into pixijs, I was having problems getting three to play nice with pixi. It's definitely a case of a little knowledge making a big mess ATM. Thanks in advance for any pointers. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hello! When I try loading your attached model it works using Pixi3D 1.6.1, I'm not entirely sure you had issues with that though. If you are having problems with this you can try the create-pixi3d-app which has an example with loading a model and you can try just changing which model it loads.
If you want to use the Mesh3D.createCube and attach a texture you can do that with:
The SkyboxMaterial is not exported in the bundle (it's used by the Skybox class) but you can check the source to see how it works. It works differently by using a cubemap (pretty much a texture with 6 faces). Maybe you can share some source code with the issues you are having, the one you attached seems to be a bundle and impossible to read :-) |
Beta Was this translation helpful? Give feedback.
-
You can try changing the properties of the material. The standard material is using PBR (Physically Based Rendering) and depending on the settings of the material it greatly affects how lighting behaves for that material.
Try for example to use the image based lighting in that code (which you commented out) and set metallic = 1 and roughness = 0, it will look like a perfect mirror. If you want t o load an embedded json you can do that using:
All textures and vertex data needs to be included/embedded in that json. |
Beta Was this translation helpful? Give feedback.
You can try changing the properties of the material. The standard material is using PBR (Physically Based Rendering) and depending on the settings of the material it greatly affects how lighting behaves for that material.
Try for example to use the image based lighting in that code (which you commented out) and set metallic = 1 and roughness = 0, it will look like a perfect mirror.
If you want…