Dear Zach,

The older post are right. For bump-mapping, you'll need two things: a bump 
mapping shader and a normal map texture for each of the objects you'd like to 
bump map (assigned to a different texture unit than your diffuse texture, e.g. 
unit 1). 

The good thing of the scene graph concept is that you create a hierarchy of 
objects. If every object in your scene indeed has a bump map texture assigned 
to it, you can just attach your bump map shader to the state set of the root 
(i.e. topmost) node of your scenegraph. Objects in the hierarchy will inherit 
this shader. The same goes for the required uniforms (e.g. the uniform that 
maps the texture2D sampler name in your shader to the OpenGL texture unit the 
bump is assigned to).

Hope that helps,

Ruben

________________________________________
From: [email protected] 
[[email protected]] on behalf of Zach Lenker 
[[email protected]]
Sent: Thursday, July 14, 2011 12:12 AM
To: [email protected]
Subject: [osg-users] [Need Help] Entire 3d environment needs to be bump mapped.

Hi,

The subject sums up what my basic goal is. We have a 3D environment that has 
roughly 50+ objects inside of it. Each object needs to have bump mapping 
applied to it. My confusion comes in at the part where we are applying the bump 
mapping to each object though OSG.

I have done a few hours of searching these forums and Google and haven't really 
found anything concrete to go on. Anything that I found relating to this issue 
was a year old (or more). Those posts were saying that in OSG I would have to 
write a bump mapping shader and apply it to the model. Those posts also seemed 
to be targeted toward getting a single (or a few) object(s) to be bump mapped. 
Is that still the only approach? If so how do I go about applying the bump 
shader to each individual object within the single environment file?

Currently using OSG 2.6, we are not bound to any file type constraints (we are 
currently using ".IVE" for the environment file).

I tried my best to put any information that would be needed, but if you need 
more information or more clarity, please let me know.

Thank you!

Cheers,
Zach

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41345#41345





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
This e-mail and its contents are subject to the DISCLAIMER at 
http://www.tno.nl/emaildisclaimer

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to