Visual Selector and Script
-
Hi !
I have a question about the visual selector. Initially i have a texture of minecraft blocks, (there 16 blocks out of 16). I have increased the Length U and V to 1600% so each block fit on the plane. Then if i increase the value of Offset U and V from 100%, it switch to another block.
So, my question is, how can i create a way to switch to anyone blocks, just on clicking on the block with the visual selector?
I saw there are a "Command" Action in Visual Selector parameters. I not good a Python Scripts, how can i do this with script?
Thanks !
image link : https://we.tl/t-R3HAbl90ZO
-
Hi Pitchi,
The command is an option to place a specific instruction that should be executed if the Hotspot is clicked.
The Specific command is based on the idea that almost anything has a command to call it up.
The Script Log provides this "command". Please have a look here:
https://help.maxon.net/c4d/2024/en-us/Default.htm#html/TCAVS-ID_CA_TAG_VS_GROUP_SETUP.html#ID_CA_TAG_VS_COMMANDIn your case, that would require 256 hotspots, but no command can be programmed; they are fixed instructions. Hence, there is Python. But coding is not part of this forum; that would be here:
https://developers.maxon.net/forum/As the code can be changed, I can't control all submitted code constantly to avoid harm to everyone here. Hence, we decided that code is where enough professional coders have an eye on things, not here, sorry.
Since I believe you don't want to set up 256 hotspots and click 256 times to set up 256 offset values, what is the target when it renders?
Cheers
-
Hi ! okay i will ask the another forum
Thanks
-
Thank you for the reply, Pitchi,
I hope you get what you need; Python might lead to a simple solution.
I was exploring the Interaction Tag for this at the moment. It may be worth a try, but my exploration (so far) of this setup is that it needs some care.
Cheers
My best wishes.
-
Hi Pitchi,
Here is a rough idea. That is pretty much what many Character Rigger Artists would do.
Use the "Move Me!" object to select the field. The frame will "snap." Then, the offset for the material is calculated, and the texture on the right plane is adjusted. Did I say rough?
https://stcineversityprod02.blob.core.windows.net/$web/Cineversity_Forum_Support/2024_PROJECTS_DRS/20240814_CV4_2024_drs_24_TXsl_01.zip
Cheers
-
P.S.: Here is a 30 sec overview about the file above
https://stcineversityprod02.blob.core.windows.net/$web/Cineversity_Forum_Support/2024_Clips_DRS/20240815)XP-Selector-rig.mp4Cheers
-
Thanks you ! That's help me !
-
Hi Pitchi,
Thanks for the time to share a feedback!
My best wishes