4
$\begingroup$

I want to render a certain geometrical object for a scientific paper. It should look nice, but the main point is that I want to make the shape as evident as possible. I would like to get a result similar to what one would get with Jmol (though I would hope for a much nicer look).

You can take a look at the shape here. For those who know about this stuff, it is sort of like a smoothed cuboctahedron. It has two kinds of "faces", triangular ones and square ones. I would like that to be clearly visible in the render.

Maybe it helps to know how the mesh was created. I generated each slice of the solid along the z-axis and wrote a script to generate the whole mesh. Maybe the reason why I can't seem to get a nice looking render is related to the way I generated the mesh? Or maybe I am just very incompetent in dealing with Blender (most likely this is the case).

Any help would be welcome!

$\endgroup$
  • 3
    $\begingroup$ Can you elaborate on what you consider a "nice render"? Do you want the object to feel like slices? Are you looking for a smooth looking object with a continuous surface? Shiny? Dull? Color? Texutred? Transparent? Background? Wireframe? A reference image of what you are after would be a good way to find suitable answers. $\endgroup$ – user1853 May 16 '15 at 2:18
  • 1
    $\begingroup$ Please place images in your question if you like. $\endgroup$ – atomicbezierslinger May 16 '15 at 5:25
  • 1
    $\begingroup$ Hello! I want the faces to be clearly visible, whether it is shiny, colorful, I don't care. No textures though, and not transparent. No wireframe either. I think I am going for more contrast between the faces of the body. $\endgroup$ – Fernando May 16 '15 at 12:01
6
$\begingroup$

In edit mode, with all geometry selected hit Ctrl+N to recalculate the face normals, they are doing crazy things. This unifies their direction.

A render of the cuboc you provided, with light spheres (Cycles Emission material) placed at incident angles with respect to the faces they are intended to highlight.

enter image description here

You have more Z slices, than XY steps around the object, this produces elongated polygons, and is one reason why you won't get smooth surfaces. You will get neater results if you can generate more points per z-slice, resulting in the polygons being closer to square shapes. Either that or fewer Z slices, but then you loose detail.

enter image description here

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Hi! Thanks for your answer! I cannot make the body myself though. It is given by a polynomial, and it should be exactly what it is. :) $\endgroup$ – Fernando May 16 '15 at 12:01
  • $\begingroup$ @Fernando I've updated my answer $\endgroup$ – zeffii May 16 '15 at 13:29
  • 1
    $\begingroup$ @Fernando if the shape is parameterized as a polynomial, can you not sample it as little or as much as you like? $\endgroup$ – ajwood May 16 '15 at 16:23
  • 1
    $\begingroup$ Hello all. I think this answer was quite good. Yes, the region is parameterized by a polynomial. But it is a very complicated one, nothing you can just type in Blender or so. I think my current approach to generate the region is however not the best. :) I will try to do it in another way. But it is useful to know that the shape of the regions matter, etc. And the normals trick is also quite helpful (I have the hardest time finding anything inside blender, having just used it very little). Anyway, thanks for the answer! $\endgroup$ – Fernando May 16 '15 at 23:53
  • 1
    $\begingroup$ @Fernando blender has a very decent Python API with many mesh operations, including a Convex Hull generator which is quite adept at skinning (attaching faces to) such objects $\endgroup$ – zeffii May 17 '15 at 7:06
2
$\begingroup$

As @zeffii noted, the main problem was that the faces were not really nice in my model (that, and the shape is just not very helpful in fact). I was using a rather stupid method to generate the faces, however, by generating each slice and so on (because I had that already implemented for other reasons). Later I found out Blender had a plug-in that can plot functions you type in some textbox, but that was not good enough for me because my function was too complicated for it.

Turns out there is a very simple way to make a decent plot however. In the end I used Sage to plot my function (using implicit_plot3d), which generates a Sage Graphics object. This object contains a list of vertices and faces of the resulting mesh. You can save this and write a very short Blender/Python script to read the file and generate your mesh. This is a much better method! And Sage can handle any sort of complicated function you can come up with. The whole thing ends up being quite quick and painless.

Hope this helps!

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.