Couple of questions

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
User avatar
chuck_starchaser
Goblin
Posts: 232
Joined: Sat Jun 18, 2005 8:31 pm
Location: Montreal
x 1
Contact:

Couple of questions

Post by chuck_starchaser »

Hi, there. I'm involved with the open-source Vegastrike --space trading and combat game-- and its engine. A new registered member at our forum, "newpparo" has heightened our awareness of Ogre, which comes at a particularly opportune junction, in the sense that we've just been experimenting with glsl for the first time, we've just recognized the need to overhaul materials management and object architecture, and we've also just pretty much decided we all want to be able to land and walk on planets.

I haven't looked at Ogre3D's sources yet, and I'm hoping to have some questions clarified before I spend too much time looking at it. One relates to constraints regarding the use of Ogre as a rendering back-end in space. The other relates to the use of Ogre as a full engine on the ground.

1) One problem we have currently in VS is with z-buffer, due to the great magnitude range of distances in space (two feet in the cockpit, 200,000 km in space), which makes it hard to fit in 24-bit z-buffers, not to speak of 16-bit z-buffers. Currently we render far planets and stars at z-max, cockpit at z-min, and try to deal with the rest, but it's still difficult. My current idea is that we could compute, in the CPU, distance for each object in double precision (object positions in world space, in Vegastrike, use doubles for representation), take the log of that, scale as necessary, compute a range of depth for the given object, and pass these parameters to the vertex shader, for it to interpolate z for all incoming vertices to fit the desired numerical range. For 16-bit-z cards we could even search for and remove unused numerical ranges. So the question is, does Ogre have the means to specify a z range for each object?, or could it be modified to allow this?

2) Multiple rendering surfaces:
For cities on the ground, my predilection would be to implement some level-less, continuous world, and doing so might require use of integers for world (city) coordinates, but my understanding is that this falls outside the concerns of Ogre, but I was just mentioning it as introduction. What my question relates to is the use of dynamic cube maps. Say, for instance, I was driving through LA: Hills to the North and South would appear almost static, but not quite: If I keep driving my perspective changes. What I'd like to do is have a far cube map or sky box that is rendered to in batch mode, like a low priority thread, or more like a co-routine; which completes a new frame, say, every 256 normal frames. Then another cube-map, at, say, 4 km distance, that gets updated every 128 frames, with whatever is visible beyond it; another cube-map at 2 km updating every 64 frames, and so on down to a skybox 62 meters away that updates every other frame.
The idea is in its infancy; may need a lot of tweaking. In fact, the above range would add to 8 cubes. Times 6 sides, that's 48 large textures; times 2 for double-buffering, that's 96. Anyhow, my question is, does Ogre have provision for dynamic textures and dynamic cube-maps, double-buffered? And if so, are there any limitations to consider as to their number, issues of transparency or z-depth or use of stencils to consider?

TIA
"Glory is fleeting; Obscurity is forever."
Heard it from a bartender, on some planet, in Vegastrike.
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

I would solve the first issue in an easier way. Render the scene in two "passes". The first, renders far away objects (range of kilometres) into a RenderTexture. Then, put that rendered texture (something like a background impostor) at the furthest distance possible while rendering the close objects (range of metres). This way you keep occlusions, while you don't have to deal with complex maths, LODs, an distance ranges.

For the second question, I know Ogre can handle dynamic cubemaps (for reflections, for instance), though I haven't used them before. You definitely would need to work out how them are updated and such, but Ogre supports it.

Hope that helps.
Image
User avatar
chuck_starchaser
Goblin
Posts: 232
Joined: Sat Jun 18, 2005 8:31 pm
Location: Montreal
x 1
Contact:

Post by chuck_starchaser »

Actually your suggestion for a z-buffer solution should work: Group distant ships and turn them into billboards...
Glad to hear dynamic cube maps are supported. I'll take a look at the docs for the details.
Double-Thanks!.
"Glory is fleeting; Obscurity is forever."
Heard it from a bartender, on some planet, in Vegastrike.
User avatar
chuck_starchaser
Goblin
Posts: 232
Joined: Sat Jun 18, 2005 8:31 pm
Location: Montreal
x 1
Contact:

Post by chuck_starchaser »

I'm trying to compile under Fedora Core 3: Everything seemed to be going well installing all the required packages, but when I run ./config it tells me it cannot find zziplib, even though I downloaded it, compiled it and installed it as per the instructions. Config suggests I could add zziplib to some environmental variable, but I don't know how to do this, I'm new to Linux.
"Glory is fleeting; Obscurity is forever."
Heard it from a bartender, on some planet, in Vegastrike.
User avatar
chuck_starchaser
Goblin
Posts: 232
Joined: Sat Jun 18, 2005 8:31 pm
Location: Montreal
x 1
Contact:

Post by chuck_starchaser »

I'm still getting this when I do ./configure:

Code: Select all

