We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

One Material, Multiple Colors

Home Forums Graphics / Blender One Material, Multiple Colors

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #69030
    kgmoney
    Participant

    Hi,

    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!
    Kevin

    #69034
    kdv
    Participant

    Show your material in Blender first to see what you want…

    Puzzles and JS. 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 meaning at all.

    #69036
    xeon
    Customer

    use 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.com

    #69041
    Mariusz
    Customer

    You 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:
    You must be logged in to view attached files.
    #69048
    kgmoney
    Participant

    Thanks @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?

    #69049
    kgmoney
    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.

    • This reply was modified 4 months, 3 weeks ago by kgmoney.
    Attachments:
    You must be logged in to view attached files.
    #69052
    kgmoney
    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!

    #69054
    kdv
    Participant

    Yeap, the Object info node is exactly what you need. You can adjust color/alpha both in Blender and Verge3D (via scripting)

    Puzzles and JS. 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 meaning at all.

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.