spherical environment on moving object

I've put a simple spherical reflection map on my object using:

glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);		
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);

Now object moves around the scene in long linear segments, then turns 
rapidly and continues in another direction for some time. Camera is 
always positioned and oriented exactly the same relative to the object - 
meaning the environmental reflection is always the same during the 
traversal in one direction.

Id like to fake the reflection changes so it looks like object is 
passing thru other objects around it, reflecting them.

I suppose it could be done by manipulating texture stack. Is there a 
common way to do this? What transformation to apply to texture stack to 
make this look "good"?
0
Mirko
7/5/2006 7:38:35 PM
comp.graphics.api.opengl 7064 articles. 1 followers. Post Follow

5 Replies
266 Views

Similar Articles

[PageSpeed] 37
Mirko Puhic wrote:

> I suppose it could be done by manipulating texture stack. Is there a 
> common way to do this? What transformation to apply to texture stack to 
> make this look "good"?

typo: texture matrix that is, not texture stack.
0
Mirko
7/5/2006 7:40:05 PM
Mirko Puhic wrote:
> Id like to fake the reflection changes so it looks like object is 
> passing thru other objects around it, reflecting them.
> 

I don't think you can do it with an environment map,
you need to look into cube mapping (the next step
up from environment mapping).

> I suppose it could be done by manipulating texture stack. Is there a 
> common way to do this? What transformation to apply to texture stack to 
> make this look "good"?

None, because at the end of a day an environment map
only covers the half of your object which is facing
the viewer. You can't rotate the "back" into view
because there isn't one.


-- 
<\___/>
/ O O \
\_____/  FTB.    For email, remove my socks.

In science it often happens that scientists say, 'You know
that's a really good argument; my position is mistaken,'
and then they actually change their minds and you never
hear that old view from them again.  They really do it.
It doesn't happen as often as it should, because scientists
are human and change is sometimes painful.  But it happens
every day.  I cannot recall the last time something like
that happened in politics or religion.

- Carl Sagan, 1987 CSICOP keynote address

0
fungus
7/6/2006 12:34:57 AM
fungus wrote:
> Mirko Puhic wrote:
>> Id like to fake the reflection changes so it looks like object is 
>> passing thru other objects around it, reflecting them.
>>
> 
> I don't think you can do it with an environment map,
> you need to look into cube mapping (the next step
> up from environment mapping).
> 
>> I suppose it could be done by manipulating texture stack. Is there a 
>> common way to do this? What transformation to apply to texture stack 
>> to make this look "good"?
> 
> None, because at the end of a day an environment map
> only covers the half of your object which is facing
> the viewer. You can't rotate the "back" into view
> because there isn't one.
> 
> 

I follow you but... The idea was to trasnform generated texture 
coordinates to get the appearance of reflection sliding over the object. 
First I naively tried:

glMatrixMode( GL_TEXTURE );
glLoadIdentity();
glTranslatef( time, time, time );

But this just slides in the black areas. What I had in mind was to 
transform/animate the texture coordinates in a way that they stay mapped 
inside envmap circle. Kind of like rotating the s,t coordinates around 
the texture center.

In other words to achieve the same effect as if env hemisphere would be 
rotating around the principal axis. So no "back side" hemisphere is ever 
reflected.

I tried a number of transformations in texture matrix mode but nothing 
seems to rotate the map in a desired way.

Doing it with cube map seems pretty straightforward.
Only problem is - I'd prefer to do it without using extensions.
0
Mirko
7/6/2006 3:56:44 AM
Mirko Puhic wrote:
> 
> ...this just slides in the black areas. What I had in mind was to 
> transform/animate the texture coordinates in a way that they stay mapped 
> inside envmap circle. Kind of like rotating the s,t coordinates around 
> the texture center.
> 

The only transformation which could possibly
be useful is glRotate(angle, 0,0,1);

> Doing it with cube map seems pretty straightforward.
> Only problem is - I'd prefer to do it without using extensions.


Cube map is among the most widely supported extensions:

http://www.delphi3d.net/hardware/extsupport.php?extension=GL_ARB_texture_cube_map


-- 
<\___/>
/ O O \
\_____/  FTB.    For email, remove my socks.

In science it often happens that scientists say, 'You know
that's a really good argument; my position is mistaken,'
and then they actually change their minds and you never
hear that old view from them again.  They really do it.
It doesn't happen as often as it should, because scientists
are human and change is sometimes painful.  But it happens
every day.  I cannot recall the last time something like
that happened in politics or religion.

- Carl Sagan, 1987 CSICOP keynote address