checking for zziplib... Package zziplib was not found in the pkg-config search path.
Perhaps you should add the directory containing `zziplib.pc'
to the PKG_CONFIG_PATH environment variable
No package 'zziplib' found

configure: error: Library requirements (zziplib) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
[root@localhost ogrenew]
Could someone please tell me what I need to do?
TIA
"Glory is fleeting; Obscurity is forever."
Heard it from a bartender, on some planet, in Vegastrike.
User avatar
_mental_
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 419
Joined: Mon Jan 27, 2003 11:51 pm
Location: The Woodlands, TX
Contact:

Post by _mental_ »

It sounds like you haven't got the zzlib dev package installed. This will be something like libzzip-dev.
User avatar
chuck_starchaser
Goblin
Posts: 232
Joined: Sat Jun 18, 2005 8:31 pm
Location: Montreal
x 1
Contact:

Post by chuck_starchaser »

Ah, ok, thanks.
"Glory is fleeting; Obscurity is forever."
Heard it from a bartender, on some planet, in Vegastrike.
User avatar
chuck_starchaser
Goblin
Posts: 232
Joined: Sat Jun 18, 2005 8:31 pm
Location: Montreal
x 1
Contact:

Post by chuck_starchaser »

I give up. All the zziplib-devel packages I try tell me they depend on two other packages, and I can't find those packages. And one of them is an .so, which type of file I had no end of problems installing before. Already spent like 8 hours installing stuff and dealing with problems, and I'm exhausted.
"Glory is fleeting; Obscurity is forever."
Heard it from a bartender, on some planet, in Vegastrike.
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

chuck_starchaser wrote:I give up. All the zziplib-devel packages I try tell me they depend on two other packages, and I can't find those packages. And one of them is an .so, which type of file I had no end of problems installing before. Already spent like 8 hours installing stuff and dealing with problems, and I'm exhausted.
Sounds like you need to be using a decent package management system like apt-get. I've never used FC, just Gentoo and Debian, and both have very easy package retrieval systems, including retrieval of dependencies. I know you can get apt for FC, I've just never used it.
User avatar
goshua
Halfling
Posts: 92
Joined: Wed Jun 01, 2005 10:33 am

Post by goshua »

chuck_starchaser wrote:I give up. All the zziplib-devel packages I try tell me they depend on two other packages, and I can't find those packages. And one of them is an .so, which type of file I had no end of problems installing before. Already spent like 8 hours installing stuff and dealing with problems, and I'm exhausted.
yum install zziplib-devel.i386
User avatar
chuck_starchaser
Goblin
Posts: 232
Joined: Sat Jun 18, 2005 8:31 pm
Location: Montreal
x 1
Contact:

Post by chuck_starchaser »

Thank you, yum worked like a charm; I'm still watching make compile ogre... ;-)
"Glory is fleeting; Obscurity is forever."
Heard it from a bartender, on some planet, in Vegastrike.
User avatar
chuck_starchaser
Goblin
Posts: 232
Joined: Sat Jun 18, 2005 8:31 pm
Location: Montreal
x 1
Contact:

Post by chuck_starchaser »

More problems: make and make install worked, but when I went to samples/common/bin and tried to run the examples nothing happened. Someone at the vegastrike forum asked me if I'd ran ./bootstrap and I hadn't, so I started again, with the glx option to configure, this time
./bootstrap
./configure --with-gl-support=GLX --with-platform=GLX
make

but make said "libtool: link: `nvparse.lo' is not a valid libtool object"

so I ran ./configure again without arguments, then make, but now
make is still giving me the same error. It says,

.................................................................
s1.0_parser.lo _ts1.0_lexer.lo _rc1.0_lexer.lo _rc1.0_parser.lo avp1.0_impl.lo _vs1.0_lexer.lo _vs1.0_parser.lo _ps1.0_lexer.lo _ps1.0_parser.lo vs1.0_inst.lo vs1.0_inst_list.lo ps1.0_program.lo vsp1.0_impl.lo vcp1.0_impl.lo vp1.0_impl.lo -lCg -lILU -lIL -lpthread -lz -lm -ldl -L/usr/lib -lSDL -lpthread
libtool: link: `nvparse.lo' is not a valid libtool object
make[4]: *** [libnvparse.la] Error 1
make[4]: Leaving directory `/home/d/Desktop/download/Ogre3Dsrc/ogrenew/RenderSystems/GL/src/nvparse'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/d/Desktop/download/Ogre3Dsrc/ogrenew/RenderSystems/GL/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/d/Desktop/download/Ogre3Dsrc/ogrenew/RenderSystems/GL'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/d/Desktop/download/Ogre3Dsrc/ogrenew/RenderSystems'
make: *** [all-recursive] Error 1
[root@localhost ogrenew]#
"Glory is fleeting; Obscurity is forever."
Heard it from a bartender, on some planet, in Vegastrike.
User avatar
_mental_
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 419
Joined: Mon Jan 27, 2003 11:51 pm
Location: The Woodlands, TX
Contact:

Post by _mental_ »

Which version of libtool are you using? You're probably best of with a recent version.
Post Reply