[REQ] Primitives
[REQ] Primitives
Seconding kram's request, I'm creating this topic to ask about primitives. They are usefull because they are perfect in shape, and even more now that they can be used as "cuts" for medias if they are filled with "air".
So these might be usefull:
_____
a box
Need: 1 parameter: width for a cube.
optional:
- <width1> and <width2> to define a box, in the XYZ order
- <pivot> tag to set the pivot of the shape to be either top or bottom.
Without that optional tag, the default would be that the pivot is at the center of mass of the cube. The aim is to have a cube resting straight away on the floor.
________
a cylinder
Need: 2 parameters: radius and height.
optional:
<radius2>, wich would be the inner radius for a tube (hollowed cylinder)
_____
a cone
Need: 2 parameters: radius and height
optional:
a <center> or <pivot> tag if the default is not at the center of the circle.
maybe a <radius2> to create a truncated cone.
A pyramid ?
From my experience, the box and tube/cylinder are the most usefull. As usual, I'm giving detailed requests, not to claim the ownership of any idea, but to give a layout that may be "artist friendly". Just my few cents.
Cheers
So these might be usefull:
_____
a box
Need: 1 parameter: width for a cube.
optional:
- <width1> and <width2> to define a box, in the XYZ order
- <pivot> tag to set the pivot of the shape to be either top or bottom.
Without that optional tag, the default would be that the pivot is at the center of mass of the cube. The aim is to have a cube resting straight away on the floor.
________
a cylinder
Need: 2 parameters: radius and height.
optional:
<radius2>, wich would be the inner radius for a tube (hollowed cylinder)
_____
a cone
Need: 2 parameters: radius and height
optional:
a <center> or <pivot> tag if the default is not at the center of the circle.
maybe a <radius2> to create a truncated cone.
A pyramid ?
From my experience, the box and tube/cylinder are the most usefull. As usual, I'm giving detailed requests, not to claim the ownership of any idea, but to give a layout that may be "artist friendly". Just my few cents.
Cheers
That's great! Thanks!
Just for checking:
Can you also post a complete example?
Even a hollowed cylinder is there?
Very good.
-> do you mean a qaudratic prism?
Then there should be <with3>, so you can get a cuboid.
General: How to rotate those primitives?
A sphere doesn't have a rotation, but the rest....
If there are so much parameters like <with1;2;3>,
can you create an ellipsoid with <radius1;2>?
Then, if you have more than 1 size parameters, how the axes are numbered?
1=x 2=y 2=z?
Just for checking:
Can you also post a complete example?
Even a hollowed cylinder is there?
Very good.
a box
Need: 1 parameter: width for a cube.
optional:
- <width1> and <width2> to define a box, in the XYZ order
-> do you mean a qaudratic prism?
Then there should be <with3>, so you can get a cuboid.
General: How to rotate those primitives?
A sphere doesn't have a rotation, but the rest....
If there are so much parameters like <with1;2;3>,
can you create an ellipsoid with <radius1;2>?
Then, if you have more than 1 size parameters, how the axes are numbered?
1=x 2=y 2=z?
I did get you Deus... He is joking, Kram, telling I invented the cube 
Today I'm in a good mood, so take that great concept for free, before I change my mind Deus
I gave that precision in my first post because I wanted to be clear. Maybe if I give detailed ideas and they are just implemented, one could fear I will claim the ownership of these ideas (would they be trivial). That was just a written confirmation I never will, even if (imagine) I create a logo for Indigo and it is choosen (again that's metaphorical example) I will never ask for any special right as long as Indigo is given to us for free. Maybe that sounds presomptuous but I just wanted to make that clear. I don't want requests to be disregarded because my intentions would be unclear, that's it 
Kram, I'm posting this as a request, sorry, these are just ideas, not actual features of Indigo
hopefully we will get that one day ! That's what this forum is for.
I give the request a low priority afaic.

Today I'm in a good mood, so take that great concept for free, before I change my mind Deus


Kram, I'm posting this as a request, sorry, these are just ideas, not actual features of Indigo

I give the request a low priority afaic.
Again, the use IMO is the perfection of the shape, and the fact it requires no geometry data. But your opinion is acknowledged zsouthboy 
Say it's a suggestion more than a request, maybe for when Indigo will be "fully" develloped, or when Ono wants to have a rest with some easy code. This isn't required
BTW I'll have more suggestions next days (I won't use the [REQ] tag for them, sorry this one was abusive), so don't be surprised. I've been thinking at some stuff, why not share that ?
For me, ideas are free, only applications can be owned (and sometimes that's a bad idea).
Cheers !

Say it's a suggestion more than a request, maybe for when Indigo will be "fully" develloped, or when Ono wants to have a rest with some easy code. This isn't required

BTW I'll have more suggestions next days (I won't use the [REQ] tag for them, sorry this one was abusive), so don't be surprised. I've been thinking at some stuff, why not share that ?
For me, ideas are free, only applications can be owned (and sometimes that's a bad idea).
Cheers !
Maybe, cubes aren't necessary, since they only use 6 vertices and have a perfect shape.
But everything, which is perfectly round somewhere, would be helpful:
Round things need loads of geometry to be imperfectly round. Primitives wouldn't use any geometry data but would be shaped perfectly round.
So the main request should concentrate to
*cylinder
*cone
*tube
*ellipsoid
Another idea, I have, but would be much harder to do, I think:
Perfect UVs for Primitives (especially spheres and ellipsoids):
They would be UVmapped as perfect as possible with the resolution of the texture images. As if every pixel is translated to one vertex.
But everything, which is perfectly round somewhere, would be helpful:
Round things need loads of geometry to be imperfectly round. Primitives wouldn't use any geometry data but would be shaped perfectly round.
So the main request should concentrate to
*cylinder
*cone
*tube
*ellipsoid
Another idea, I have, but would be much harder to do, I think:
Perfect UVs for Primitives (especially spheres and ellipsoids):
They would be UVmapped as perfect as possible with the resolution of the texture images. As if every pixel is translated to one vertex.
Last edited by Kram1032 on Mon Feb 26, 2007 7:48 am, edited 1 time in total.
I would love to see more primitives in indigo too, but recognize that it is not high on OnoSendai priorities. I've used POV-Ray for over 15 years and really like the beauty of pure geometric forms. If you look at POV-Ray (and seriously, any computer graphics enthusiast should work with it for a while) it has over 20 primitives. A skilled artist (I'm not one) can create realistic scenes using only primitives and Constructive Solid Geometry (CSG).
http://www.povray.org
I believe currently Indigo has two primitives, an infinite plane and the sphere. If more primitives were added it then we'd also want CSG functions like difference, union, and merge. That I expect is a lot of work.
The most powerful primitive in POV-Ray is the isosurface. You can essentially create an almost infinite variety of primitive shapes using a formula. I'd like superellipsoid, taurus, isosurface, and Julia fractal, but Indigo wasn't created to be a new and improved POV-Ray. The idea was a rendering engine to use with mesh based modeling programs, not script based CSG modeling.
Still I'd love to have some more primitives
and the reality is that many of us like to tweak/modify our scenes in XML. Again, a big help toward a more powerful use of scripting in XML is to save mesh geometries from modeling programs as objects that can be reused in other scenes. The Blender exporter for 0.6 had the option to save geometries separately (although not as individual objects) from the scene description, but that was dropped in the current version of the Blender exporter for 0.7.
Whether more primitives are added or not we all owe a big thanks to OnoSendai and the others that have contributed to Indigo

