Forum Replies Created
-
AuthorPosts
-
johngrigniCustomer
The set transform node acts instantly, and I’m looking for something more subtle.
If I set the value down low, like 1 degree, do I then just loop it?
I tried setting up a loop while var=true setup, then use buttons to set the variable true or false, but it just seems to hang the system up.
johngrigniCustomerThanks! Sorry to keep bugging you with what must seem terribly simple questions.
johngrigniCustomerOkay, got the pbr to work, thank you
I’ve tried to figure out the preloader to show a ‘loading’ gif, but I’m still too much of a noob here. I see where you got the code from that GitHub discussion, but you mention ‘just showing a gif while it loads’. That’s all I want to do – is that a different thing? Do I need that ImageLoader() fix?
johngrigniCustomerI’m not seeing an attachment, but I’ll try it again.
johngrigniCustomerIs there a way to modify this to work with PBR textures? I tried it as is and it doesn’t work. Perhaps normal and diffuse textures are treated differently in PBR? Again, thanks for an excellent program.
johngrigniCustomerI’m not very good with coding, and that seems a very deep rabbit hole of coding.
I can download the ZIP and put the contents in the app directory, but I really am not sure what I need to do from there – it mentions some lines to add for CDN (I’m assuming I add them to my ATI_Lobby.html head), and goes on to mention some other things I have no idea about, like ‘Node.js’ and ‘Usage in IE<9’.
I hate to ask you for more specifics, but I’d be willing to pay for your time.
johngrigniCustomerHere is the link to the project:
http://www.argosdesigns.com/ATI_Lobby/index.htmlIf you want to see it without the buttons in front, the scene is here:
http://www.argosdesigns.com/ATI_Lobby/ATI_Lobby.htmlIt works on Safari, Chrome, and Edge, but it seems to simply not load in Internet Explorer.
johngrigniCustomerScratch that, I figured it out. I had made an error applying textures in the Blend file.
johngrigniCustomerIt’s me again, and I tried copying the script over to a new version of the same project and I keep getting this error when I try to call the function:
[Error] TypeError: null is not an object (evaluating ‘obj.material.map.image = image’)
(anonymous function) (ATI_Lobby.js:131)
(anonymous function) (v3d.js:1:517256)As far as I know I’m doing the exact same thing as before. Here is the function in ATI_Lobby.js:
app.ExternalInterface.changeDiffuse = function(objName, diffuseURL) {
app.scene.traverse(function(obj){
if (obj.name == objName) {var loader = new v3d.ImageLoader();
loader.load(diffuseURL, function(image) {
obj.material.map.image = image;
obj.material.map.needsUpdate = true;
})
}
});
}johngrigniCustomerThanks! You guys rock!
johngrigniCustomerI went ahead with that, and it seems to work. Given that I’m still very much a noob with coding, I’m feeling very good about myself for making it work. Thanks again for all your help!
johngrigniCustomerI thought it might be that simple! Thank you. But now I’m up against a different question:
Let’s say the user has set the diffuse texture of several objects:
1 – blue/monkey
2 – green/monkey
3 – red/monkeyThe variable for the diffuse texture is still the last one set, ‘red’, so if I go to change the normal texture of object 1 to ‘torus’, it will set the diffuse to ‘red’, so I get red/torus when I want it to be blue/torus.
I’m thinking the simplest solution is to separate the diffuse and normal changeTexture into separate functions: changeDiffuse and changeNormal, and simply delete the part that changes the other image in each one.
Alternately, when I select the object, have it reset the diffuse and normal variables to whatever the current values are for the object. But I’m not sure how to get that value out of the object, so I’m leaning towards the first one.
What would you suggest?
johngrigniCustomerI’ve run into a problem, in that this changes the texture for every object in the scene that uses that texture, even if it has a different material. I plan to have at least 5 objects that would be swappable, do I need five different versions of each texture? I thought the objName parameter would mean that it only gets swapped for that object, as opposed to across the scene.
In the example, even the leftmost icons get the texture swapped out for the monkey head or gradient, though the other icons don’t.
johngrigniCustomerHere it is
johngrigniCustomerOkay, this might sound counterintuitive, but I was able to get it to work. I had thought that I could make a menu pop up in front of the camera, with a bunch of icons by giving it an animation, and then when you clicked on an object, the animation would play. I parented this to the camera, right in front of the lens, but positioned down below where it would be out of the way.
Deleting this element makes it all work fine. Also, hiding it as the app loads works, then unhiding it, works fine. But for some reason the animation doesn’t work. Is there a better way to create an interface like I’m describing, or is this another Mac mystery? I can live without animated interface, just hiding and unhiding, but I’d rather have it animated.
-
AuthorPosts