0
fungus
7/6/2006 11:43:46 AM
fungus wrote:

> The only transformation which could possibly
> be useful is glRotate(angle, 0,0,1);

That's exactly what I was thinking is obvious. But when trying:

....
glMatrixMode( GL_TEXTURE );
glPushMatrix();
glLoadIdentity();
glRotatef( time, 0, 0, 1 );
glMatrixMode( GL_MODELVIEW );
drawObject();
glMatrixMode( GL_TEXTURE );
glPopMatrix();
glMatrixMode( GL_MODELVIEW );
....

I can still see the black areas sliding in. There must be some catch to it.


> 
> Cube map is among the most widely supported extensions:
> 

Yes I'll probably end up doing it that way but I'd still like to resolve 
the sphere map approach just to clear things out.
0
Mirko
7/6/2006 12:02:01 PM
Reply:
Similar Artilces:

Python pickle to overcome heterogeneous 32/64 bits environment
Hello, Did anybody tried python pickle module over heterogeneous 32/64 bits mpi exchanges to overcome the translation problem ? i.e. pickling on one side (let's say a 32-bits OS side), sending the buffer as string through mpi and unpickling on the other side (let's say a 64-bits OS side) Any well known pitfall or advice before I try this way would be welcome ! Thanks a lot in advance ! Regards, Thierry ...

moving Outlook 2003 to Entourage
How can I move my entire Outlook fiel on a PC over to Entourage? If I just make a PST back-up will Entourage open it? ...

Response object in SOAP
Hi, I use ruby to get a report by calling a soap based web service method.I am getting a ruby object of this type SOAP::Mapping::Object. I inspected the object; I tried getting the info out of the object without luck. Considering the soapResponse is the object returned by the web method I have tried things like soapResponse["//some_elem"] .. stuff like that. But I get nils (except for the root). I can convert the response to an array .. using __xmlele I think and then parse it. This should be a solution. But what should I do to correctly parse the object? How do I access the rec...

Moving stored procedures
Hi I m trying to move only stored procedures from one database to another and also onto a database on another server, I tried db2 -x "select text from syscat.procedures where procschema = 'MYSCHEMA'" | tee /esa/home/sasha/MY_SCHEMA_SP.txt, how ever all the procedures are getting loaded to the file but some stored procedures are getting truncated because they are too big , I also tried to use getroutine but the problem is we have 600 of them, Please can one letme know the best way to copy all the procedures to another database thanks RIK Hi Rik, th...

How to delete a COM object?
Hi all, I've been working on a in-proc (DLL) COM object using VOCOM. I'm using it in an ASP page. I'm a novice at both, and am having a problem that seems like it must have a better solution than I've found. My problem is that once I use the myCOM.dll through an ASP page - I can't delete myCOM.dll. I am testing this under IIS 5.1 on my Windows XP workstation. The only way I've found to delete myCOM.dll is to restart my workstation - which is very annoying since I'm making constant changes to the COM object. How can I stop the COM object so it can be ...

fills in tabbing environments
Is there any way to simulate the behaviour of \dotfill in a tabbing environment? I assume that if one could find out the distance between two consecutive tab stops one could create a box of the appropriate size and put a fill inside it, but how do I get to that first step of getting the distance between tab stops? -- Kai-Mikael J��-Aro email: kai@nada.kth.se "Don't win, don't lose." NADA, KTH voice: +46 8 790 61 18 -- Yoshigasaki-sensei SE-100 44 Stockholm fax: +46 8 10 24 77 SWEDEN Kai-Mikael Jää-Aro wrote: > Is there any way to simulate the...

Spherical Triangle
I have written programs for the five cases of plane triangles and the six cases of spherical triangles for my HP 50g. I am in the process of testing the results. For someone who has written similar programs, would you check to see what answers you get for the following? Given: A = 66 Degrees 20 Minutes B = 133 Degrees 40 Minutes a = 82 Degrees 10 Minutes To Find: b, c, C. This is an anbiguous case, so there may be six results rather then three. a is the side across from angle A. Capital letters are angles. Lower case letters are sides, which are also given in angular measure in Spheri...

[9fans] random moving of cursor arrow
hi! i've got a odd problem: when i copy large amount of data from cd-rom to hard-disk (300 mb) and try to move the cursor arrow, then the cursor is randomly moving around the screen. so, i'm not able to work with mouse while copying from cd to harddrive. procesor is amd k6 300 mhz, graphic card is s3virge, 96 mb of ram. thanx for hints. sasa babic (babic@icpf.cas.cz) On Fri, Jul 25, 2003 at 10:52:31AM +0200, sasa wrote: > > > when i copy large amount of data from cd-rom to hard-disk (300 mb) > and try to move the cursor arrow, then the cursor is randomly > moving...

