rainbow generator
Community Forums/Showcase/rainbow generator
| ||
Hello, :) Just playing with Blitz3d to see if i could reproduce a rainbow in 3d with a mesh (made of several arcs) and vertices colors : with a grey sky : with a blue sky : animated gif : rd-stuff.fr/rainbow-generator-(greysky)-500w312h-10fps.gif source code here : http://www.blitzbasic.com/codearcs/codearcs.php?code=3288 |
| ||
Nice piece of code. But appears the blue sky filters out the other colors. I did a quick experiment and changed the '3' to '1' as you suggested in below line which gives a brighter colored result - at least on my system. EntityBlend(Rainbow_Mesh,1) ;1 or 3 Now let's add some clouds, sun, rain hills, trees a few rabbits and we're in Teletubby land ;-) |
| ||
Btw: I couldn't locate the pot of gold at the end of the raibow.. |
| ||
Yes it looks better with a grey/white sky. With a whiter sky it is better to use blendmode alpha (1) instead of blendmode add (3) Btw: I couldn't locate the pot of gold at the end of the raibow.. take a look at that : en.wikipedia.org/wiki/Rainbow#Full-circle_rainbow it may help : ;) |
| ||
Ah that explains it all. :-) Or.. perhaps the leprechaun can only be found when in Ireland? |
| ||
nice work, to be sure ;) |
| ||
More for fun than for a real need ;) I bet it could look even nicer with a glow effect on it... |
| ||
Fun is a need :) And sometimes best things comes from the need for fun :p Plus, who doesn't like rainbows.. Ask Noah |
| ||
Nice looking. Perhaps you could/should skip vertexcolor (for once ^_^) and use a texture instead (a single row texture like 8*1 pixels) And by the way, the arc equation is pretty simple to implement, you'll save yourself a lot of time by just using cos/sin instead of all this pivot stuff (a small sample of using a texture -> it also use alpha on the texture to fade the borders) The mesh is composed of a single "line" of triangle (a triangle strip), so you can get higher details with lower triangles. (just notice that below 25 for RainbowSeg, you'll start to see the segment) |
| ||
@Bobysait>>yes i could have used another approach to create the arcs but i do what i can with what i know :P Nice example too. :) |
| ||
It is weird how that even with the same alpha, the same blendmode, the same background color, the result does not seem to look the same... |
| ||
Forget about what i said (in post#11), using the same alpha, the same blendmode, the same background color, the results look similar : |
| ||
.. |
| ||
@RemiD The second image (the one on the right) has a very nice 'smooth' look to it, plus the nice fade towards the bottom. the other one has a blocky feel - you can see the geometry underneath it. - looks like 9 segments on the left? Me preference would be the one on the right as it has a professional look to it. The blocky one feels a bit cheap in comparison... |
| ||
The one at right is the example by Bobysait The one at left is my example However you can add more sections to have a more round shape, no worry, just edit the code ! I find interesting how it is possible to achieve a similar result using only a mesh and vertices colors, or with a mesh and texels colors (a texture) |
| ||
less blocky more roundy version for Adam : and you can also understand how it is made with the wire view. |