Forum Replies Created
- 2019-10-03 at 2:09 pm in reply to: How to call a V3D function from outside the iframe? #19795
Object now works but object.material is undefined.123456var object = win.v3d.apps.scene.getObjectByName("Load Cell Main Body FULL");var mat = object.material;// var index = mat.nodeRGBMap['RGB'];// mat.nodeRGB[index] = new v3d.Vector4(1, 0, 0, 1);// mat.needsUpdate = true;
I have R.G.B. values from HTML and just want to change the color node “RGB” of a Principled material whenever my color picker event fires.
Or I could call a visual_logic.js function from outside the iFrame somehow? as that contains function
setMaterialColor(matName, colName, r, g, b)
Sorry to ask these questions, next time I will start with a code template and go from there.
2019-10-03 at 1:27 pm in reply to: How to call a V3D function from outside the iframe? #19788
- This reply was modified 1 year ago by D3Pixel.
Brill, thanks so much for the quick answer Yuri!
Great, glad to know you guys listen. Top developers!
Ah ha, thanks for the tip! that will save me some time.
Excellent, I love reading about the updates you guys are doing.
If you are thinking of adding this, may I suggest some puzzle features that I use from the VRay clipper:
1. Objects to be clipped [object name / list]
So we can either clip everything or only designated objects
2. Cap material [material name] or [use object material]
A material that is used for the clipped faces. Can include a texture that is planar projection mapped. Or use the material of the object being clipped.
3. Clipper object [object name / list] [use bounds]
The object(s) that are used for clipping. I assume fast clipping would use an infinite planar object in X/Y. If [use bounds] is checked then assume the user wants to use a custom mesh as the clipping object. e.g. a edited mesh / a sphere etc and so it should not clip infinitely in X/Y.
Animation on clippers or objects should be respected.
Glad to hear you are interested in this area Yuri! Having a blast with Verge3D at the moment trying to get my website ready. Clipping planes have always been a request from my clients so to have that in Web3D would be quite amazing.
One other thing to note when using these clipping shader effects is that if the mesh is not a solid object (as in no split edges etc) then it can cause errors. So a lot of effort needed to go into the CAD imports making sure everything was welded. This took a lot of time and sometimes I just remodeled imports parts to get a water tight mesh.
I do a lot of ray traced rendering for CAD company’s and they always want to show whats going on inside a model. For higher quality stuff I use VRay Clipper as it can use the mesh material as its cap material with a planar map and supports animation but it would be crash prone sometimes.
VRay Clipper shader effect:
Blender Cycles/Eevee does not have this yet although I have been asking for it for years.
The three.js webgl example I posted earlier was one of the best examples I found. There are others I have bookmarked too like these Unity ones:
Discussion on it
Result from that discussion (i think)
Video if it:
Note these are all shader effects, not Boolean cuts. The three.js example I posted earlier should be useable by Verge3D but it might need a mod to the blender addon to designate a planar object as a Verge3D “Clipper” for it to be used.
This thing not the same as boolean. When boolean cuts an object it fills the place where he cut with mesh, so you get solid object and thus thing that Yuri showed just cut object visually and do not fill the cut place, so you will see an opposite side if poligons.
Maybe this will help you guys implement controllable clipping planes. Would be immensely useful for engineering Web3D where cuts across many objects could be animated. The ultimate clipping I have used so far is VRay Clipping Planes. Very powerful as a shader effect.
Anyway, check it out:
Maybe this is Verge 3D puzzles using Local rotation and Global rotation?
Or you need to reset rotation in Blender (CTRL+A)
Or your object has a parent so it is offset from that.2019-09-25 at 8:53 pm in reply to: Can we have a JS error if the gltf does not match visual_logic.js #19286
Ok, maybe a [debug = true] puzzle during development could be considered.