need a json representation of all members of any type of object, list or hashtable (php's var_dump)
hi. for 2 open source components of mine that are used in debugging, i would like to capture the output generated by print for any variable. i'm new to python, so please excuse my noobishness. i don't know if objects can be json-ed as easy as lists and hash tables are by print. and i couldn't find how to capture the output generated by print into a string, so i can't use it with google appengine :( i'm in dire need of some expert advise here. --=20 --------------------------------- Greetings from Rene7705, My free open source webcomponents: =A0 http://code.google.com/u...

question about align environment
Hi, using the align environment, I noticed that anything in between \begin{align} and \end{align} seems to get centered instead of what I wish it does, i.e. I want things to be placed near the left margin, not somewhere near in the middle of the page. Any suggestions? I should probably use another environment? Thanks very much in advance In article <1171994381.746069.128770@t69g2000cwt.googlegroups.com>, godoenov@hotmail.com wrote: > Hi, > using the align environment, I noticed that anything in between > \begin{align} and \end{align} seems to get centered instead of what I ...

Data Environment and Reports
Hi there I hope someone can help. I am using the DE and Data Reports in VB6. At design time the command for each report is set using the DE. At runtime this switches to a sql statement. When I first run the report with specific criteria it picks up the correct results, however if I then run a second report with different criteria it seems to still hold the original data. Code is as follows: 'get the model type mt = frmReportChoice.RepChoice("Model") 'if we have one then If mt <> "" Then 'set the sql sql = "SELECT * FROM qryModelsByType WHERE ModelT...

Top-level pages object is wrong type
Hello When trying to open a pdf using xpdf, I came across with the following errors: Warning: Color name "#e6e6e6 " is not defined Error (0): PDF file is damaged - attempting to reconstruct xref table... Error: Top-level pages object is wrong type (null) Error: Couldn't read page catalog Warning: Name: scroll Class: XmScrolledWindow DeAssocNavigator requires a navigator trait Is there a way to fix it? Many thanks Ed In article <836a68fb.0307251257.6c404461@posting.google.com>, emammendes wrote: > Hel...

Moving partitions?
Hi All, I have recently installed an A1000 array as additional storage for our Sun 450r (Solaris 9) I would like to move certain data from the internal 18Gb SCSI drive, to the new external 100Gb raid5 array. What would be the best method to move the /usr tree? I _tried_ mounting an a1000 slice to /usr.new and running cp -Rp /usr /usr.new which failed miserably due to what I beleive are recursive symlinks. (though im not entirely certain) tarring the /usr directory also failed miserable. I figuered once the data resides nicely on /usr.new I can tell the system to mount the new slice o...

development environment
Hi All. I am in the process of working on a few functions that lead toward a what I hope will be a better developing environment for general Matlab programming. I have put together some large Matlab code and find that it errs out at a specific point, and even with breakpoint insertion, workspace saving, and modularization of processes, there is a lot of lost time associated with the restart of a large program. This is especially true when large external data sets are being queried, which is an issue I run into frequently. What I am attempting to do is create a code that will analyze Matlab c...

VOIP in a small office environment
Folks, I am a newbie when it comes to VOIP. I wanted to use VOIP in our small office environment. Existing setup involves three analog lines coming to my office. They go into a PBX, and from there on, we have our individual phones connected. Of course the three lines are in a hunt group, so an outside caller calls the same number. I called Vonage having the same type of setup. Vonage told me VOIP does not work like that. I will have to get an IP phone for each individual in the office. They do have some kind of hunt group, but not similar to normal hunt group. I have the...

Slant-Eyed Chinks and Gooks, some books like, move, and fill. Others wickedly solve, Sloppy Chimp.
Where did Walt arrive near all the bushs? We can't cook pins unless Marian will finally attack afterwards. The frogs, drapers, and envelopes are all bad and closed. My dark kettle won't pour before I explain it. If you'll burn Guglielmo's ladder with barbers, it'll sneakily sow the game. Julie lifts, then Ron daily shouts a fresh carrot through Chuck's sunshine. He'll be shouting within fresh Penny until his potter attempts usably. Her plate was glad, blunt, and moves against the obelisk. She can kick wistfully, unless Karen pours ulcers beneath Zamfir's...

Microsoft Office Embedded Shockwave Flash Object Security Bypass Weakness
"Microsoft Office is prone to a weakness that may allow remote attackers to execute arbitrary script code contained in Shockwave Flash Objects without first requiring confirmation from users. A successful attack may allow attackers to access sensitive information and potentially execute malicious commands on a vulnerable computer." http://www.securityfocus.com/bid/18583/discuss Imhotep -- ************************************* Pass a Net Neutrality Law in the US!!!! Save the Internet: http://www.savetheinternet.com/ Its our net: http://www.itsournet.org/ *********************...

Moving from T3 to TX?
Hi, My trusty T3 is falling appart and the screen is worn in the grafitti area - so I am thinking of possibly getting a TX. Can anyone tell me if it is possible to use Grafitti 1 with the TX? I use it on my T3 with no problem with the usual hacks. Does desktop sync work in the same way on a Mac? I seem to remember Palm threatening not to support Mac OSX at some point. Do I need a cradle for desktop sync? I notice one doesn't seem to come in the box anymore! Thanks + nospam@nospam.com (Keith): | Can anyone tell me if it is possible to use Grafitti 1 with the TX? ...

let's move forward
why don't we move forward from this newbie discussion and focus once again on something worthwhile. if you don't want to respond to a newbie question you are not obligated to so don't respond. but let's not forget we all had to start crawling before we could start walking. "concerned citizen" <nowhere@hotmail.com> writes: > why don't we move forward from this newbie discussion and focus once > again on something worthwhile. if you don't want to respond to a > newbie question you are not obligated to so don't respond. but let's >...

considering moving from win2k to solaris
but... I have a few questions if I may. Firstly, I am not new to UNIX, but I've never touched Solaris. I read that it's fast and stable, but how well would it run on a P3 800MHz with 256Mb RAM? Also, one very big part of my job involves video conferencing. To the best of my knowledge, everyone I conference with uses Windows. Is there a suitable cross-platform video conferencing program that I could use to talk to people who use Windows? This is perhaps the most major aspect; if there's no suitable software, then it's pointless for me to even install this OS. Finally, I d...

Ann: PHP-CLI binding added the Test Environment Toolkit
We're pleased to announce the first release of a PHP-CLI Binding for TET. PHP-CLI is the Command Line Interface to PHP, a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. This initial release is part of the contrib distribution and can be obtained at http://tetworks.opengroup.org/contrib/php-cli_api/ http://tetworks.opengroup.org/contrib/php-cli_api-1.0beta.tar.Z http://tetworks.opengroup.org/contrib/php-cli_api-1.0beta.tar.gz This is yet another language binding generated using SWIG. A set of introductory slid...

What I want "Real WMV", 148.50 mhz sample-rate, 1920 X 1080 progressive scan image, lowest-possible "object data" bit-rate?
Hi: Let me explain why I want "Real WMV", 148.50 mhz sample-rate, 1920 X 1080 progressive scan image, with an "object data" whose bit-rate is the minimum possible. I like the audio artifacts associated with a monoaural WMA audio file whose sample-rate is at least 44.1 khz [and whose audio had the same sample-rate when uncompressed* as after compression] but whose bit-rate is low enough to cause audible artifacts. I would like to see the video-equivalent of these artifacts. That is why I am so interested in this. Lets say I have "Real WMV" file with a 148.50 mhz ...

Simple Change to a List Environment
Hello. I have been using the theorem list structure in a beamer presentation with the wolverine theme, and the theorems display beautifully. The only issue is this... Let's say I have 4 statements I want to make. I want them all to be displayed in the exact same format (as though they are at the exact same level in a hierarchy), except that rather than have them labeled Theorem 1, Theorem 2, Theorem 3, and Theorem 4, I would like them labeled Theorem 1a, Theorem 1b, Theorem 2a, and Theorem 2b ? Below is the code I have presently, which gives them the 1,2,3,4 numbering that I am tryi...

spherical parameterization
hi i am doing my final year project in which i m taking MRI segmented images of *.img format.i downloaded a toll box but i was not successful in that to open these file format in that tool box as i m new to Matlab that's why i m very confused what to do? second thing is i want to construct 3d surface and do spherical parametrization(convert these images to a unit sphere ). ...

Multiple operator() overloading for functor object
Is it possible to overload multiple times operator() ? For example for using one or two arguments ? My visual c++ does not seem to like it : I was trying to implement an arbitrary integer precision class (I know such libraries already exist) and I wrote the following piece of code : template <typename T> class plus_with_carry { public: plus_with_carry(void) : carry(false) {}; T operator() (const T& left, const T& right) { T temp = left + right + ((carry) ? 1 : 0); carry = (temp<left); }; T operator() (const T& arg) { T temp = arg + ((carry) ? 1 : 0); ...