home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Help with procedural planet rendering in Sauerbraten?

by sdaau on 05/04/2009 06:19, 4 messages, last message: 05/04/2009 16:25, 2467 views, last view: 04/21/2024 23:51

Hi all,

Just posted a mod for Sauerbraten, which includes a code for procedural generation of planets here:

Sauer-planet - Sauerbraten procedural planet demo
http://www.quadropolis.us/node/1944
http://www.quadropolis.us/files/12SauerPlanet07.jpg

There is a windows executable there - although the included sources should compile under linux too...

I have basically three issues:
- If src\\engine\\planet/Planet_Quad/PlanetaryMapNode.cpp line 674: m_boVertex.Enable(&m_shape); is enabled, I get a hard GPU crash.. But it seems it is needed to render the procedural surface - which is currently missing..

- All I can get is the atmosphere, but since I\'m no OpenGL expert, all I can do is get it to show as some sort of a saturated wireframe (see screenshot above) ...

Since I have an graphics card that doesn\'t support hardware shaders, I do have the same actually, for the original source for the procedural code - like here:
http://img136.imageshack.us/my.php?image=02planetquad02.png

However, with a software scaterrer, I again get a wireframe in Sauer - although on the same computer, the source program generates this:
http://img78.imageshack.us/my.php?image=04scattercpu02.png

which points to me that this is probably because of some wrong OpenGL blending, rather than hardware or driver issue (I had difficulties just to get the planet framebuffer to display).

- Due to my amateur gl blending, showing the planets kills the display of models and hud gun..

Can anyone possibly give me a hint on how to solve these? There are some minimized patches in the zip, which should hopefully make things easier to read..

Otherwise, for those that know the engine - how realistic is it that this or similar code could be used within Sauerbraten, so that one could place up to say 8 monsters on a planet, say 500 units in radius, with radial gravity and surface collision detection, so that a shootout can be performed on planet, within acceptable limits (for me, 20 FPS - see the readme of the mod for my rates with the demo)?

And in general, what would the sentiment be for such a facility within Sauerbraten (more in the readme)? I\'d love it - unfortunately I cannot afford too much time, although I guess each couple of months or so I could peak in.. Still - just to have the surface generated as in the original code would be fantastic :)

Thanks for any comments...

   Board Index   

#1: ..

by Quin on 05/04/2009 08:09

> which points to me that this is probably because of some wrong OpenGL blending, rather than hardware or driver issue (I had difficulties just to get the planet framebuffer to display).

Correct, you also need to account for the various different render passes as well.

> Can anyone possibly give me a hint on how to solve these?

Not really, messing with the Cube 2 code is at your own risk; if you're not capable of doing it yourself I wouldn't expect anyone to come hold your hand - sorry that's just the way it is, we all have our own things to do.

> Otherwise, for those that know the engine - how realistic is it that this or similar code could be used within Sauerbraten

Slim to none. The engine is about the octtree, not random bits of other stuff. I'll forgo explaining the whole architectural problems, especially relating to physics and collision, but in the end it just isn't feasible.

> unfortunately I cannot afford too much time

Saying this will just make people ignore you even more, if you don't have time for us why should anyone make time for you? You need time and dedication (to *prove* yourself in the eyes of your peers) to get anywhere in life - especially in the open source world where "help" is volunteered; you only get out what you put in.

As an example, I turned up in this community around 4-5 years ago. Only now, after alot of hard work, learning, and persistence, has something that I poured my heart and soul into been accepted into the main branch (bots). During this time I have given alot of my free time to helping the community and becoming a well known face that people trust.

You have to go that extra mile, especially in small communities such as this - everyone becomes jaded and skeptical after the millionth mod/patch/help request. I hope this puts things into perspective for you.

reply to this message

#2: ..

by baby~rabbit on 05/04/2009 12:04

I second all of what quin says - you have to support your own code/mod until such time that the devs say, "wow we need that", so consider why/if/how your mod fits with the current sauerbraten themes and directions.

In terms of help, people may help you with how to do things in/with sauer (providing you ask intelligent questions), but only you know how the planet code works.

reply to this message

#3: Re: Help with procedural planet rendering in Sauerbraten?

by sdaau on 05/04/2009 14:25

Hi guys,

Thanks for your answers - now I can see that the way my request was phrased is a bit too much :)

I guess more specifically, I have this to ask - the planet code renders into a framebuffer (which in the original planet code rendered directly to screen); the results of this framebuffer need to be then overlaid with the rest of Sauerbraten. The state now is that it happens, but the planet layer is all pixelated (meaning I'm not rendering into the framebuffer correctly) - and it shows at the expense of the rest of the model rendering (meaning I'm not blending correctly) ...

My hope is then, if someone has ever tried to add an extra overlay to Sauerbraten, and has ran into similar problems - maybe they can point to a reading resource (or mod code of their own) so as to help me understand how the rendering pipeline works..

> you have to support your own code/mod until such time that the devs say..

That sounds reasonable :) Putting code into the game release would be unrealistic for me - but now that I've used Quadropolis site, I see that having a mod posted would be just as convenient for me ... But it seems you cannot revise your uploads on Quadropolis, is that true?

Thanks again for the responses..

reply to this message

#4: Re: Help with procedural planet rendering in Sauerbraten?

by Quin on 05/04/2009 16:25, refers to #3

> maybe they can point to a reading resource

Try src/engine/renderparticles.cpp for a vague idea of rendering random images/sequences.

> seems you cannot revise your uploads on Quadropolis

Yeah you can, hit the 'edit' tab at the top of your node. You can even add attachments, etc in addition to revising your primary download/information.

reply to this message

   Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53759321 visitors requested 71528466 pages
page created in 0.025 seconds using 10 queries
hosted by Boost Digital