The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: Bigryan on October 12, 2007, 07:58:41 pm



Title: planet textures
Post by: Bigryan on October 12, 2007, 07:58:41 pm
Hi I'm trying to add planet textures for a game I'm making.  How are they generated in Urquan Masters?  What I would like is to get the 2d images of the planets and then wrap them around an opengl sphere.  Any advice on how to go about this?


Title: Re: planet textures
Post by: Amiga_Nut on October 13, 2007, 03:31:34 am
I can maybe help you out here. The thing I would do in this case is image map a sphere and then bake the craters and detail onto the object. You would then have images with the polar scaling intact and ready for use as you said. I could whip up a few in Lightwave.  The 3DO image maps have this effect but they were really low quality. I suppose you could use them, but I'm thinking why? Also, is color the only map you’re doing? Do you want bump maps as well?

Here's one I prepared earlier! This is an auric moon lit from one direction only.
(Cylindrical image map for a sphere)


(http://c-69-247-80-127.hsd1.fl.comcast.net:82/LOwPoly_Models/SB_Moon0000.png)


Title: Re: planet textures
Post by: Novus on October 13, 2007, 10:15:05 am
You will probably want to read the UQM developer documentation on planet topography generation (http://sc2.svn.sourceforge.net/viewvc/sc2/trunk/sc2/doc/devel/planettopo?view=markup) and planet surface rendering (http://sc2.svn.sourceforge.net/viewvc/sc2/trunk/sc2/doc/devel/planetrender?view=markup). The relevant code is in src/sc2code/planets/gentopo.c (http://sc2.svn.sourceforge.net/viewvc/sc2/trunk/sc2/src/sc2code/planets/gentopo.c?revision=2708&view=markup) and src/sc2code/planets/plangen.c (http://sc2.svn.sourceforge.net/viewvc/sc2/trunk/sc2/src/sc2code/planets/plangen.c?view=markup).


Title: Re: planet textures
Post by: Bigryan on October 14, 2007, 06:44:18 pm
thanks novus.  I guess all planet textures are generated by code on the fly.  Very cool.

I haven't figured out how I'll do it yet.  Perhaps I'll do something silimar but more simple.  My original thought was that they were all textures that had been photoshoped, but I guess space was an issue when sc2 was made and code took up a lot less of it.

I wanted originally a bunch of jpg/png images that I could just call up as resources.  but this can also be quite cool.