Parametrical Egg models


#1

Hi all,
is there a way to load egg models with different parameters?
Let’s say, for example, that I want a generic box, whose shape depends on three parameters (height, width and depth).
Can I insert these parameters as externally settable variables?
Thank you in advance.


#2

No; though it is conceivably possible to load the .egg data into a string, do some replacements, and then load it as a string.

However, in the case of a box, you can use setScale to adjust the dimensions as needed.


#3

As for the parameters, I’m not sure what you need. As is, setPos () setScale (). You can also write a data file and use it. However, about materials it would be useful to divide the description of materials and vertex data into different files.


#4

With set scale you are forced to keep the model proportions. I just wanted to define some simple general geometries that can be loaded with different and independent dimensions.


#5

In fact, you can individually apply scaling to the axes.

setSx ()
setSy ()
setSz ()

To reset the transformation you can apply.

flattenLight ()

If the geometry is simple, then you can generate real time. In this manner - Alternative generation EGG file


#6

Ok, wonderful! thanks!