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.

Generate New Materials

Home Forums Programming Generate New Materials

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #65926
    David Duperron
    Customer

    Hi again,
    I would like to apply different basic wireframe materials (only the color would change) to copies of a base object (a simple circle), that are create on the fly by puzzles, according to a list.
    Basically I have {{object_01, #123456}, {object_02, #456789}}
    and I would like to create a circle with the name “object_01” and assign a nem wireframe material with the color “#123456”, same for “object_02”, etc…
    Can I do this with puzzles, or some javascrip script that would run inside puzzles?
    Thanks for the help!

    David

    #65927
    kdv
    Participant

    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.

    #65929
    David Duperron
    Customer

    Hi!
    Thank you again, that is quite simple indeed… However, ideally I would like to have only the outer circle line (i.e. draw only a circle, not have the center vertex and the radiuses lines…).
    I imagine that the “clone object” puzzle will have the cloned object share the same material and I won’t be able to affect a single material per object.
    Do you see a way to clone a base circle (without the radiuses) and still be able to control it’s own material?

    Cheers

    David

    #65930
    kdv
    Participant

    ideally I would like to have only the outer circle line

    impossible. any geometry is always triangulated. n-gons are not allowed in THREE.js, triangles only.

    Or you can use a texture of a circle…

    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.

    #65936
    David Duperron
    Customer

    I mean using the “line rendering” option in Verge3D mesh panel (see below)

    I can have something looking like this:

    But I don’t know if and how I can change the line rendering color (is it possible??)

    #65939
    kdv
    Participant

    Line rendering uses “MeshLineMaterial”. You can’t access its properties in Puzzles.

    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.

    #65942
    David Duperron
    Customer

    I’m pretty shure there is a solution to get what I need.
    Perhaps using helpers like the “polar grid helper” on GlifTek’s helpers plugin, which I alos bought, but I am facing another issue with this one, as I cannot find how to control the added helper (move/snap to another object…) once added, and GlifTek is not providing any answer yet…
    I manage to create exactly what I need (a single circle, with a color as defined in my list), but the helper sticks to the world’s origin, and I can see no mean to move it… :(

    #65944
    kdv
    Participant

    The solution is as simple as two fingers…

    I cannot find how to control the added helper (move/snap to another object…)

    They have no names. That’s why they are not visible in puzzles.

    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.

    #65947
    David Duperron
    Customer

    Ok, but this will not work with a pure “line” object, like my circle which does not have any face, and is rendered uniquely when the “line rendering” option is ticked, am I right?

    #65948
    kdv
    Participant

    Why not? :scratch:
    https://v3d.net/mra

    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.

    #65950
    David Duperron
    Customer

    but how do you set-up the original circle object in Blender? no material assigned? No “line rendering” option ticked? If I do so, I don’t see anything in the scene once duplicated…
    Sorry for these questions if they seem dumb…

    #65952
    kdv
    Participant

    Just exported the circle with the “Line rendering” option enabled. Nothing unusual.

    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.

    #65960
    David Duperron
    Customer

    I can’t make your puzzles work! :(
    first I don’t have your “rename object” puzzle, and I always get an error message
    Uncaught ReferenceError: clonedObject is not defined
    Here is my Puzzle configuration for a very simple scene where I have a Circle exported with line rendering option as you mention.

    I’m lost… again…

    #65961
    David Duperron
    Customer

    correction:

    I HAVE this puzzle, as I bought your plugin package and it’s included in it… So now the puzzles work and the object is copied, BUT, the material is cloned and both circles now have the same color (the one which is defined in the exec script puzzle)…

    #65962
    David Duperron
    Customer

    Correction #2

    I also have your “clone object” that I was not using, and which solves this issue! No precise idea of what is done differently, but well… it’s working!
    You’re great, thanks again…

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