Re: 3D design problems w/ buildings (weird discoloration/ brightness)

Bernhard Wymann <[email protected]> Thu, 29 Jan 2015 22:59:59 +0100
Newsgroups gmane.games.torcs.general
Organization wytec
Message-ID <[email protected]>
Hi
> Thanks for the help. Unfortunately, the old buildings seem to be beyond
> repair. So one step forward, several steps back. Second, the use of
> single-sided surfaces produces weird results, namely a building
> wall/roof/door (also fences and walls of different kinds) that's
> single-sided looks completely transparent from the other side, apparent
> in the F4 view in the game when I check the created building(s). That's

Yes, that is called back-face culling, IIRC I mention that in the car 
creation video. It is very easy to handle:
- First model the object from outside (e.g. car rooftop in the car tutorial)
- Then copy the object and flip the normals

This has the advantage that the front and back sides are correctly lit, 
if you use 2 sided surfaces the lighting is just right for one side, 
because the lighting is just calculated once per vertex.

A second advantage relevant for some cases is the the front and backside 
can have different textures assigned.

The disadvantage is of course the higher load due to duplicated geometry.

Important (maybe you are aware of it, just to make sure): If you do not 
take special care during modeling, you have to adjust the surface 
normals at some point (such that they all point to the outside for a 
closed shape). In ac3d (and all other modeling tools) you can switch on 
the visualization of the normals. If you work with single sided surfaces 
form the beginning you immediately see when a surface is the wrong way 
round, because it is simply transparent.

> of course unwanted, and forces me to switch them back to a two-sided
> surface. I don't know what that's all about. So far, the two-sided
> buildings, the dull, uninspiring boxes I've added, haven't had the same
> light problems as the earlier experiments. I guess I have to steer clear
> of those and stick with basic structures for now, much as it clashes
> with my mindset.

Don't give up, if you master to get a correct lit/shaded box you know 
enough to master more complex objects.

> About the tutorial pages, I wonder if the elevation and relief files are
> absolutely necessary for a functional track. I remember reading about

No, they just help controlling the generation of the terrain. Relief 
files allow you to preset contour lines for the terrain (so the mesh 
generator generates the mesh using the points on the contour lines).

Elevation files help you to control the height of the terrain.

> those a long time ago, but haven't created any for the previous versions
> (both .ac and .acc), and haven't noticed any graphical issues there. The

Yes, they are not required, they just help to get closer to the desired 
terrain right out of the generator without manual modeling.

> whole shadow map business went over my head. For my tracks, I've either
> had a simple blank image (some hue of white like #f4f4f4) or used the
> track outline as the basis of the shadow map, tried and erred in the
> shadow2.rgb file until the track's/shadow's position has been accurate.
> Understandably, that might not be particularly realistic, but when all
> else fails, there's only experimentation.

Yes, that is tricky, in the track tutorial by Vicente he explains how to 
do it with Blender:
http://www.berniw.org/aboutme/publications/build_your_trocs_track_in_20_minutes_v2.odt

I explain it here how I do it with povray:
http://www.berniw.org/trb/forum/showthread.php?topicid=163

> There will be instructions on the website for any volunteers who know
> their way around these objects (and obstacles). Useful contributions
> would probably speed up this whole development process, but I'm not

An open license like the GPL/FAL would make it easier to work together 
and to share, but of course this is your choice. I think free licenses 
are really beneficial at the point where the original author loses the 
interest, so other people can continue the work even if the original 
author cannot be contacted anymore.

> holding my breath (It's the instant gratification age after all). The
> (dozens of) tracks themselves are diverse, raceable, interesting, often
> quirky and difficult enough. Who knows when they're ready for release.

Kind regards

Bernhard

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/