POV-Ray : Newsgroups : povray.general : Drop-Down Insert Menu Server Time
31 Oct 2024 00:36:00 EDT (-0400)
  Drop-Down Insert Menu (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: Bald Eagle
Subject: Drop-Down Insert Menu
Date: 5 Mar 2023 17:10:00
Message: <web.640512bb15f129b11f9dae3025979125@news.povray.org>
I've been juggling my usual 20 projects lately, and I noticed that there were
either omissions in the shape macros available, or the thumbnail graphic was
misleading, or I just missed something.

I thought there was a wireframe torus in shapes3.inc, but maybe not.

I also find myself (re)writing some of the same code for common tasks such as
drawing a sphere/cylinder sweep to graph equations or other "lines", creating a
union of triangles or a mesh from a 2D or 3D array, the whole PITS of making a
mesh2 {}, writing and reading data from files, using the evaluate keyword in
isosurfaces, text {}, vstr (), and other little things where the code I want
isn't at my fingertips, or the syntax or specifics of implementing a tricky
keyword aren't sufficiently clear.

Given that Josh English has inquired recently about the sample scenes, and we
have new and returning users to the forum, perhaps it's time to take a poll
about what small code snippets people would find most useful, and what sorts of
macro or function-based shapes would be desirable to have in the Insert Menu.

Also Kenneth apparently uses the resolution.ini file to do animations...

We have the heightfield-correcting macro, and the generating an image_map in
memory from a function, .... lots of stuff.

I've written a roundED_box macro which is just round_box but allows for
different corner radii, and I just adapted ring_sphere to make a ring_torus.

I went through a lot of Friedrich Lohmueller's analytical geometery macros WAY
back, but there are still some macros with descriptions in German that I can't
decipher what they are.

I find it's useful to have a "long" version that has explanatory comments for
new users or those unfamiliar with the object/keyword/macro, a usage example,
other bells and whistles, and a very short version that has minimal text for
common, everyday usage where I'm already fully familiar with what I'm doing.


So maybe if people have interesting code snippets, macros, or objects that they
have, I can assemble them into a .zip file to be added to the drop-down menu.

Others are invited to chime in on what additions they think would be useful.


Post a reply to this message

From: yesbird
Subject: Re: Drop-Down Insert Menu
Date: 5 Mar 2023 20:13:56
Message: <0620927d-605b-5bbd-d6e6-7ef11f0db090@gmail.com>
On 06/03/2023 01:07, Bald Eagle wrote:
> Given that Josh English has inquired recently about the sample scenes, and we
> have new and returning users to the forum, perhaps it's time to take a poll
> about what small code snippets people would find most useful, and what sorts of
> macro or function-based shapes would be desirable to have in the Insert Menu.
Hi, Bald.

You are doing a great job improving the POV and asking very interesting 
and, IMHO, important questions. As a new user, I would like to say that
'Insert menu' is a really great part of the POV environment, as it makes
the learning curve much smoother and pleasant.

The ability to try one of many POV features in only one click  is 
difficult to overestimate and the amount of objects and techniques is so
huge, that at first I even can't imagine that something else can be
included there, but despite that here are my two cents:

As the present menu demonstrates only a set of objects and basic
operations, I suppose we can extend it by:

1. Complete and attractive scenes with well-thinked composition,
coloring, etc, not heavy and complicated, but more 'artistic'. This way
we can demonstrate to  new user what _really_ he can do with POV.

2. Some tips and tricks or receipts that can be easily implemented to
achieve spectacular results:

2.1, Playing with shifting colormaps in pigment statement
(like here, for example: 
https://github.com/syanenko/Yes-World/blob/main/stem_01.pov )

2.2 Almost-real-time camera animation (I mean using keys: "+w270 +h360
-cc +am3 +a0.1 +ag1 -j +rtr +kla -kc", thanks to jr for advise:)).

2.3 You already mentioned height fields, as Kenneth suggested, they can
be used in CSG operations, producing interesting effects:
https://www.youtube.com/watch?v=4BEon-n-KTg

3. Library of parameterized and possibly animated simple objects:

3.1 Ready-to-use low-poly objects grouped by themes: home, technics,
sport, etc. ZBrush, for example, has special brushes for that:
https://www.artstation.com/marketplace/p/nkdA9/pack-of-45-screws-bolts-volume-01
Such libraries can simplify scene creation process and free time for
other more interesting and important works, tuning lightning and
materials, for example.

3.2 Animated toys / artifacts, restricted only by fantazy: tweeking
their parameters will produce interesting and unpredictable results.
Some of them you can find here: https://github.com/syanenko/Yes-World
I am extending this library intensively now.

In general, the main idea is to make POV more accessible and friendly to 
new users, as SDL can seems too complicated for them.
--
YB


Post a reply to this message

From: yesbird
Subject: Re: Drop-Down Insert Menu
Date: 5 Mar 2023 22:10:16
Message: <bb4548c0-9b72-8498-477e-ca2593dabedb@gmail.com>
On 06/03/2023 04:13, yesbird wrote:
> 3.1 Ready-to-use low-poly objects grouped by themes: home, technics,
> sport, etc.
More examples of constructor sets, for inspiration :):

Most desirable (for me):
https://www.artstation.com/marketplace/p/Ygjw1/fish-builder-imm
https://www.artstation.com/marketplace/p/lJL31/stylized-leaves-imm-brushes-v-1
https://www.artstation.com/marketplace/p/507xd/stylized-rock-imm-brushes-21-in-one
https://www.artstation.com/marketplace/p/vo37K/7-imm-brushes-for-creating-roof-tiles-shingles
https://www.artstation.com/marketplace/p/p0VdR/stylized-cobweb-imm-brush
https://www.artstation.com/marketplace/p/jWdwr/birds-parts-pack-36-imm-curve-brushes-zbrush

Technics:
https://www.artstation.com/marketplace/p/YBW8m/bearing-collection-imm-brush-pack-15-in-one
https://www.artstation.com/marketplace/p/wmq7/55-imm-brushe-s-hoses-and-tubes-vol-1

Interior / Architecture:
https://www.artstation.com/marketplace/p/lJDd3/300-low-poly-wooden-shed-house-farm-or-cabin-parts-and-elements-kitbash-imm-zbrush-brush-set-obj-and-fbx-files
https://www.artstation.com/marketplace/p/2dY7p/wooden-pillars-imm-brush-pack-10-in-one
https://www.artstation.com/marketplace/p/2a1Yw/wooden-pillar-collection-imm-brush-pack-in-one-16-vol-2

I need to stop myself- it's endless ...
--
YB


Post a reply to this message

From: Bald Eagle
Subject: Re: Drop-Down Insert Menu
Date: 6 Mar 2023 07:15:00
Message: <web.6405d8aa98680f101f9dae3025979125@news.povray.org>
yesbird <sya### [at] gmailcom> wrote:

Hi Sergey,

Just to make clear what the mechanism of the Insert Menu is, it's just a
directory of text files that copy-pasted into your scene.
Some of the ideas you have would be great but better suited for either include
files or as example scenes.

> 1. Complete and attractive scenes with well-thinked composition,
> coloring, etc, not heavy and complicated, but more 'artistic'. This way
> we can demonstrate to  new user what _really_ he can do with POV.

I think this can be broken down into some smaller components, such as a camera
block, a radiosity block, a lighting block, and a set of "scene composition"
tools.
Certainly taking a mesh and placing it into a well-composed scene, predominately
governed by the camera location, and giving it 3-point lighting, an HDRI
lighting sphere, and good radiosity settings would be fairly easy to do and
really provide instant guidance for even the newest of users.

> 2. Some tips and tricks or receipts that can be easily implemented to
> achieve spectacular results:
>
> 2.1, Playing with shifting colormaps in pigment statement
> (like here, for example:
> https://github.com/syanenko/Yes-World/blob/main/stem_01.pov )

There certainly are a lot of little tricks like this, scattered throughout the
forum and the documentation.  Since the list is potentially endless, such things
might best be collected into a zip archive with subdirectories dedicated to the
larger/more complicated ideas like the animations.

> 2.2 Almost-real-time camera animation (I mean using keys: "+w270 +h360
> -cc +am3 +a0.1 +ag1 -j +rtr +kla -kc", thanks to jr for advise:)).

I have never tried this feature, but it is one of the things I had in mind, but
forgot to mention.

> 2.3 You already mentioned height fields, as Kenneth suggested, they can
> be used in CSG operations, producing interesting effects:
> https://www.youtube.com/watch?v=4BEon-n-KTg

We could collectively write an entire book on CSG, and that topic probably
deserved its own document complete with references to CG texts websites, and
how-to videos.

> 3. Library of parameterized and possibly animated simple objects:
>
> 3.1 Ready-to-use low-poly objects grouped by themes: home, technics,
> sport, etc. ZBrush, for example, has special brushes for that:
> https://www.artstation.com/marketplace/p/nkdA9/pack-of-45-screws-bolts-volume-01
> Such libraries can simplify scene creation process and free time for
> other more interesting and important works, tuning lightning and
> materials, for example.

Yes, we are a bit short on meshes, and that could be a good idea for another zip
archive.    Part of the appeal of primitives and procedural scenes is that they
are SMALL, and don't contribute much to the overall size of the POV-Ray
distribution.  Whereas my recent "unrolling" of the vase generated two 28 MB
ASCII CSV files.


The ideas are indeed endless, and the key is to thoughtfully create the required
text files that strike a good balance between doing enough to suggest further
variations and applications, but not so much that it becomes too busy and
confusing.

Hopefully this afternoon I'll expand upon that idea to suggest a format and a
few guiding principles.

For example: I had a project going to provide a working code example for every
single keyword:

http://news.povray.org/povray.binaries.misc/thread/%3Cweb.604598da4b83c70f1f9dae300%40news.povray.org%3E/


Post a reply to this message

From: yesbird
Subject: Re: Drop-Down Insert Menu
Date: 6 Mar 2023 14:44:38
Message: <ed9f1c38-df1d-84d7-b09a-ef918afa866a@gmail.com>
On 06/03/2023 15:12, Bald Eagle wrote:
Hi, Bill.

> Just to make clear what the mechanism of the Insert Menu is, it's just a
> directory of text files that copy-pasted into your scene.
Thanks for info, I had a look at this structure, it's simple, will be
easy to modify.

> Some of the ideas you have would be great but better suited for either include
> files or as example scenes.
No doubt, we can include in menu only code snippets, that use data from
'inc's.

> Certainly taking a mesh and placing it into a well-composed scene, predominately
> governed by the camera location, and giving it 3-point lighting, an HDRI
> lighting sphere, and good radiosity settings would be fairly easy to do and
> really provide instant guidance for even the newest of users.
This is exactly what I would like to have, still looking for good set of
studio environments. Prepare such environment is not easy task for
newcomer.

> There certainly are a lot of little tricks like this, scattered throughout the
> forum and the documentation.  Since the list is potentially endless, such things
> might best be collected into a zip archive with subdirectories dedicated to the
> larger/more complicated ideas like the animations.
Having such cookbook will help a lot to start working with POV quickly
and smoothly, saving a time on digging in manuals.
Something like best practice ...

> We could collectively write an entire book on CSG, and that topic probably
> deserved its own document complete with references to CG texts websites, and
> how-to videos.
I believe it will be demanded material for those, who wants to study CG
more deeply. Not so many people knows what CSG is, because most of the
scenes are made from polys now.

> Yes, we are a bit short on meshes, and that could be a good idea for another zip
> archive.    Part of the appeal of primitives and procedural scenes is that they
> are SMALL, and don't contribute much to the overall size of the POV-Ray
> distribution.  Whereas my recent "unrolling" of the vase generated two 28 MB
> ASCII CSV files.
I said 'low-poly', while mean small object, also constructed from POV
native solids too, sorry for misunderstanding. As an example I've
attached few small poly-objects fetched from my standard Z-Brush
installation. Not sure about licensing, but, suppose, it can be checked.
If publishing of them is correct under POV license, we can look at them
as a seed of future prefabs library. Just let me know if you want more
of them.

> The ideas are indeed endless, and the key is to thoughtfully create the required
> text files that strike a good balance between doing enough to suggest further
> variations and applications, but not so much that it becomes too busy and
> confusing.
Exactly, but at present time for the first look of a new user, POV is a
complicated tool for programmers, not for end-user. The idea is to
introduce it as a simple toy, to help users to make a first steps, with
sequential increasing complexity.

> For example: I had a project going to provide a working code example for every
> single
keyword:http://news.povray.org/povray.binaries.misc/thread/%3Cweb.604598da4b83c70f1f9dae300%40news.povray.org%3E/
Interesting, I will look at it.
--
YB


Post a reply to this message


Attachments:
Download 'prefabs.png' (35 KB) Download 'prefabs_obj.zip' (50 KB) Download 'prefabs_pov.zip' (56 KB)

Preview of image 'prefabs.png'
prefabs.png

From: Bald Eagle
Subject: Re: Drop-Down Insert Menu
Date: 6 Mar 2023 16:35:00
Message: <web.64065c1898680f101f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Hopefully this afternoon I'll expand upon that idea to suggest a format and a
> few guiding principles.

I'm just going to disgorge a few ideas off the top of my head to add to the
list.

Something that would be helpful would be what Jim Henderson seems to have a
talent for - searching all 30 years of the POV-Ray forum, and compiling an
ordered list of some of the most-asked questions.  After all, one of the
fundamental goals (in my mind) for the Insert Menu is preempting the most basic
and most-asked calls for help in coding, keyword syntax, or feature use.
A simple task like making a scene that renders an image with a transparent
background ought to be just that - simple.   Click, drag-down, click, done.

I'm sure that there are things that we all struggle with.  Functions, gamma,
data structures, vector math, matrices, making a pot of coffee without having
had a cup of coffee yet, etc.  Very often, the presence or absence of a quick
and easy way to reference some key bit of code can make or break a project, or
turn what should have been the straightforward coding of a scene into a weekend
long odyssey of searching directories and forums, and backups for critical bits
of code to make something work.  So having a pre-written snippet of code that
performs some task that's a barrier to completing a scene is likely to make a
lot more projects come to fruition.

I have a lot of bits of things stored here and there, and I suppose I'll just
list a few here to see what interests people and solicit comments.

I have lot of things that I've written over the years to help myself and new
users lay out scenes and overcome the usual difficulties experienced when
scaling and rotating things, placing light sources, and positioning or orienting
objects.   Friedrich Lohmueller wrote similar things, and jr even did a whole
rewrite of the grid system to assist in placing objects in a scene.

I have a bounding box macro that I improved to make the lines fully visible
regardless of how far away from the camera it is.

Calculation of matrix determinants.  This is useful for things like vector cross
products for calculating surface normals, incenters of tetrahedra, and likely
other things of which I'm currently blissfully unaware.

A whole system to graph equations - basically a graphing calculator for POV-Ray.
 Pretty useful for debugging functions, developing ne functions, or placing a
graph of a function in a render where you're trying to illustrate the effect of
a function.

The big Hexagonal Color Histogram project which analyzes images and provides
graphical and color_map data for replicating or creating derivative works from
images.  Useful for getting all of those colors right in a pigment, texture, or
material.

A macro that calculates the intersection point of two 3D lines.

A macro that calculates what the minimum visible radius for a sphere or cylinder
is - how big one pixel is at any given distance from the camera location.

A macro that determines what octant a given point is in

A macro that calculates the intersection line of two planes

A macro that calculates the shortest distance of a point from a line.
Essentially the point on a line where one can draw a perpendicular line to
intersect that other point.

a sphere-cylinder sweep

A file that makes spheres starting from regular polyhedra by subdividing
triangles

The analytical tangents between circles project

A macro that generates a hardwood floor

Code that shows numerical values in pigment patterns

Somewhere I have one good implementation of a catenary curve - amidst a lot of
bad ones

Code to calculate the radius of a circle given the width and depth of the secant
 part of a circle's sector


..... and likely more.




> For example: I had a project going to provide a working code example for every
> single keyword:

This was instructive, because I needed compact, versatile code for creating the
basic scene elements for a variety of keyword types.  Sometimes I needed to
display an object, other times I needed to graph a function.  Sometimes I wanted
a perspective camera, other times orthographic.  Sometimes I needed a Cartesian
graph, other times I needed a polar graph.
So I made a fairly small include file to handle all of those tasks for
everything I needed.

I'd say that a good submission for something like this would be a full
standalone scene that made use of a core include file, and made proper use of
the usual include stack and version wrappers.  Then, a simple, stripped-down
code snippet with proper indentation and a minimum of extraneous text or
exceedingly common modifiers (translate, scale, rotate, ...).   I use things
like phase, octaves, turbulence, etc infrequently enough that it would probably
be helpful to have those included in the snippet.


Every project has its contributors and detractors.

I think that serious work on this would give us many components necessary for
efficiently working on the sample scenes for future distributions.

The sample scene stuff has some clever code in (IIRC) an ini file for scanning a
..pov file for the presence of preferred rendering resolution/image size, and
that would be a handy bit of code for the insert menu (I believe we have zero
Insert menu items for writing .ini files).

I was also thinking about Sergey's desire for animations, and thought a neat
idea would be to have a similar mechanism to TdG's eval_pigment scene which
checks for the existence of a file, writes data to disk and then skips that part
and renders on the second rendering.
The thought here is to have a .pov file check for an .ini file, if it doesn't
exist, write one, and render the first fram of the animation (why not), and then
have the resulting .ini file be ready to render all of the frames of the
animation starting from the second.  (or of course, one can just skip rendering
with an error message instructing the new user to run the resulting .ini file
instead - or just rerender the first frame along with all others from the ini
file.)

- BW


Post a reply to this message

From: yesbird
Subject: Re: Drop-Down Insert Menu
Date: 6 Mar 2023 16:41:59
Message: <3102804d-d55e-a376-7563-b63ca8bf68cd@gmail.com>
On 06/03/2023 15:12, Bald Eagle wrote:
> Certainly taking a mesh and placing it into a well-composed scene, predominately
> governed by the camera location, and giving it 3-point lighting, an HDRI
> lighting sphere, and good radiosity settings would be fairly easy to do and
> really provide instant guidance for even the newest of users.

I remembered another one domain where POV has advantages and where an
accurate lighting environment is important - jewelry.
A few scenes with gems, gold and silver will look very attractive, but
this is a challenging task for experienced POV-ers.

Here described very promising approach to jewelry rendering:
https://www.lilysoft.org/CGI/SR/Spectral%20Render.htm

Unfortunately I still have no time to try it.
--
YB


Post a reply to this message

From: Bald Eagle
Subject: Re: Drop-Down Insert Menu
Date: 6 Mar 2023 18:25:00
Message: <web.640675d098680f101f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> The sample scene stuff has some clever code in (IIRC) an ini file for scanning a
> ..pov file for the presence of preferred rendering resolution/image size, and
> that would be a handy bit of code for the insert menu (I believe we have zero
> Insert menu items for writing .ini files).

Crap.
It's a shell script...   but maybe someone has some ideas for using shellout
.....


C:\....\POV-Ray\v3.8-beta\scenes\38BetaSource\scripts


Post a reply to this message

From: ingo
Subject: Re: Drop-Down Insert Menu
Date: 7 Mar 2023 02:00:02
Message: <web.6406e0da98680f1017bac71e8ffb8ce3@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Others are invited to chime in on what additions they think would be useful.

Just something your thread made me think about and before I forget it again,
Supercollider has documentation integrated in its GUI. This gives the user the
possibility to run code samples straight from the docs.

ingo


Post a reply to this message

From: kurtz le pirate
Subject: Re: Drop-Down Insert Menu
Date: 7 Mar 2023 11:58:21
Message: <64076d2d@news.povray.org>
On 06/03/2023 22:41, yesbird wrote:
> Here described very promising approach to jewelry rendering:
> https://www.lilysoft.org/CGI/SR/Spectral%20Render.htm
> 
> Unfortunately I still have no time to try it.


I just downloaded the zip and render "Prism.pov".

This is what I get with E_Phillips_Mastercolor_3K
Nothing to do with the image on the web page

Is my version of povray buggy ?

Persistence of Vision(tm) Ray Tracer
Version 3.8.0-alpha.10013324.unofficial






-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message


Attachments:
Download 'prism.png' (5 KB)

Preview of image 'prism.png'
prism.png


 

Goto Latest 10 Messages Next 5 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.