rec.autos.simulators

Sim development--Skies!

Ashley McConnel

Sim development--Skies!

by Ashley McConnel » Wed, 23 Jan 2002 22:44:32

Looks cool! nice texture!  I am not sure how to get rid of the edges :(

Hows it done? , I was thinking of sticking a sky in mine - now i have,
wait for it.....GRASS!! :D

Ash
http://www.racesimcentral.net/


>   Ok gang...  Take a look at the first pic here please:

> http://www.racesimcentral.net/

>   The age old question...  How do I get rid of the seams at the edges of the
> sky?  They're visible between all 13 panels.

J. Todd Wass

Sim development--Skies!

by J. Todd Wass » Wed, 23 Jan 2002 22:40:45

  Ok gang...  Take a look at the first pic here please:

http://performancesimulations.com/scnshot4.htm

  The age old question...  How do I get rid of the seams at the edges of the
sky?  They're visible between all 13 panels.

  Thanks,

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm

Gunnar Horrigm

Sim development--Skies!

by Gunnar Horrigm » Wed, 23 Jan 2002 23:26:57


love the textures, man.  did you "make" them yourself?

looks like T-junctions.  if that's the problem, you just need to make
sure not to place vertices along an edge (without splitting it, that
is).  hope that makes sense.

--
Gunnar
    #31 SUCKS#015 Tupperware MC#002 DoD#0x1B DoDRT#003 DoD:CT#4,8 Kibo: 2
                          DE RECTIS NON TOLERANDUM EST

Chris Wes

Sim development--Skies!

by Chris Wes » Wed, 23 Jan 2002 23:33:58

Make sure the vertices for the cub map are welded together and in fact share
the same vertex for all the polys.



J. Todd Wass

Sim development--Skies!

by J. Todd Wass » Wed, 23 Jan 2002 23:48:46

  Thanks..  Someone made the road texture for me.  The sky is from a GPL
update.  The creator says to go ahead and use 'em for sims and what-not, so
might as well take advantage of it.  This particular sky is supposed to be for
Nurburgring (sp?), although I bet it looks better in GPL :0)

  I'm not using the 3-D model itself directly for the sky.  Instead, I'm just
making a couple points for the bottom and top at each vertical edge, then
spinning it around xx degrees at a time and laying out the textures in quads as
I go.  So...  The edges of the vertical quads are using the same vertices,
which is what's bugging me..  It seems they should all match up and look
perfect, but of course they don't..  I get more admiration for real game
developers every day.  :0)

 I might try making them overlap/pierce through each other near the edges a
little, maybe that'll help.  

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm

J. Todd Wass

Sim development--Skies!

by J. Todd Wass » Wed, 23 Jan 2002 23:58:21

  Thanks, Chris.  The top poly is just crudely laid on top of the sky
"cylinder", so I'm not too concerned with that one in particular.  The vertical
walls all share vertices at the corners, however, and still have seams.  ?
Wierd...  

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm

J. Todd Wass

Sim development--Skies!

by J. Todd Wass » Thu, 24 Jan 2002 00:04:03

  Thanks :0)  Thanks anyway...  I don't know either..   Nice looking grass!
(in sequential answering order)

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm

Jim Seamu

Sim development--Skies!

by Jim Seamu » Thu, 24 Jan 2002 00:29:35

Are you using OpenGL Todd? Long time since I used it but I know there's a
texture clamping toggle thing in the OpenGL instruction set, erm.... you
need to turn the clamp on, draw sky polys, then turn the clamp off again.
Worked for me when I had this same problem using Quake3 skies.

The texture clamp thing is used to prevent e.g the extreme left hand pixel
on each line of the texture from being blended into the extreme right hand
pixel, which is done when OpenGL thinks you're tiling. Here you're not.

Gah I'm gabbling, I don't suppose that's going to make much sense. Good luck
with it and I'll try to dig out my old program and see what I did for skies
in there.

Cheers
Jim



Ruud van Ga

Sim development--Skies!

by Ruud van Ga » Thu, 24 Jan 2002 00:43:02


Hi Todd, nice eh, those skies? Notice I have a tutorial one those, to
go from those skies to Racer DOF files; importing the horizon .3do and
such (it's a bit of a mess since 3do-s are trees and DOF is a linear
format).
In a new small shot with the new P4 on the opening page, you can see
the Sears sky (click the image for a 800x600 shot; notice a seam!).

