Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] shader - offsetmapping

#1
dpoffsetmapping - 2 match8 148

does anyone know what these three numbers mean ... I cant find it in the q3map2 manual .. or the dp wiki ...

..im having issues with a shader where the sunken in areas are in too far ... and not getting enough light
Reply

#2
I wondered about this parameter too... yeah what the hell does that mean?
Reply

#3
meh ... anyone? ...
Reply

#4
nobody? (sorry if im being bumpy ... but its kinda important)
Reply

#5
still noone?!? ...

:: hutty puppyeyes one of the devs ::
Reply

#6
Well, I am not a dev (orly?) but seeing as nobody else has even tried so far, allow me to have a stab at it.

(The lack of reaction so far takes away anyone's right to sneer at my ideas below, just to make that clear :p)

This is what I found buried deep in the comments of a code commit:

Code:
dpoffsetmapping - SCALE match8 8BIT_PIXEL_VALUE_THAT_IS_BASE_LEVEL

- I have no idea what SCALE does. Here's theory though: I am tempted to say it does something to scale the bumpmap. In your example, might the bumpmap image be half the width/height of the regular texture?

- match8 seems to be a keyword, it's not a number. It has a relation to what you can use as the final value (8BIT_PIXEL_VALUE_THAT_IS_BASE_LEVEL) it seems. So Match8 means 8-bit in this case, I guess.

- Which means for the final value you can pick a number between 0 and 255. Are bump maps 8-bit (do they have 256 shades of grey?) Then I guess the final value could define which of those 256 shades is to be used as the base level of the bumpmap? The palette's index number in that case, probably :p That brings up the question of what the heck the base level is. Is it the point where the bump map touches the normal surface/texture? That would make sense :p Then you could use this last value (148 in your case) to raise or lower the bumpmap I suppose.

Most of what I wrote was inspired by what I found online:

Code:
change to offsetmapping syntax:

dpoffsetmapping - SCALE bias BIASVALUE
dpoffsetmapping - SCALE match FLOAT_PIXEL_VALUE_THAT_IS_BASE_LEVEL
dpoffsetmapping - SCALE match8 8BIT_PIXEL_VALUE_THAT_IS_BASE_LEVEL
dpoffsetmapping - SCALE match16 16BIT_PIXEL_VALUE_THAT_IS_BASE_LEVEL

And this, which is more about the parameter bias:

Code:
Offsetmapping: new "Bias" parameter that sets a custom "null point" instead of always having fixed one (at white), set as 0-255 byte additional "dpoffsetmapping" parm (dpoffsetmapping ) a value of 128 makes offsetmapping centered at gray (no effect at gray, black is positive offset, white is negative). Additinally "dpoffsetmapping disabled" now parsed correctly. To see difference of offsetmapping bias see this shot (animated): http://omnicide.legacy-of-kain.ru/work/omnicide000137.gif

Now I am tempted to close this thread, mark as [SOLVED] and sticky it :p
"Yes, there was a spambot some time ago on these forums." - aa
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] Shader fading effect with "alphaGen portal" Maddin 1 3,094 02-08-2015, 02:52 PM
Last Post: Mr. Bougo
  [SOLVED] Tree model leaves shader Justin 12 10,671 05-07-2014, 05:06 PM
Last Post: Justin
  [SOLVED] Missing shader previews / lack of authoritative Netradiant help Greaserpirate 6 6,568 09-17-2013, 01:11 AM
Last Post: Mr. Bougo
  [NEEDS INFO] Failing to fallback when a shader doesn't compile edh 0 2,484 12-17-2012, 05:44 PM
Last Post: edh
  [SOLVED] sky shader not working hutty 1 2,869 07-21-2012, 11:08 AM
Last Post: Mr. Bougo

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-