Home › Forums › Graphics / Blender › One Material, Multiple Colors
Tagged: blender, custom properties, Drivers, materials
- This topic has 7 replies, 4 voices, and was last updated 1 year, 10 months ago by
kdv.
-
AuthorPosts
-
2023-12-08 at 2:33 am #69030
kgmoney
ParticipantHi,
In Blender, I can use custom properties as drivers in a material so that I can have one material shared by many objects and yet tweak the material on each of those objects (each one can have a different color for example). This is really handy, but I understand that Verge3D doesn’t support blender drivers.
What would be a way to accomplish the same thing in Verge3D. I’d like to have only one material to manage, but I want each of my objects that use that material to have their own color and transparency. Also, I’m using Javascript, not puzzles.
Thanks!
Kevin2023-12-08 at 3:52 am #69034kdv
ParticipantShow your material in Blender first to see what you want…
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2023-12-08 at 5:39 am #69036
xeonCustomeruse an atlas map…a single image texture that contains all the graphics you need then apply the textures/colors based on UV coordinates.
Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2023-12-08 at 11:11 am #69041Mariusz
CustomerYou can also use the Object Info node and its Color slot. Then you can set up the individual colors per each object in the Object Properties tab -> Viewport Display -> Color.
Attachments:
2023-12-08 at 4:28 pm #69048kgmoney
ParticipantThanks @Mariusz….I’ll give it a try….any tip on what properties I need to manipulate via my javascript to change the Viewport Display Color in Verge3d?
2023-12-08 at 4:33 pm #69049kgmoney
Participant@kdv
Sorry, misspoke…I did try drivers, but was I meant to say was custom properties with an “attribute input” node. Here’s my setup in blender….all three cubes use the same material, but have different values in the “myprop” custom property.
Attachments:
2023-12-08 at 5:34 pm #69052kgmoney
Participant@Mariusz
Looks like I have your solution working….from javascript, I can change [object ref].objectAlpha and [object ref].objectColor to achieve my goal. Thanks!
2023-12-08 at 7:20 pm #69054kdv
ParticipantYeap, the
Object infonode is exactly what you need. You can adjust color/alpha both in Blender and Verge3D (via scripting)Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
-
AuthorPosts
- You must be logged in to reply to this topic.


