Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (vicknick, howardR, sleakz), 674 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 4
Page 11 of 14 1 2 9 10 11 12 13 14
Re: Bump Mapping Shader [Re: Steempipe] #22240
03/31/05 02:31
03/31/05 02:31
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
i tried your shader, i can't seem to get any real effect out of it otehr then reduction in frame rate.

I used the photoshop nvidia plug in to generate a normal map

from the normal standard wad texture assigned that to entskin1

and the normal map assigned that to entskin2


then assigned the material to a map entity I textured with the stone texture ( block on the right side) block wall behind it textured with same texture for compairison



do they both need to be the same format? tga bmp ?
do I need to crop the normal map or is my normal map not normalized enough?

sorry i don't know realy anything on shaders but i didn't notice any differance

Re: Bump Mapping Shader [Re: Grimber] #22241
03/31/05 04:06
03/31/05 04:06
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
indiGLOW: Adjusting your normalmap will need to be done. There is no real "depth" adjustment. There is not even specular or self-shadowing in this effect so it is pretty basic.

Grimber: To me it seems a combination of normalmap values, and possible the overall light directions.
1). try changing c12.y in the vertexShaderConstants to a lower number like 0.2 and see what happens. vertexShaderConstant[n] = {x, y, z, w,};
2). Change the sun position and elevation and see what effect that has.
3). Play with the normalmap.

Both textures do not need to be the same format (ie; bmp or tga only).

My cube on the left has no normalmap, just entSkin1 applied.
My cube on the right has the normalmap in entSkin2 applied to entSkin1.



Eric

Re: Bump Mapping Shader [Re: Steempipe] #22242
03/31/05 05:11
03/31/05 05:11
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
well tried all that, even using a dynamic light and no change.
mabey its my video card its just too old for shaders? XFX geforce 5200?

or mabey its just my pick of textures. Ill try some other texture later on.

Edited

Dah never mind IF i had read back further in the thread, I would have realised this is for models only .

soon as I changed it to a model and applyed both skins to the mdl it worked
had to go back and make a new normal map because it had too much depth
( on the nvidia plug in for photoshop, adjust the "Scale" value to get more depth, but surface also gets darker)




scale of 5



scale of 15


Added

Hehe so happy i made this work went and tried it on my Earth and Moon models for my space game. Think they look better. have to do something about the darkness but thats minor



Last edited by Grimber; 03/31/05 06:31.
Re: Bump Mapping Shader [Re: Grimber] #22243
03/31/05 10:38
03/31/05 10:38
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Glad you got it working. Some small changes to the material need to be done if you want the effect on level geometry.

Possibly the effect you are envisioning might require a bit of tweaking on a per planet basis in the vertexshader and/or texture stages. You may even want to make a pixelshader version at some point that will give you more flexibility in your color operations.

I do like the moon very much

Re: Bump Mapping Shader [Re: Steempipe] #22244
03/31/05 13:43
03/31/05 13:43
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
would it be difficult to modify it to work with the d3d_automaterial =1 (level geometry) or 2 (geometry and models) so it works on the level geometry textures? hehe thats wat i was trying to do at the very first with the shader. tried to directly assign the textures through script:

bmap entSkin1 = <stoneblocks.bmp>;
bmap entSkin2 = <stoneblocks.tga>;

then renamed the material effect to:

material stoneblocks_bmp

which is suppost to be how your suppost to get a material to work on geometry textures. at least to define it to the automaterials

Re: Bump Mapping Shader [Re: Grimber] #22245
03/31/05 21:43
03/31/05 21:43
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline
Serious User
indiGLOW  Offline
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
I have a couple of questions, mainly to do with lighting.

I noticed that the material doesn't seem to work with lights in the level, I added a green, blue and red light and the material didnt take these into account. Is there a way to change this?

Also there didnt appear to be any kind of hi-lights, I would like to see metalic like surfaces and shiny wet surfaces....I have seen some of these in the ultimate shader pack so maybe now that I have some form of shaders working I will revisit that...

Is there a way to combine several shader effects into one material? I am guessing not...

The last thing is that I noticed that as my model was in a spin, the normal map seemed to work in reverse at some times, the optical illusion that is used to create depth, when inverted (i.e upside down), seems to create the opposite effect...

I will dig out some screen shots of what I mean....


In the upper areas of the block, it looks like the veins are raised, yet in the lower part the opposite is true... or is it my eyes playing tricks

