Archive: Adapt preset (morphing raytraced shape)


14th January 2004 00:53 UTC

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?


14th January 2004 01:57 UTC

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


14th January 2004 03:12 UTC

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 :)


16th January 2004 10:41 UTC

Anyway I can get a few more comments by other people on this?? That would be really appreciated...


16th January 2004 11:26 UTC

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 :).


18th January 2004 00:10 UTC

I'm not really looking for mathematical comments. Artistic comments are more than welcome as well.


18th January 2004 07:06 UTC

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.


19th January 2004 00:48 UTC

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...


19th January 2004 01:50 UTC

The texture on the thing is kinda ugly, but otherwise it's really cool.:)


19th January 2004 02:16 UTC

By ugly, do you mean the colors? Or the whole thing?


22nd January 2004 06:15 UTC

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. :up:


23rd January 2004 18:11 UTC

I'm working on the camera motions still. Try to get that effect all worked out. Thank you VERY much for the comments!!