WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rating: Thread Rating: 6 votes, 5.00 average. Display Modes
Old 11-22-2006, 09:58 AM
v-clizzin v-clizzin is offline
Join Date: Sep 2006
Posts: 15
Model tessellation and lighting effects

Hi, I am writing a program that uses the user-defined lighting effects supplied by Vizard (specifically, viz.LIGHT). I'm figuring out how to do this using the '' file included in the Techniques & Examples help section. The file notes that in order for lighting effects to work correctly, the models must be tesselated into small enough pieces. Since I'm working with custom models that I didn't make myself, I am looking for help on how to tesselate these models. The models I'm working with are a custom room model and some avatar models (one is the generic Vizard male.cfg and the other is a custom avatar from the Complete Characters package).

In addition, when I port the code for a spotlight from the sample file into another program using a custom room model with two partitioned rooms, the spotlight shines on the outside wall, but doesn't seem to affect the partition wall at all. That is, the room looks like this:

A |__|__| D

The light shines on the inside sides of walls A, B, C, and D, but does not affect the divider wall at all. This might be related to the tesselation problem, but I'm noting it here in case it is a separate problem.

Any help/advice would be appreciated. You can post here or email me at Thank you very much!

Christopher Lin

Last edited by v-clizzin; 11-22-2006 at 10:01 AM.
Reply With Quote
Old 11-23-2006, 05:34 PM
k_iwan k_iwan is offline
Join Date: May 2006
Posts: 115


A little note about the Light properties in Vizard;
Greetings from Australia. I found out that the documentation is not complete yet. I'm guessing that the light implementation hasn't been developed fully in Vizard (still in development).

according to Vizard documentation we use;
mylight.position(0, 1, 0)
for spot light and directional light

but, according to openGL docs, we need to use;
mylight.position(0, 1, 0, 0) #for directional light
mylight.position(0, 1, 0, 1) #for point light

Try to use these settings to set up directional/point light in your scene. You might get different result. Also try to use different ambient color for the object. for an example, if the sky color is blue and yellowish directional light, set the ambient color with a lighter hue of blue.

Tesselating objects;
(A) Static Objects
This is fine, however, in Real time application we always aim for low polygon models. We can make a cube that has 6 polygons or 1 thousands polygon.
e.g. 10 cubes of 1000 polys = 10000 polygon, depending on your hardware capabilities this should be OK. But surely we have backgrounds and other props to consider as well. More polygons leads to slower framerate.

(B) Armature/Bone/Animated Character objects
I don't usually tesellate a character after being animated. The reason because the vertex weight assignment to the bones might have different value or completly gone. By doing this, I would have to re adjust the vertices weight accordint to it's bone assignment (basically close to re-weight-painting the entire character so that it would deform properly). This can be done in rather easily in Blender, XSI or 3ds max.

Some ideas to get better lighting with low poly 3d models
(A) Try to implement per-pixel light by using shader language.
(B) Set up the scene with good lights rig, bake light onto texture. This can be done in Blender, XSI, 3dsmax, Maya, lightwave, etc.
(C) Bake light+RayTrace+Global illumination+Radiosity by using Giles...
(D) Implement a Real-Time Global Illumination Radiosity Ray Tracing system in Vizard () This option may not be happening at this stage but things are looking good in realtime-visual development. References;,

At this stage to create a believeable environment, I would bake lights information onto textures by using (B) or (C) options above. In some cases setting up light and colors properly in vizard would give good result too.
I have created a demo of a scene where the lights are baked onto the texture. I'm currently at work but when I get home I will immediately post in this forum.
Have a great day.

Kind Regards,
Reply With Quote

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 05:17 AM.

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