question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to update rendering upon geometry color/material change?

See original GitHub issue

How does one update rendering upon geometry color/material change? In an older version of Helix, we used to detach and re-attach the GeometryModel3D objects like so: https://github.com/DynamoDS/Dynamo/blob/f0337bd5bd86d5c75571bd7d7d6f45caa4301580/src/DynamoCoreWpf/ViewModels/Watch3D/AttachedProperties.cs#L40.

var geom = (GeometryModel3D)obj;
                
                if (geom.IsAttached)
                {
                    var host = geom.RenderHost;
                    geom.Detach();
                    geom.Attach(host);
                }

I understand that this was probably not the best way to do it performance-wise but any suggestion on the recommended way to do so in the newer versions of Helix would be helpful. @holance?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
holancecommented, Feb 25, 2020

Now you can use VertexColorBlendingFactor = 1 to use vertex color in phong material.

0reactions
mjkkirschnercommented, Feb 20, 2020

@holance vertex color as the diffuse color in a Phong Material - exactly! I won’t turn down blending with the diffuseColor 😉 - but I don’t think it is required for my use case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to update things
If you want to change the number of points rendered after the first render, do this: line.geometry.setDrawRange( 0, newValue );. If you want...
Read more >
How to change geometry color on click in three.js
I found an example on the official website. I want to change the color of geometry by clicking the button. How can I...
Read more >
Modifying RealityKit Rendering Using Custom Materials
The following surface shader calculates and sets the fragment's base color based on the tint and color values from the material's CustomMaterial. BaseColor ......
Read more >
Geometry of one object changes (doesn't update) when I ...
I must have duplicated an object in a few hours ago and it was invisible in viewport, but visible in render. I deleted...
Read more >
Using Attributes to Control Materials — Rendering with Mantra ...
If you are not sure "what on Earth" is happening, what can I say ... or inherit with the geometry to control the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found