Opened 8 years ago

Closed 8 years ago

#4214 closed enhancement (fixed)

Add texture to spheres and cylinders in 3D visualization

Reported by: Francesco Casella Owned by: Volker Waurich
Priority: normal Milestone: 1.12.0
Component: OMEdit Version:
Keywords: Cc:

Description

The current rendering of spheres and cylinders in the new OMEdit 3D visualization uses a uniform texture. As a consequence, it is impossible to judge if the sphere or cylinder is rotating along its axis.

I would then suggest to add some kind of texture to the surface, so that the rotation becomes immediately visible.

Attachments (1)

3d.png (239.4 KB ) - added by Volker Waurich 8 years ago.
screenshot

Download all attachments as: .zip

Change History (6)

comment:1 by Volker Waurich, 8 years ago

I am not a 100% convinced of this idea since its not provided by the msl to have textures on the shapes and I would like to keep the option to let the user choose the textures.
I just dont know how this could be done best.

Of course, you could attach another shape normal to the rotation axis to visaulize the rotation.
Another option would be to build the cylinders with a small number of facettes around the circumferences. Then you could see the prism spinning. Or one adds a single facette with a different color(See the gearwheel shape in dymola to see what I mean). I am in favour of the last option.

What do you think?

comment:2 by Volker Waurich, 8 years ago

Although it would be nice to select the shapes in the viewer and have right click option like "add texture". But thats quite some work I guess.

comment:3 by Francesco Casella, 8 years ago

In Dymola, there is some shading (not really a texture) rendered on the sphere surface, and as that is quite coarse (a set of small plane patches), it has the nice side effect to make it possible to visualize the shape.

Probably the best way to do that is to (optionally?) show some spots of slightly different colour on the surface. For the sphere, it could be the north an south pole, as well as four points spaced 90° away around the equators, that is to say, the intersections of the sphere surface with the x, y, and z axes.

For the cylinder, four rectangular patches on the surface parallel to the axes and spaced 90° away from each other would be good.

The default ratio between the radius and the spot diameter / patch width could be about 1/4 of the radius (i.e., 1/25 of the circumference).

by Volker Waurich, 8 years ago

Attachment: 3d.png added

screenshot

comment:4 by Volker Waurich, 8 years ago

I have added texturing for the 3d shapes. Is the "check" texture an option that fits your needs?

comment:5 by Francesco Casella, 8 years ago

Resolution: fixed
Status: newclosed

Great!

Note: See TracTickets for help on using tickets.