Forum Replies Created
-
AuthorPosts
-
scalareCustomer
Wow! That would be great, and make things a lot easier However, this issue will delay our development, because the whole thing we’re creating is based on the load of external dummy objects we will copy materials from (and this is the last thing we needed to test to start integrating everything)
Is it a limitation of the “assign material” puzzle that cannot work with gltf scenes loaded via code? If not, it would help to use the code-based load temporarily until the puzzle is ready for release.
Let me know. Thanks a lot!
scalareCustomerI also noticed that when I enable ambient occlusion at both Blender side and puzzles, some jagged edges appear on the objects. Not sure if there is a parameter that I have to set differently to avoid that.
scalareCustomerThank you, Mikhail.
scalareCustomerOK, I’ve found how to do this by clicking on the camera icon in the Scene Outliner, however, it seems not to work for Collections. I’ve started another thread here:
Thanks!
scalareCustomerHello Yuri, below is a link to a zip file with the tests I am working on. There are several tests happening in this file, not just the assignment of a material from an external gltf file. That particular test can be seen when you click on the sofa right legs (right from the user point of view, not the sofa’s). You will see that the external dummy is loaded (it is a small plane with a red fabric texture that appears between the sofa and the camera just when the app starts, you may have to rotate the camera a bit to see it), but when you click on the right wooden leg, the mesh is outlined, but the material does not change. But it does change when you click on the back cushion mesh, for example.
Also, I’m assigning the material change by collection, not individual mesh, because that is what I would need to do in the real app. Maybe the problem is that the “assign material” of an external gltf file works with individual meshes, and not collections?
Thanks a lot for your help!
scalareCustomerThanks Yuri. I guess I’ll have a very big folder with all the files for all the products in it then
scalareCustomerHappy New Year to all!
OK, I’m getting back into my tests. I was able to load the external dummy object via the GLTFLoader call, and I can see the object in the scene (I didn’t make it invisible yet). And I tried to assign the dummy object material with an “assign material” puzzle when I click on an object (and I click it after I see the dummy is loaded), but the target object does not change its material. I’ve made sure that both materials are defined in the same way (with nodes, Single UV Map + Image Texture + Principled BSDF + Material Output). I’m setting a variable to the name of the dummy object material name, and then using that variable to assign the material, but nothing is happening.
Not sure what the problem may be. Could it be that you cannot assign a material using a variable name? Or is it that I can only use materials that are recognized by the puzzles at the loading time? Since I’m working on a configurator, and the code I will create should work for any product that will be loaded dynamically, I need everything to be able to work based on variables that I will pass through runCode function (which is the reason I thought that testing the material assignment with a variable would make a good test)
Any ideas? Thanks a lot!
scalareCustomerActually not. Well, kind of. I’d like two things:
1) Not to have all the files needed for an app to be in the same folder, as a way to separate gltf files from texture files, and js, css, and so on.
2) I’m working on a configurator that will be used for several products. Many of those products will have wooden pieces and you will be able to select the wood type for them. But the same wood textures would be used for different products, and I’d like not to have the same textures repeated in different folders for each product. It would be great if we could define a folder at an “upper level”, where all the wooden textures would reside, and then the products would be able to refer to the same texture files using a path. You see, if I have to make a change to a texture for any reason, I would have to update that texture file for every product, which would require a lot of work that could be easily solved by being able to access the same file from all the products (gltf files)
It would be great if the gltf export could use relative paths to texture files that blender is able to resolve, and we could keep the same paths when copying things over to the application folder/web server.
scalareCustomerThanks Yuri, but I’m afraid I don’t follow you. How would that work exactly?
And do you think this feature could be included in a future version? (being able to define relative paths to texture image files)
scalareCustomerOK. The question is if all the textures inside that library file will download at the time I load the library file, or just when I apply those textures to an actual mesh. Since we will have hundreds of dummies, loading the library could take a very long time. Can you please clarify when the textures loading takes place?
scalareCustomerOn second thougth: the creation of hundreds of dummy objects seems overkill at some point.
New approach. Can you please tell me if this makes sense, and if it would be possible with V3D? I’m thinking of somehow exporting the materials information as json/gltf that I can read via javascript when I initialize the app, and save all that info into an array of objects, associated with each material name. The array would have an object for each possible material, and for each one have information about base color / base texture, metallic/roughness, normal texture and so on. Then, based on user interaction, I would check what options are available for the selected material, and via puzzles, replace textures and/or values to reflect the material replacement. Seems like a lot less work since we don’t need to create any dummies, but I’m not sure of how to read that gltf and extract just the material information as a “flattened” definition. I’ve checked the gltf exports, and the json structure seems very complex because of the representation of the node graphs. Is there a way to export that information just as a “flattened” set of attributes, as if they were “resolved” values to apply to a Principled BSDF node?
I guess I’m asking for too much… :)
Thank you!
scalareCustomerThank you, Yuri. I’ve figured out how to make it work with the value nodes.
scalareCustomer2) Can I load objects (as in separate gltf files) into my scene, to use them as dummies to hold the materials specifications, based on user interactions? Would I be able to do that via puzzles, or I have to custom code that in javascript?
Adding objects from extra gltf files is currently only possible with JavaScript.
Thank you for clarifying that. One more question about this: If I load an extra gltf file via javascript, will I be able to refer to it using puzzles? So, for example, I load an external dummy via Javascript, and then I call a puzzle from that same javascript so that the material in that dummy I just loaded gets copied over to another object.
Also, is there a way to “unload” gtlf files?
And last, I remember that in blend4web, when you loaded an external json, you had to do it into a “level”, and keep track of that level to be able to refer to it. None of that is needed in Verge3D, right?
scalareCustomerHello Yuri, thanks a lot. I see that the issue was that I was using a texture image for the Base color in my test. However, in your example I can see that the “set color” puzzle works, but not the “set value” (I dragged that puzzle and copied over the material you had created into it). I still get a red “no colors” option in that one. Isn’t it supposed to display options for metalness, roughness, bumpScale and others?
Thank you!
scalareCustomerHello Mikhail, thank you for getting back to me. You did not address the error message I mentioned. Do you know what that is? Could it be a specific error of this Blender 2.80 nightly build?
Also, I’ve been testing with the Principled BSDF node, and it exports correctly, but when I try to use the “set value” or “set color” puzzles, and I assign one of the materials defined with the Principled BSDF nodes, I get red “no colors” and “no values” in the dropdown parameter for the puzzles. Can you please explain why that happens?
-
AuthorPosts