I believe currently Indigo has two primitives, an infinite plane and the sphere. If more primitives were added it then we'd also want CSG functions like difference, union, and merge. That I expect is a lot of work.
The most powerful primitive in POV-Ray is the isosurface. You can essentially create an almost infinite variety of primitive shapes using a formula. I'd like superellipsoid, taurus, isosurface, and Julia fractal, but Indigo wasn't created to be a new and improved POV-Ray. The idea was a rendering engine to use with mesh based modeling programs, not script based CSG modeling.
Still I'd love to have some more primitives

Whether more primitives are added or not we all owe a big thanks to OnoSendai and the others that have contributed to Indigo

YES!
You're right:
These are missing in our list:
Taurus and different fractals with a value of how often it should be repeated^^
But, what do you mean with IsoSurfaces?
Also, you're right, these things are created by formulas...
So, maybe, it would be useful to add a primitiveformula part, like:
<primitive>
<name>PrimitiveName</name>
<var>_(put in Variables, seperate with ";")_</var>
<formula>_(put in formula here)_</formula>
<materialname>_(put in Material Name)_</materialname>
</primitive>
....or something like this.
You're right:
These are missing in our list:
Taurus and different fractals with a value of how often it should be repeated^^
But, what do you mean with IsoSurfaces?
Also, you're right, these things are created by formulas...
So, maybe, it would be useful to add a primitiveformula part, like:
<primitive>
<name>PrimitiveName</name>
<var>_(put in Variables, seperate with ";")_</var>
<formula>_(put in formula here)_</formula>
<materialname>_(put in Material Name)_</materialname>
</primitive>
....or something like this.
OMG what did I do 



Hey, that's what obj support is for ! Export objects as obj files, and call thel into the scene via the xml code (see 0.7t4 doc). Otherwise, nice support to my suggestion silvermanAgain, a big help toward a more powerful use of scripting in XML is to save mesh geometries from modeling programs as objects that can be reused in other scenes.

That's already working for specular with medium, see my last image. So union and difference is not a problem, only intersection is missing, but I think that technically that would not be that difficult, it's basically about testing wether a surface is within another sharing the same mat or not (I think).If more primitives were added it then we'd also want CSG functions like difference, union, and merge.
Indigo wasn't created to be a new and improved POV-Ray.
AgreedI would love to see more primitives in indigo too, but recognize that it is not high on OnoSendai priorities.

Who is online
Users browsing this forum: No registered users and 5 guests