Last edited by indiGLOW; 03/31/05 21:49.

The Art of Conversation is dead : Discuss
Re: Bump Mapping Shader [Re: indiGLOW] #22246
03/31/05 23:32
03/31/05 23:32
Joined: Oct 2003
Posts: 1,550
United Kingdom
indiGLOW Offline
Serious User
indiGLOW  Offline
Serious User

Joined: Oct 2003
Posts: 1,550
United Kingdom
Here is a shot about the lighting question.


The blocks on the right have no shader. The top two blocks, it is hard to see the bump map working as the bump map matches the texture, however the lower two show the bump clearer.

There is a dynamic light model that is emmiting a blueish light, which can be seen on both the non-shader versions on the right, where as the left pair only seem to be illuminated based on the suns location, which is set to 0,0,0 in this example. The light follows the cameras location and angles.

I will take a look at some of the other shader threads here and see what I can learn. I posted these shots for reference.


The Art of Conversation is dead : Discuss
Re: Bump Mapping Shader [Re: indiGLOW] #22247
04/01/05 10:09
04/01/05 10:09
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Grimber:
Applying the FX to the level would not be all that hard. However, I think that a fast reply is not going to help you. There are a few things to consider that will help with the performance when applying an FX to level geometry.
If I can find some time I will work something out. Right now there are things on my list to followup on and very little time.

indiGLOW:
For the dynamic lighting you would need to incorporate the dynamic light positions into the shader code. Some other things that I have never worked out was successfully getting the level light and ambient colors into the diffuse. I had to resort to hard coding those typse of values in.
For static lights you would also need to incorporate something into the shader code. I cannot find the code I had where I had made progress on these particular things. I believe it to be nixed from my computer. Which is very, very bad.

The Hi-lights/specular you refer to will have to be coded into the shader. A gloss/specular or darkmapping type thing is not in the code I put here. This code had been abandoned.

By multi-passing you can combine some things. With FFP it is easier to use the framebuffer continually down the passes. With the vetex/pixel shaders it is not always the case unless you can pass the result from the previous pass into a texture. Also I have noticed that alot of codes will render_mesh, render_technique, render_mesh, render_technique. And so on, blending as they go.

I think that the other issues you wrote about are based on the normals. So depending on the orinetation to the light source/model normals you might see some difference in the bumpmapping. I can't make out from your screenshot so well.

There tends to be the need to tweak things per model and particular situation, which is no big deal if you know what you're tweaking and what you want to accomplish. But it can be tedious at best if you do not know.

Re: Bump Mapping Shader [Re: Grimber] #22248
04/03/05 11:00
04/03/05 11:00
Joined: Dec 2003
Posts: 1,097
Maryland, USA
Steempipe Offline
Serious User
Steempipe  Offline
Serious User

Joined: Dec 2003
Posts: 1,097
Maryland, USA
Quote:

would it be difficult to modify it to work with the d3d_automaterial =1 (level geometry) or 2 (geometry and models) so it works on the level geometry textures? hehe thats wat i was trying to do at the very first with the shader. tried to directly assign the textures through script:

bmap entSkin1 = <stoneblocks.bmp>;
bmap entSkin2 = <stoneblocks.tga>;

then renamed the material effect to:

material stoneblocks_bmp

which is suppost to be how your suppost to get a material to work on geometry textures. at least to define it to the automaterials




I added a small tutorial to the WIKI that I hope may help you out.
From the main page it is under... Resources/Tutoruals/Effects

Re: Bump Mapping Shader [Re: Steempipe] #22249
04/06/05 22:29
04/06/05 22:29
Joined: Sep 2003
Posts: 4,959
US
G
Grimber Offline
Expert
Grimber  Offline
Expert
G

Joined: Sep 2003
Posts: 4,959
US
Thanks for putting up that Steempipe. I gave it a try ( even used the church you used for example) and it worked nice. but i ran into this problem. after running it once and tried to re run it I would get some very odd errors. rebooted my computer, would run fine again Once. then the same errors.

My guess is the fx file is setting soemthing in my video card then not releasing it after it runs? donno just guessing here...

error is typicaly this....
W1550
Error in effect:
floor1(26): error X3004: undeclaired identifier 'vecLight'

sometimes its wall3(26) error X3004: undeclaired identifier 'vecLight'

Page 11 of 14 1 2 9 10 11 12 13 14

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1