Forum Replies Created
-
AuthorPosts
-
David DuperronCustomer
New update: problem solved!
I managed to get what I needed (a single material, which looks different from one object to another in terms of color and transparency).
For this I used the “Object Info” node in the Blender material definition (see here).
The “Color” output controls the color of the overlay, and the “alpha” output controls the overall opacity of the material.
Be careful if you use normal maps in your material to make sure that the normals are correctly computed (if they exist at all!) for the objects to which the material is affected. Otherwise you may experience unexpected render issues (see here to force the tangent computation on your geometry if this attribute does not exist)… I struggled to find this one!!David DuperronCustomerI update this post to see if I can get any help…
The idea would be to “add” a color overlay on a given object without affecting it’s material… if this is even possible…?David DuperronCustomerThanks guys for these details.
I will see what I can do to better manage my materials!David DuperronCustomerThanks for these answers!
Materials were already linked from the library, not appended.
@kdv if I use your plugin is it possible to keep only one object and reassign materials event if there are several slots?David DuperronCustomerYou should try the “convert to number” puzzle (in the text puzzles) on top of your html “get text content”. As it is now you are trying to perform an operation between text and number, and you will get an error (NaN or something like that).
It all depends on the type of data your get from your request. If it is text you might get into troubles! ;)- This reply was modified 5 months, 2 weeks ago by David Duperron.
David DuperronCustomerThanks, I tried on the “load/unload scene” example app, but I can see no difference in the memory consumption… So it’s still unclear to me what this puzzle does exactly in terms of memory.
David DuperronCustomerHi Yuri!
Great! :) can’t wait to test it!David DuperronCustomerHi!
It would be better to listen for a “change” event on the radio button (HTML puzzles), than repeating your check every second.
Then depending on the target.checked event property you hide or show your object.Cheers
David
David DuperronCustomerDavid DuperronCustomerJust found out that the Three.js example was already implemented in the V3D code examples repository here: Example
I would be very interested in being able to transpose this in something that would be accessible from the puzzle editors. The Transformcontrols addon itself is something I would have definitely used if I knew how to get it to work in a “puzzle” environment…
I could use some help if anyone knows how to do this!
CheersDavid
David DuperronCustomerThanks§ that works perfectly
David DuperronCustomerOk but how?? the puzzle button in the app manager is linking to the app_name.html file, with the visual_logic.xml file as a parameter, and the .js file is called inside the app_name.html file… I don’t see how to make it different for the puzzle editor and the web server.
David DuperronCustomerOh yes sorry. here is the zipped project:
I agree! but if you log the object “addedObjectDictionnary” after all these operations, you will see that the color has changed for two objects whereas the puzzles should only change one of them.- This reply was modified 1 year ago by David Duperron.
Attachments:
You must be logged in to view attached files.David DuperronCustomerHere is a simple demo showing the behaviour I do not understand:
Clone demo
Several keyborad inputs will trigger the following steps:-
“M” will append a simple cube, add its custom properties (defined in blender) as a new entry in the addedObjectsDictionnary and give it a named material, and a color according to the imported property
“N” will duplicate and rename the first appended cube, move it and COPY the first cube’s key in the addedObjectsDictionnary, as a new key, named after the second cube: duplicate_cube1.
“O” will again duplicate the first cube, rename it duplicate_cube2, move it, and this time, re-import the custom properties to define the new key in addedObjectsDictionnary.
“P” will lastly change the color for duplicate_cube1, and store the new color in the dictionnary for that key.But you will see that in the dictionnary, the color has changed for both appended_cube AND duplicate_cube1! How is that possible??
A click on the object prints the Object3D javascript object in the console.David DuperronCustomerThe objects DO HAVE independant and unique names, as well as their materials. I was able to change the colors, positions, scale, etc… independently, but as soon as I wanted to WRITE these data in my dictionnary, these parameters are “synchronized” if I do not create a new set of customProps… I’ll try to make a simple demo of this particular behaviour, it should me much simplier…
-
AuthorPosts