-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isoSurfaceVolumeData does not update surface values #1192
Comments
I suspect this is not supported. @aarbelaiz may have an idea. It sometimes works to replace the complete node in the dom, rather than modify the attribute. As a workaround, you could also predefine selectable field values in many nodes, and use the "visible" flag to switch those on and off as necessary. |
I do not recall if real-time changes of iso-values where possible, but as uniform values it should be possible. Later I will try to make an example and look at the code then I will report back. |
Thanks. I was attempting this because I saw this being implemented in the virtual natural history museum. It allows the user to modify the threshold value for the surface real time. Pretty neat effect. But the code is not accessible on this website so I couldnt see how it is done. |
I recall helping Michael with his great natural history museum. It looks like the solution was to develop a custom ProjectionStyle node "ProjectionVolumeStyleMHH" which includes an isosurface option. You can actually access the code with devtools, using the network tab. |
Yes it seems there is a limitation in field change updates at the VolumeData level nodes. I will require time to think about a better solution, however the following one line change has worked for me:
Just add this.vrcSinglePassShader.nodeChanged(); to the |
@aarbelaiz That works, thanks! |
Hi,
I've been trying to create an iso surface of volume data that can be modfied by the user with a range slider. The slider simply updates the attributes of the isoSurfaceVolumeData node. However, it does not update the iso surface. Ive tried to combine it with the triggerRedraw function, but no effect.
Is this a bug, or simply non-existing functionality? In the source (see below) I found the comment 'TODO: Reload node', perhaps suggesting the latter.
fieldChanged : function ( fieldName )
{
switch ( fieldName )
{
case "surfaceValues":
this.uniformFloatArraySurfaceValues._vf.value = this._vf.surfaceValues;
this.uniformFloatArraySurfaceValues.fieldChanged( "value" );
//TODO: Reload node
break;
case "surfaceTolerance":
this.uniformFloatSurfaceTolerance._vf.value = this._vf.surfaceTolerance;
this.uniformFloatSurfaceTolerance.fieldChanged( "value" );
break;
case "contourStepSize":
//TODO: Reload node
break;
}
},
Is there a quick way to modify the source so updating the iso values works real time?
The text was updated successfully, but these errors were encountered: