Custom preview for the simulation geometry

Started by Xylotica, April 01, 2022, 08:06:22 PM

Previous topic - Next topic

Xylotica

I'd like more control over the aspect of the simulation geometry.
In particular, I'd like the meshes to display transparent.
Sadly, Rhino ignores the transparency settings of the wiewports display mode for the standard KUKA|prc display.
So I tried to do my own custom preview, using data from the "GEO" output of the Main KUKA|prc component, and adding a transparency value.
There are three branches in the "GEO" output :
-One for the meshes,
-One for the colors (which has the same list length as the meshes)
-One for the trajectories (curves)

I can't find the logic of distribution for the colors...

Johannes @ Robots in Architecture

Hello,

If you want a transparent robot, just create a custom robot with custom materials.
Please check the example attached, if that works I can provide you with the meshes and data for yours.
The order of meshes and colors is affected by multithreading, whatever thread is fastest outputs the mesh first. If I need that value in a particular order I usually sort by number of vertices or something like that.

Best,
Johannes

Xylotica

#2
QuoteIf you want a transparent robot, just create a custom robot with custom materials.
Actually, it's more important to me to have a transparent Turntable because I also reference the stock material and I'd like to see the trajectories inside it.

QuoteThe order of meshes and colors is affected by multithreading, whatever thread is fastest outputs the mesh first. If I need that value in a particular order I usually sort by number of vertices or something like that.
Hmm... that doesn't really answer my question. The problem is that, in the "GEO" output, the list of colors has the same length as the list of meshes, so I suppose there is some kind of "pairing" intended.
But what are we to do with these lists if the items are shuffled ?
Moreover, there seems to be no colors for the trajectories (polylines)...

Ideally, there would be :
-A list of meshes
-A list of colors corresponding item-by-item to the list of meshes
-A list of curves
-A list of colors corresponding item-by-item to the list of curves

Regarding only transparency, it could also be a simple slider-option in the KUKA-prc main component  : Transparency for meshes 0 -> 255

Johannes @ Robots in Architecture

Hello,

The order of colors should correspond with the meshes!
For the turntable an easy fix would be just create a "mesh wireframe".
So duplicate some edges and in GH use Multipipe followed by Mesh from SubD to get an outline with low resolution for high performance.
Then you can create your turntable with that geometry. I usually try to keep individual meshes <5000 faces.

Best,
Johannes

Xylotica

QuoteThe order of colors should correspond with the meshes!
That seems to be the case indeed, but then could you please expose the line colors ?
The color changes at each frame because the path already done is in dark grey while the remaining path is light grey.
Without this data, all I can do is apply a single color to all the curves, thus losing important visual cue.

QuoteFor the turntable an easy fix would be just create a "mesh wireframe".
Thanks but I'm afraid this would be a bit messy ; I prefer transparency.

I think it would be very nice to just have a "Simulation mesh transparency" option.


Xylotica

#5
OK, I just realized the logic of the curve list :
-Item 0 is the path that has been done
-Item 1 is the remaining path
-Item 2,3 and 4 are some kind of frame on the TCP, but which isn't really the TCP

Anyway, once this is figured out, it becomes very easy to color the paths and re-orient and define tool X, Y and Z to one's preference.
See attached.

I guess my question wasn't well formulated from the beginning...

Johannes @ Robots in Architecture

Hello,

The challenge with transparency is that I had a lot of problems with the order of transparency.
For example, the geometry from the robotic cell component is always transparent, and it needs to be drawn in a certain order because otherwise the opaque geometry behind it might still be hidden (even if the geometry in front is supposed to be transparent).
What I'll do in a subsequent update will be to take the the vertex color of an external axis into account, like for the Custom Robot.

Currently I barely have time to get anything done, but I'll try to have it implemented soon.

Best,
Johannes