WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Normal Map Workflow for Vizard (https://forum.worldviz.com/showthread.php?t=1885)

shivanangel 03-07-2009 02:54 PM

Normal Map Workflow for Vizard
 
Hi Vizard Support people,

I had a question when it can to implement normal mapping on objects inside of Vizard.

I found a few questions already about this and I found that the simple:

object.bumpmap(bumpmapfile)

worked fine the first time I used it on a simple .obj model with a normal map
produced from a software package called Z Brush as you can see below with the code:

Code:

import viz

viz.go()

viz.MainView.setPosition([0,0,-10])

test = viz.add('prototypeSphere.obj')
normal = viz.add('prototypeSphere4.BMP')

test.bumpmap(normal)

head = viz.MainView.getHeadLight()
head.disable()

l = viz.addLight()
l.setPosition([20,20,0])

def onUpdate(e):
        #This will be called every frame
        test.setEuler([1,0,0], viz.RELATIVE)
       
viz.callback(viz.UPDATE_EVENT,onUpdate)

In that demo the sphere would turn around and we'd get to see all the lovely detail added by the normal map as shown below:

http://i200.photobucket.com/albums/a...herenormal.jpg

The problem I am having now is when I am trying to apply a normal map to a model in a CFG file (Cal 3D format for animation).


Code:

import viz

viz.go()

viz.MainView.setPosition([0,0,-10])


TRex = viz.add("TRex.CFG")
normal = viz.add("TRexNormalMap_03_Tangent.BMP")
head = viz.MainView.getHeadLight()
head.disable()

TRex.bumpmap(normal)

Same code as before with same process for creating a normal map in Z Brush but I get broken results. The model reacts to lighting but only once and it seems to be stuck at some side lighting phase. Regardless of additional lights being added the model is stuck in this kind of lighting.

http://i200.photobucket.com/albums/a...cakes/TRex.jpg

Any help? Is it not possible to add normal mapping to non-static objects?

Here is my normal map for the T-Rex, but I'm sure that is correct:
I used Tangential instead of Adaptive when generating it, which seemed
to make sense since I believe Vizard needed the tangential information when
calculating the normal map in the pixel shader. And it worked for the sphere.

http://i200.photobucket.com/albums/a...03_Tangent.jpg

Thanks,
George

Veleno 03-10-2009 12:59 PM

Hi George,

Sorry, but we do not currently support normal mapping on avatars.

shivanangel 03-10-2009 06:54 PM

Alright,

Thank you for the answer, I'll see what I can come up with
on my own for a fragment shader.

~George


All times are GMT -7. The time now is 02:48 AM.

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