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.

Dark GDK / Creating Rings Using DGDK? - Unsolved

Author
Message
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 26th Sep 2008 05:05
I need to create rings for Saturn using DGDK by which I mean I'm not using any models, I need to do it using the built in functions.

A code snippet would be nice.

Thanks
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 26th Sep 2008 06:41
You need to? Here's the type of mesh you'll need: http://www.rockin-b.de/saturn/saturngametutorial/SGT_blenderPlanetRing.png, it's easier to make this in some 3D modelling app and just load it, but you could also make it using code, i.e. via memblocks or something. Luckily for you, there are millions of threads detailing the usage of FVF structures and how to create memblock meshes in general! And assuming a rather basic knowledge of trigonometry you should be able to make this using said info on memblocks easily.

Gasilli
16
Years of Service
User Offline
Joined: 20th Sep 2008
Location: Having a party in your garage
Posted: 26th Sep 2008 07:20
You could manually use a bunch of flattened cubes and make a circle.
The Real Abaddon
16
Years of Service
User Offline
Joined: 26th Jun 2008
Location:
Posted: 26th Sep 2008 21:27
The real saturn rings are made from asteroids or some kind of rocks so you could create a bunch of spheres but it will take a lot of memory so don't know how will that work.

http://drainwrath.blogspot.com Drain Wrath Action/Adventure development blog.
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 26th Sep 2008 23:32
Uh, why not just take a... 4 pixel wide by 860 tall image that has the ring texture on it, then make a function that takes the image, puts it on a plane, and copies that plane in a circle around the planet?
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 28th Sep 2008 04:54 Edited at: 28th Sep 2008 04:57
If I were you I would do this:

-Get IanM's Utility DLLs.

EDIT: I just realized you're using DGDK, so I'll look for an alternative to the filled circle function.

-One of them has a command to make a filled circle. So make an image with a black background, then draw a white filled circle, then a smaller black filled circle. (you can replace white with any color or pattern you want to make it look better) You'll end up with a ring:



-Set the transparent color to black and get the image with 'Get Image'.

-Texture a plane with the image and set the transparency on.

Then you should have a ring. You might also want to set the backface culling off so you can see it from below as well as above. Obviously this won't be the most visually appealing method but it gets the job done efficiently.

90% of statistics are completely inaccurate.
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 28th Sep 2008 05:46
How does GetImage() work?
ReiKumar
16
Years of Service
User Offline
Joined: 23rd Sep 2008
Location:
Posted: 28th Sep 2008 06:01
Any chance you could gove me some code? I tried setting tranparency but i just made the whole plane grey.

Login to post a reply

Server time is: 2024-09-30 07:18:08
Your offset time is: 2024-09-30 07:18:08