WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-10-2003, 06:33 PM
FlyingWren FlyingWren is offline
Member
 
Join Date: Mar 2003
Location: Fargo, North Dakota, USA
Posts: 48
Vizard 2.0x lighting

As I mentioned in another thread, we aim for "WYSIWYG" lighting; that was, we need to precompute the RGBs on our textures and then just have them appear identically when viewed within Vizard.

One of the first things I noticed with Viz 2.07 is that something is clearly different with the default texture filtering (which I must say I really like). However, is it safe to say that the default lighting has changed too?

I bring this up because some of the textures in our world exhibit different behavior when I view them with v1.98 and v2.07 respectively. For instance, we have a transparent "grate" texture on the floor in one of our virtual worlds, covering up a virtual "pit." In v2.07, when you view the grate orthogonally, the grays that make up the grate are clearly much brighter than when you view the grate at a sharper angle. In v1.98, the pixels that make up the grate appear to be constant, regardless of view angle.

There wasn't any mention of possible lighting changes in the documentation that I saw; can I get the scoop here?

Last edited by FlyingWren; 08-10-2003 at 06:35 PM.
Reply With Quote
  #2  
Old 08-10-2003, 07:35 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

There is one significant lighting change in the newer version that you should be aware of. In the old version the default lighting was pointed in a fixed direction. In the newer version the default light is fixed to the head, so it is always pointing in the direction of the view. Since transparent textures are modulated, the color depends on the angle at which the light is hitting it, hence the change in color at the different viewing angles. If you want the grate to always be the same color simply disable lighting on it.

Code:
grate = viz.add('grate.wrl')
grate.disable(viz.LIGHTING)
In the code above I'm assuming grate is the name of your grate object. Hope this helps
Reply With Quote
  #3  
Old 08-11-2003, 11:16 AM
FlyingWren FlyingWren is offline
Member
 
Join Date: Mar 2003
Location: Fargo, North Dakota, USA
Posts: 48
Ah. Yep, that does the trick. As always, thanks for your quick and helpful response.

If I could pester you with one more question re: the depth-of-field effect that is in Vizard 2.07... It appears that textures beyond certain distance thresholds appear 'blurred' to various amounts. I assume this is done through mipmapping. Anyway, if we should want to disable it, what's the command?

I tried
room = viz.add('room.wrl')
room.appearance(viz.DECAL)


...and some derivations thereof, but didn't get what I was looking for
Reply With Quote
  #4  
Old 08-11-2003, 11:53 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

In the latest version you can control the filter mode of textures. So in your case you would do something like this:

Code:
tex = viz.add('texture.jpg')
tex.filter(viz.MIN_FILTER,viz.NEAREST)
tex.filter(viz.MAG_FILTER,viz.NEAREST)
object.texture(tex)
However, this method seems like it would be very inefficient if you have a lot of textures that you want to change. So, I'm going to add a new appearance mode, viz.TEXMIPMAP and viz.TEXNEAREST. We are planning on creating an installer for the latest version today, so you can test it out tomorrow morning.
Reply With Quote
  #5  
Old 08-11-2003, 12:20 PM
FlyingWren FlyingWren is offline
Member
 
Join Date: Mar 2003
Location: Fargo, North Dakota, USA
Posts: 48
Oh, wow. Thanks a bunch.

Edit: Just tried it out and it is working just fine. Thanks again.

Last edited by FlyingWren; 08-13-2003 at 01:44 PM.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:49 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC