WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-07-2009, 02:54 PM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 180
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:



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.



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
Reply With Quote
  #2  
Old 03-10-2009, 12:59 PM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
Hi George,

Sorry, but we do not currently support normal mapping on avatars.
Reply With Quote
  #3  
Old 03-10-2009, 06:54 PM
shivanangel shivanangel is offline
Member
 
Join Date: Feb 2006
Location: New Jersey
Posts: 180
Alright,

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

~George
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Normal Maps nige777 Vizard 9 02-21-2008 03:55 AM


All times are GMT -7. The time now is 07:58 AM.


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