PDA

View Full Version : Normal Mapping for Half Life 2 in XSI


adam|zeliasz
12-30-2003, 06:13 PM
Does anyone know or have a good tutorial of normal mapping using the GPUSurfaceFX addon in Softimage XSI 3.5?

I tired it for a few hours and couldnt get it working after reading the info in net view, or watching the demo from the Softimage site.

My test:
1. Build a low rez model. Assigned UV mapping to it.
2. Duplicated low rez, subdevided it, extruded some polys for detail, assigned a UV map, added the default image as the texture.
3. Used GPUSurfaceFX addon.
4. Under Setup, clicked Create, added the hi rez mesh with UV to the high_resolution layer
5. Selected the low rez mesh and hit apply from the Low Resolution Setup in Net View, on the popup I left the default settings and clicked Regenerate Maps.
6. Opened the Render Tree, selected the low rez mesh to see the texture tree, then finally draged the diffuse bump map from the Material Presets under GPUSurfaceFX net view window onto the material node for the low rez mesh... nothing happened. Any solutions?

Also when I hit Create to have the addon generate layers/lighting I get an Internet Explorer script error:
Line: 43
Char: 2
Error: Invalid procedure call or argument
Code: 0
URL: file://C:\Softimage\XSI_3.5\Addons\GPUSurfaceFX\prepping.htm

I click yes to keep running the script.

Maybe there is a manual way to set it up?

Thanks.

wmendez
01-02-2004, 03:22 AM
Have you tried using the quick setup link to see if the same error occurs?

adam|zeliasz
01-05-2004, 02:25 PM
I tired that too. I wonder if there's a way to create them manually.

wmendez
01-06-2004, 03:44 AM
I just finished a quick camtasia on how to do it, will post link soon

Here ya go 20mb Windows Media 9 encoded
http://tinyurl.com/28qxc

adam|zeliasz
01-07-2004, 02:33 PM
Thanks for the video tutorial. Let me try it and get back to you.

Thanks.

adam|zeliasz
01-07-2004, 05:27 PM
I followed everything correctly till I selected the Real Time Shaders in the perspective window. I got an error that the real time shader .DLL is missing. Im going to try it at home.

Does the same setup work if I wanted to use DirectX instead of openGL?

wmendez
01-07-2004, 06:06 PM
If using OpenGL you need the CG shader libraries from Nvidia installed?

http://developer.nvidia.com/object/cg_toolkit.html

You can use Direct X, The reason I did not use it in this demo was because when I moved the light in realtime shader mode the viewports flashes (even with my Quadro 980 card) So when I tried with with OGL I did not have the problem.

adam|zeliasz
01-07-2004, 09:54 PM
I hope you dont mind if I ask you another question since you seem to have some experience with normal maps.

If I build a hi res model of a boot; buckles that are seperate objects and a zipper that is also seperate (each item has its own uv's and textures); is it possible to build a low res mesh of a boot without buckles and a zipper (that has uv's already but not textured) and have the GPUSurfaceFX output both textures and normal maps to the low res mesh, using the buckles and zipper on the high res mesh for normals on the boot?

wmendez
01-08-2004, 03:18 PM
Originally posted by adam|zeliasz
I hope you dont mind if I ask you another question since you seem to have some experience with normal maps.


Hey, that's what these forums are for, not a problem. :)


[i]
If I build a hi res model of a boot; buckles that are seperate objects and a zipper that is also seperate (each item has its own uv's and textures); is it possible to build a low res mesh of a boot without buckles and a zipper (that has uv's already but not textured) and have the GPUSurfaceFX output both textures and normal maps to the low res mesh, using the buckles and zipper on the high res mesh for normals on the boot? [/B]

No, they need to be one complete highres object.

ThE_JacO
01-08-2004, 04:18 PM
don't quote me on that Will, but I can't see why multiple objects normals can't be baked into a single lowres object.

what the scripts do, aside from setting the rendertree for you from some templates/presets, is putting a shader on objects so that they render their normals vectors into RGB space, hide the lowres object from the camera, and rendermap with distance from surface the result.

whatever it's multiple objects or just one MRay doesn't care, whatever is in the way between the object and the virtual camera, set at a convenient distance, gets in.

