Skip to content
Forum Archive

Adapt preset (morphing raytraced shape)

12 posts

UIUC85#

Adapt preset (morphing raytraced shape)

Raytraced morphing solid. 🙂 I had dandy time making this one... Read the comment if you have questions. That should explain most things. Comments? Thoughts? Ideas?
UnConeD#
Looks really nice... good colors and texture (though the yellow/white is a bit too bright for my taste).
The particles are a nice touch btw.

Maybe you could work on the rotation a bit more so it responds and adjusts itself to the music (smooth increases/decreases onbeat, etc).

Nice turning it from technical idea to preset 😉. With a couple more touches in terms of response, this would be top-notch.

Oh and an optimization trick for your shading. Instead of:

len=invsqrt(sqr(dsx)+sqr(dsy)+sqr(dsz));
dsx=dsx*len; dsy=dsy*len; dsz=dsz*len;
len=invsqrt(sqr(rix)+sqr(riy)+sqr(riz));
rix=rix*len; riy=riy*len; riz=riz*len;
... (dsx*rix+dsy*riy+dsz*riz) ...

Use:

len=invsqrt((sqr(dsx)+sqr(dsy)+sqr(dzx))*(sqr(rix)+sqr(riy)+sqr(riz)));
...len*(dsx*rix+dsy*riy+dsz*riz)...

Saves you 4 multiplies and an invsqrt. I doubt it will have much effect here 'cos pow is probably sucking up all the speed, but all little bits help.

And you should replace those divisions by $pi and 2 by multiplications by 0.318 and 0.5. Same for *5/$pi = *1.59
UIUC85#
I'll fix those easy things and work on the camera rotation. I'm working on a few other dm's at the moment as well (not as complex but should be cool) so I'll get that done when I can. Thanks for the help 🙂
UIUC85#
Anyway I can get a few more comments by other people on this?? That would be really appreciated...
Deamon#
I like the... thingie. Though I cannot give you any useful comment, since the level of code is to high for me. It looks nice though 🙂.
UIUC85#
I'm not really looking for mathematical comments. Artistic comments are more than welcome as well.
Jaheckelsafar#
I wouldn't mind seeing a few more shapes like a taurus or decahedron(?)(whatever the one with 12 sides is called). Maybe if the particles were somehow constrained inside the shape as well.
UIUC85#
Well see the shape is defined by x^n+y^n+z^n=r^2 where n=2/e where 0<e<2. Maybe this will help:
http://fuzzyphoton.**********/rtref/...m#superquadric
I cant just make it change to a torus any other shapes really. Thats all basically the best that equation can do. The particles are just kind of floating around the shape and adding code to constrain them in the shape would suck a lot of FPS where as the psuedo 3D effect doesnt't use much fps at all. I might change them so they glow more...
sidd#
I disagree with HS, i think the texture suits perfectly. Great concept but it does get a bit boring.. may you should make the camera move a bit more dramatically. Shifting th focus slightly from the object always helps.

The moving particle type things are a great polisher, and the colors are well picked. 👍
UIUC85#
I'm working on the camera motions still. Try to get that effect all worked out. Thank you VERY much for the comments!!