Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Plasma,Particles,Rotation, I know you hate me!

Author
Message
Angry kreyon
19
Years of Service
User Offline
Joined: 19th Aug 2005
Location:
Posted: 16th Sep 2005 22:14
well, since I get no response from my posts either no-one is looking at them or everyone who does is Jealous and have no comments! either way I have done it again! I have taken the Plasma Code I posted and added a Particle Post I found in the snippets and also a nise camera movement code slice that works pretty well, and put them all together and this is the code I have come up with.

Basicaly it looks like a planet being born from an ORT cloud (hmmmm, anyone ever seen that picture of the place researchers believe is the birthplace of planets?) and then starts to show signs of life on the surface. (this is where the particles come in), and then as the sky around the sphere cycles through colors it also rotates around. I have added a few key commands to be able to light up the planet and move the light around as well as moving the camera to a couple of pre-defined places and then will automaticaly come back to place when the key is lifted. and a few other things as well, but you will have to experiment with key presses as I am tired of typing for now and will not include the keypresses until later.

the code is here:



and don't forget that you will need the "Media" directory from the darkbasic pro edition "PLasma sample" directory to make this work, or you can download it from the sectin below and place it in the project directory created for this project. this is for the sound and image files that I borrowed from this demo.

Attachments

Login to view attachments
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Sep 2005 12:52
Nice.

I tried to get rid of some of the plain edges, but failed miserably.

UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 18th Sep 2005 01:28
and who made that particle snipplet you got? lol

When we talk to god, we're praying. When god talks to us, we're schizophrenic.
Fortune never calls on those that have no balls.
Angry kreyon
19
Years of Service
User Offline
Joined: 19th Aug 2005
Location:
Posted: 18th Sep 2005 03:58
yeah UNDERLORD it's your code! sorry I did not Put the name on it to begin with but as you see I take no credit for original code only what I do to it and in the case of your Particles I did not do much as you can see, only added them in and made a minor adjustment, VERY NICE CODE!

and j0hn6oo is responsible for the Camera code I found, another good code!

like I said the Plasma is derived from the plasma in the Game demo PLASMADEMO from Dark basic pro. (dont know the author) but very nice! and I did change this ALOT!!

I was hearing about the seems in my previous post, but I did not see them until I got it to rotate with that Nice little Camera code I found. then I see them but cannot figure out how to get rid of them, I tried different BMP's as the pasma image and get some cool effects but if the colors are not just right it looks real sloppy and you can deffinately see the seems. so I welcome suggestions on how to smooth this out. I think maybe ghosting the image in a different mode or something maybe, or possibly enlarging the image and changing the camera depth?.? oh well I will keep playing with it.

I saw a code to feather clouds away I will try it soon.......
Angry kreyon
19
Years of Service
User Offline
Joined: 19th Aug 2005
Location:
Posted: 20th Sep 2005 21:01
ok here is the latest iteration of the code I have added a few more spheres and have made a couple into limbs that rotate with the main object, but I want to make them independant and move on their own but I don't know how yet.

as usual don't forget to download the attachment for the BMP files and such that are needed for this to work correctly


also I need to know a good way to move the camera around the object while still looking at it (haven't seen this written anywhere I have looked so far, I know it's out there but I haven't seen it.)

the KeyState options are not all working at this time because some new functions have overridden them, but some do work as meant.

any suggestions and ideas are always welcomed!

Attachments

Login to view attachments
Angry kreyon
19
Years of Service
User Offline
Joined: 19th Aug 2005
Location:
Posted: 21st Sep 2005 19:00
I have Updated the Code a lot and have fixed a bunch of functions, and Thanks to TDK for the code to make the orbits happen correctly, I noticed that on my work machine (dell 2.4) that the frame rate is a lot less than my home machine (dell 2.4) I can only assume the difference is due to the graphics card as one has ATI and the other an intel graphics card, so keep in mind if you are getting slower frame rates then maybe you need to update your graphics card to handle 3-d better. this code gets 70 to 80 FPS on my Home Machine and only about 40 to 50 on my work machine. (since I dont program for a living I dont think I will get this machine upgraded just for this.)

at any rate the scene is still very cool and I have made a lot of chages to the keys for the interface as well, added swithing cameras by mouseclick, and added more objects and a good rotation bit, and more.....you'l have to look and see.......

I will add a screen shot to this post so you get an idea of what this code looks like running.

o first the code:


you can use one of the downloads above to get the media directory, and you can change the media to your liking as you want( I keep experimentiing with different planet textures and such )

have fun and don't forget give credit to TDK, UNDERLORD, j0hn6oo, for their Code snips used to make this all happen, and deffinately don't forget ME, the ANGRY KREYON, the one who put all this great stuff together and made it work, I AM GREAT!!!! *LOL*

Attachments

Login to view attachments
UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 30th Sep 2005 22:06
=) hehe i wasj ust messin with you i got a particle generator on my site that im gonna add a GUI too maybe you'd like to help me with it? Im not a "expert" coder i just do it every now and then but maybe we could make some (beep) happen.

e-mail me UnderLord@darkuniverse.net

or visit my site its on my sig =)

When we talk to god, we're praying. When god talks to us, we're schizophrenic.
http://dbworlds.darkuniverse.net/
JulesD
19
Years of Service
User Offline
Joined: 7th Feb 2005
Location:
Posted: 24th Oct 2005 12:55
About the seams try looking into "set sphere mapping on.
That might help.
Ryan
18
Years of Service
User Offline
Joined: 29th Nov 2005
Location:
Posted: 1st Dec 2005 01:22
Angry Kreyon,

Load your land bitmap into a descent paint program like
Paint Shop Pro and make sure the color pixels on the left side
of your picture are the same as those on the right.

This can be tedious, but should solve your problem with the
seem on your globe.

Good Luck, Hope to see you found a solution soon.

Ryan

Login to post a reply

Server time is: 2024-11-23 10:41:28
Your offset time is: 2024-11-23 10:41:28