I use my own script to generate normal maps since a while now, so I don't know about the default netview page, but I guess all you need to do is to hack the script to take multiple selections during the picking session (if it doesn't allow already).

will have a look into it

adam|zeliasz
01-08-2004, 05:55 PM
If you watch the GPUSurfaceFX demo for XSI 3.5 on the Softimage site, when he does the demonstration the hi res model consists of multiple objects and the low res model is one mesh.

I wanted to see if you figured out how to get it to work. Im trying to figure out if I can apply all my texture work on the hi res model and save the time from doing it again on the low res one.

I have the same problem when you view the real time shaders using directx. When I rotate around I get a shimmering effect on the model like the normals wont display right.

Anyone have a solution on how to get the real time shaders working with DirectX in the viewport?

adam|zeliasz
01-09-2004, 03:34 AM
Do you have a specific program I need to install to get the openGL window to work? I downloaded "everything" from the link you gave me and I think I installed pretty much everything... do you know the specific name of the .exe file that I need? Maybe I dont have to install everything, just the CG Shader Library whichever that is...

Also, do you have to have a nvidia card to get it working in the viewport? Im running an ATI and after I installed Nvidias software and ran your instruction, the viewport didnt give me any normals, just a darken textured grid... barely can make out the normal map texture.

Any suggestions?

Thanks.

wmendez
01-09-2004, 03:37 AM
Hey Jaco,

I thought the same but when I asked Alexandre Jean-Claude(GPU programmer) he replied it was not possible. I recall the HL2 Demo as well and all of the rock objects were part of a group which then the material was then assigned to. I will confirm this once again to be sure. Better yet I will try to get him to reply here. stay tuned

ThE_JacO
01-09-2004, 09:25 AM
yes, if you have multiple objects you need some sort of grouping, not really because you can't load a preset on each of them, but more because you don't want to smoke the user's materials away :)

that way is possible tho, just create the normal maps yourself instead then running the script and have fun with it :)

Attilathehun
01-09-2004, 04:42 PM
Hey....uh Mendez im sry but i have no idea what happened in the tutorial that you posted. Could you please explain to me exactly what he did to get that result?...what is normal mapping? Reminds me how much i have ahead of me and how much i need to learn lol. Thanks.

Attila

wmendez
01-09-2004, 06:32 PM
normal mapping is somewhat like bump mapping. bump maps use grayscale varience while normal mapping uses the three color channels for the each axis(XYZ).

This technique is used to add more details to an object without increading its polygon count.

In my video I baked the surfaces of the high res object into the low res one while keeping the original detail.

adam|zeliasz
01-09-2004, 08:46 PM
Will,

Do you have a specific program I need to install to get the openGL window to work? I downloaded "everything" from the link you gave me and I think I installed pretty much everything... do you know the specific name of the .exe file that I need? Maybe I dont have to install everything, just the CG Shader Library whichever that is...

Also, do you have to have a nvidia card to get it working in the viewport? Im running an ATI and after I installed Nvidias software and ran your instruction, the viewport didnt give me any normals, just a darken textured grid... barely can make out the normal map texture.

Any suggestions?

Thanks.

Attilathehun
01-10-2004, 03:28 AM
I have to say thats a realy neat trick...thanks ill make sure to get into it more.

Attila

ThE_JacO
01-10-2004, 03:59 AM
a bit of the theory behind normal maps was discussed here.
if you are new to them you could want to have a look.

http://www.cgtalk.com/showthread.php?s=&threadid=103058&highlight=normal+maps

UTFS ;)

Renderman_XSI
01-14-2004, 11:34 PM
Originally posted by adam|zeliasz
Will,

Do you have a specific program I need to install to get the openGL window to work? I downloaded "everything" from the link you gave me and I think I installed pretty much everything... do you know the specific name of the .exe file that I need? Maybe I dont have to install everything, just the CG Shader Library whichever that is...

Also, do you have to have a nvidia card to get it working in the viewport? Im running an ATI and after I installed Nvidias software and ran your instruction, the viewport didnt give me any normals, just a darken textured grid... barely can make out the normal map texture.

Any suggestions?

Thanks.

Im getting the same error, RT shader DLL missing. cgprogram.spdl missing! I tried the same setup Will is using.