But take note, that the author has taken the images from N4, and
edited them, so there may still be some copyright issues. But they
sure look great (that's why I did the tutorial).

The 3do I used is a bit less crude than the seam you have between the
side and top walls. The problem here is wrapping (or rather,
repeating). Set the glTexParameter(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T)
and WRAP_S to GL_CLAMP or GL_CLAMP_TO_EDGE (I think the latter is
better, but requires an extension).
You're seeing the S/T parameters wrap on to the start of the texture.
I once tested this, and it worked for me. Unfortunately, this
parameter is hidden a bit deep in all my model classes (so the problem
persists without serious hacking based on texture names or something).
Doesn't matter, as I plan a Quake-style shader rendering engine anyway
for the future, which will deal with this in a more flexible way.

Ruud van Gaal
Free car sim  : http://www.marketgraph.nl/gallery/racer/
Pencil art    : http://www.marketgraph.nl/gallery/

Gunnar Horrigm

Sim development--Skies!

by Gunnar Horrigm » Thu, 24 Jan 2002 00:50:19


do you still get seams if you fill the polygons with a solid color
(instead of texturing them)?

--
Gunnar
    #31 SUCKS#015 Tupperware MC#002 DoD#0x1B DoDRT#003 DoD:CT#4,8 Kibo: 2
                                silence is FOO!

J. Todd Wass

Sim development--Skies!

by J. Todd Wass » Thu, 24 Jan 2002 01:45:59

  Good idea...  Just trying it now and...  Nope, no seams, just a solid color
everywhere..

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm

J. Todd Wass

Sim development--Skies!

by J. Todd Wass » Thu, 24 Jan 2002 02:01:23

  I got the link from your tutorial, and those are the nicest skies I've seen
yet.  I still haven't figured out your DOF files yet.  If there's more than one
INDI chunk, I usually have problems, but that's another thread in itself.  Some
of my smaller experimental models work, but the only complex models that will
load are completely contained in one INDI chunk.  All tutorials I've seen on
3-D file loading are in C++; OOP is something I don't know anything about yet,
so seeing little symbols like -> just confuse me, leaving me to reinvent the
wheel in the 3-D model loading department, or hunting endless for straight C
examples (haven't found any).  Perhaps I ought to take up some basic C++?  Is
it the quantum leap mentally that I imagine it is?

  Shucks...  The mip to bmp converter from your site really did the trick.  I
didn't load the models really, just generated the sky box with a rotation
formula and mapped the bmp's to it.  They are beautiful, that's for sure!
Thanks for posting the link :0)

  Thanks for the tip..  I just tried this as suggested, and it looks the same
still :-(  Perhaps slightly better at times maybe, but the seams are still
visible..  Jim Seamus said something about switching clamping on and off during
rendering, you know anything about that?  I thought that was a DX thing, but
maybe that's just for rendering surfaces and I'm confusing the two.

  Do you have a declaration # for GL_CLAMP_TO_EDGE?  It's not in my header
file.  (Converted to PowerBasic, so maybe everything's not there.)  Don't look
too hard, I want to see if there's another way to fix this.  My road textures
don't have this problem.  

  The quake style engine sounds awesome...  I'm just trying to draw basic stuff
at this point!  LOL  

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm

J. Todd Wass

Sim development--Skies!

by J. Todd Wass » Thu, 24 Jan 2002 02:04:09

  Yes, it's OpenGL..  Ok, Ruud just outlined clamping, is that what you were
talking about?  I tried what he mentioned, but the problem is still there.
However, I'm not switching clamping on and off at anypoint, it's just set "on"
one time  when the textures are loaded with:

    glTexParameterf %GL_TEXTURE_2D,%GL_TEXTURE_WRAP_S,%GL_REPEAT
    glTexParameterf %GL_TEXTURE_2D,%GL_TEXTURE_WRAP_T,%GL_REPEAT

 Look familiar?  Anything glaringly wrong here?

Thanks,

Todd Wasson
---
Performance Simulations
Drag Racing and Top Speed Prediction
Software
http://PerformanceSimulations.Com

My little car sim screenshots:
http://performancesimulations.com/scnshot4.htm

Jim Seamu

Sim development--Skies!

by Jim Seamu » Thu, 24 Jan 2002 02:25:59

The clamping thing, as explained by someone who understands the problem but
lacks the technical vocabulary (sorry!):

OpenGL repeats textures if you set the u,v to more than 1, as you know. This
makes it dead easy to tile a floor with a single texture, for example. The
"texture filtering thing" blends each texture pixel with its neighbours, so
when a texture is seen at an angle or stretched or whatever it doesn't look
blocky. So when you move really close to the floor and look down, you don't
see giant hard-edged pixels.

If you have a floor texture that ISN'T repeated (i.e. no tiling), then
OpenGL still uses the same texture filter thing whereby every pixel is
blended with its neighbours. The thing is, the pixels on, say, the very left
side of the texture have "neighbours" on the very right side (because you
have GL_REPEAT or whatever its called on, so OpenGL is prepared for
repeating textures). So the colour of the pixels on the left hand edge of
your texture is influenced by the colour of the pixels on the right. It is
this that's causing the visible edges in your sky.

You need to "clamp" the texture edges in OpenGL so that it doesn't wrap
around to the far edge of the texture when looking for neighbour pixels.
This way the edge pixels will be unaltered and so will match up with the
pixels of the adjacent sky poly.

Is this making any sense? As I said, I don't have the technical vocab but I
understood and solved the problem once before (can't find my ***y source
code though at the moment to find the name of the GL_ command).

Hope this helps anyway, g'luck

Jim



Eldre

Sim development--Skies!

by Eldre » Thu, 24 Jan 2002 03:18:51


It still amazes me that *individuals* can write stuff like that.  That's
cool...

eldred
--
Dale Earnhardt, Sr. R.I.P. 1951-2001
Homepage - http://www.umich.edu/~epickett
GPLRank - under construction...

Never argue with an idiot.  He brings you down to his level, then beats you
with experience...
Remove SPAM-OFF to reply.


rec.autos.simulators is a usenet newsgroup formed in December, 1993. As this group was always unmoderated there may be some spam or off topic articles included. Some links do point back to racesimcentral.net as we could not validate the original address. Please report any pages that you believe warrant deletion from this archive (include the link in your email). RaceSimCentral.net is in no way responsible and does not endorse any of the content herein.