BTW, Will what is the difference between per pixel lighting, front,top,etc?

I have watch the NFT of the GPU Suface FX video..and indeed he does have about 440 objects(they werent group) Maybe someone can e-mail that same guy to write a tutorial on how to use GPU surface FX ;)

Last question, does anyone know if dotXSI format would preserve the normal map data?

ThE_JacO
01-15-2004, 12:00 AM
the so called normal maps are SIMPLY a raster pic mapped on the mesh by UVs, nothing else, they are like any other texture. so any format that retains textures and UVs will bring it along.

the effect is exclusively dependant on how it's rendered by the engine.

so if you export RTS setups into the dotxsi it will be shown in any viewer capable of using them, if you export them to your custom engine you will have to tell the engine to use them as normal maps, that's it.

wmendez
01-15-2004, 06:10 PM
Originally posted by Renderman_XSI
Im getting the same error, RT shader DLL missing. cgprogram.spdl missing! I tried the same setup Will is using.

BTW, Will what is the difference between per pixel lighting, front,top,etc?

Last question, does anyone know if dotXSI format would preserve the normal map data?

If using OpenGl you need the CGTook kit fron Nvidia as well as a Geforce 3 card and up. If using the DX shaders it is not limited by card type but the card needs to support DX8 and up.

I don't get what your mean by per pixel lighting

the DOTXSI format will presrve the normal map like any other texture maps.

Renderman_XSI
01-16-2004, 07:46 AM
I got some more info and the scene file from the friendly folks at Softimage! So im gonna look deeper into GPU surface FX and realtime shader. But indeed eric the knight was made up of multiple objects. thanks Will, i'll try DX than first.

http://217.160.138.15/artists/Renderman_XSI/eric_the_knight.jpg

I assume im getting this error messege because as you stated i dont have the Nvidia cg software installed?

http://217.160.138.15/artists/Renderman_XSI/error.jpg

wmendez
01-17-2004, 04:17 AM
You know what, try this and tell me if it works
CG Shader Addon (http://www.softimage.com/xsinet/displaydetails/Addon_display_detail.asp?family=XNET&software=XSI&parent=51&id=2101&child=Shaders)

You need an account to download it

Renderman_XSI
01-17-2004, 05:17 AM
ok, finish download and installing the addon. funny thing is i dont get the same error anymore, with this new addon i get a new Cg addon in net view where there was one already. so now i have 2,but they have different stuff within them.

anyway, it either my card quadroFX 1000(or my drivers) or XSI. i get a strange error in the realtime view, after applying this simple lambert vertex shader to the default human male character in XSI:

http://217.160.138.15/artists/Renderman_XSI/error_2.jpg

this happens when i get really close into the mesh and upon exiting the mesh the problem reminds, to make it worse the camera seems to jump around alot when using the "S" key to move around. But this lambert shader is awesome:) even for a simple one(when its displaying correctly)!

anyone else getting this problem?

wmendez
01-17-2004, 05:57 AM
Is that with Direct X? If so try changing the following on your OGL settings

toggle off Unified Back/Depth buffer and toggle on Maximize memory

That corrected my issues with the DX errors I fist mentioned ealier in this thread

adam|zeliasz
01-20-2004, 02:21 PM
Renderman_XSI,

Any luck with the scene you got from Softimage?

adam|zeliasz
01-22-2004, 03:21 PM
Check out Softimage.com under tutorials, the SIGGRAPH 2003 section has some solid information concerning the GPUSurface FX addon. You can download the scene file their.

Renderman_XSI
01-23-2004, 07:07 AM
Originally posted by adam|zeliasz
Check out Softimage.com under tutorials, the SIGGRAPH 2003 section has some solid information concerning the GPUSurface FX addon. You can download the scene file their.

yeah its the same scene files. Try apply the real time simple lambert shader to any complex model..and tell me if you get that messy mesh as in the picture i posted on top. I havent tried it with the new setting Will recommended..i'll do it later.

adam|zeliasz
01-29-2004, 04:44 PM
Did anyone figure out a solutions to get the GPUSurface FX working in XSI 3.5? Especially DirectX?

Thanks.

CGTalk Moderation
01-17-2006, 01:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.