Jump to content
The Dark Mod Forums

Ungoliant's mapping questions


ungoliant

Recommended Posts

Did you reduce the tris in sculptris or retopo one by hand for the low poly mesh?

 

I used meshlab to decimate it (great free software), with some clean-up work done in blender afterwards. However, I will be using a retopo for the shadowmap which has not been made yet, going to try to stay under 250 tris. I have an interesting idea for this, invert the normals for the whole low-poly, and retopo it from the inside =D

 

I'll be making probably 5-6 variations of stalagmites/stalactites as a series when this one is done. I'm really happy with the method used to produce this, so no more re-do's

Edited by ungoliant
Link to comment
Share on other sites

material shader issue. I'm not sure if what i'm asking is impossible or not.

 

Ok so here is an example of scale stage keyword

{
blend diffusemap
map textures/stuff
scale 0.5, 0.5
}

now the image is twice as large

 

can I apply this somehow to a single image for use in addnormals(<map>, <map>), or is this impossible?

Edited by ungoliant
Link to comment
Share on other sites

Not possible:

 

http://www.doom3world.org/phpbb2/viewtopic.php?f=2&t=25081&start=20

 

 

But there are some insights in there:

 

"After a quick test it looks like addnormals() uses the size of the first normalmap as the target, and scales the other one accordingly ( i summed a 128x128 with a 256x256 image and the result was 128x128 with the second image scaled to fit ).

 

So in that sense, you probably could get more detail, by taking a base texture, and adding an even bigger detail texture to it ( with the huge detail texture as the first term ), at which point your graphics memory might have a heart attack..."

 

quoth our friend Rebb

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

i suppose this is still possible, but not in a way that I would really like to do it.

 

use photoshop or something to create a 2x2 image of the textures original normalmap with double the resolution. Now use addnormals to composite it with a large custom normal map. Then in the bumpmap stage rescale by .5, .5. I'm not sure how the rescaling would work, it is possible it may be necessary to translate the result by 1/2 the original resolution of the composite image in both x and y direction to get it to fit correctly over the diffuse. That method will work, but its more effort, more drive space taken up, and impossible to plug and play textures into the material shader to "skin" it.

Link to comment
Share on other sites

Don't the stages in a shader take the previous operation as an input?

 

Couldn't you also apply the scaled normals to one stage then apply the other normals in the next stage?

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

afaik you can't use multiple bumpmap stages, it would either overwrite or toss up an error probably. addnormals is likely the only function that will work, but i could be wrong, of course. another blend mode cannot be used, because diffusemap, bumpmap, and specularmap are the only blend modes that react to lighting.

Edited by ungoliant
Link to comment
Share on other sites

Ever been in a large area that tiles very badly? I want to overlay a large normal map that spans across multiple tilings of the default diffuse/bump to both add detail, and obscure tiling. This would be perfect for large caves, cliff faces, or really any other large expanse of organically formed material like dirt or stone, as long as they are lit properly, use ambient occlusion map based on the normal map, or both.

Link to comment
Share on other sites

But is that applied to the material shader

 

YES. Thats the whole point. I want to add another level of detail and tiling masking to patch based caves and things like that. I'm just trying to modify textures that you can pull up in DR and apply to worldspawn.

  • Like 1
Link to comment
Share on other sites

This thread seems to indicate that cascaded normal map stages would work:

 

http://www.doom3world.org/phpbb2/viewtopic.php?f=3&t=1914&view=next

 

 

The takeaway of the stage processing breakdown is that normal maps

accept "all" previous stages as input. This means the lighting from the

first normal map will be altered by the influence of the second but I presume

it wont be physically accurate. It will treat the shading from the first normal

map as a painted-on image. It might still be effective for small features

(surface noise) overridden by larger features... mostly it'll probably look wrong...

 

Time to experiment.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

so, back to work.

Referencing the specular stuff from page 3-4 of this thread, i went back and played with the specular values when using the enhanced interaction shader on materials that use the _white map for their spec. I still haven't found the cause, since i can't read ARB very well, but playing with the values yields a conclusive number.

The specular goes full blast when using values "map _white" and any value above "rgb 0.0011111111111" repeating forever. any value under this threshold and the specular yields the same visual results as if the interaction shader was set to default.

 

If Obsttorte is having any luck working through ARB i might throw this issue his way and see if he can pinpoint it. Its very likely located somewhere in interaction.vfp, interaction_102.vfp, or interaction_direct.vfp, depending on which of these files is being utilized by the enhanced interaction shader.

Link to comment
Share on other sites

The shader program used for enhanced stuff is ambientEnvironment.vfp (unless I misunderstand you)! However, the calculations done there are pretty messy. I could write it down in a more readable way for you.

 

I actually don't know in which cases the interaction.vfp files are used, so maybe you could repeat what you are actually trying to achieve?

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

What is the exact problem again ?

What does "full blast" mean in regards to specularity ?

The shader program used for enhanced stuff is ambientEnvironment.vfp (unless I misunderstand you)!

I actually don't know in which cases the interaction.vfp files are used, so maybe you could repeat what you are actually trying to achieve?

OK, problem being specular totally washes out the entire diffuse when viewed from a head-on angle at a moderate distance (15m-ish?) or more.

With interaction shader set to enhanced:

enhanced.jpg

 

with interaction shader set to default:

defaultpv.jpg

 

so "full blast" here basically means it doesn't even look like specular, the stage just completely washes out the diffuse with blinding white.

So a typical spec stage in a material that has no dedicated specular image looks like this:

blend specularmap
map _white
rgb 0.1

playing with the values, I've discovered that anything below "rgb 0.001111111111111" yields the same result as switching interaction shader to default. It's not quite off, but it looks much more reasonable. However, if you go above this number, even 0.001111112, you get the snowblind effect pictured above. There is no middle ground here.

You could just create a 8x8 image with the shade of your choice

I don't think serps advice here works, as i suspect using any flat image of some monochrome color yields the same result, but with a different rgb value as the threshold. its either snowblind or muted completely. using a black spec stage looks the same as turning interaction shader to default with any rgb value (actually i haven't tested default setting with something like rgb 1 or rgb 0.9 yet).

Soooo, i guess the point is, it would be reaaaally nice to have a middle ground between off and snowblind when using textures that don't have a dedicated specular image. they are few and far between, but they are out there.

 

also, i had assumed that the ambient rendering option used ambientEnvironment.vfp, and the interaction shader uses interaction.vfp, but thats a guess, really.

Link to comment
Share on other sites

playing with the values, I've discovered that anything below "rgb 0.001111111111111" yields the same result as switching interaction shader to default. It's not quite off, but it looks much more reasonable. However, if you go above this number, even 0.001111112, you get the snowblind effect pictured above. There is no middle ground here.

 

The shader assumes that if the specular-multiplier ( your rgb 0.1 drives this ) value is below 0.1 ( floating point rounding error is probably causing your 0.11111etc value here ), that there is no specular-map at all and it then uses an artificial specular value instead, and not what you were actually supplying as your specular ( _white ). Afaik JCDenton introduced this so that everything has some specular to it.

 

However once you go above that multiplier-value it will fully use what you have supplied as your specular again, while also mapping between preset specular power values. The default Doom3 interaction shader does not do this, it uses the same specular power everywhere.

 

You could try using the scale() image function instead of the rgb keyword, that shouldn't trigger this test.

 

map scale( _white, 0.1, 0.1, 0.1, 0.1 )

 

So it's not actually an error that is to be fixed, just the way this in-shader test approach works.

 

Something that could be done is lowering the test-value to something below 0.1 but then it's just a question when someone else accidentally sets their rgb value below the new limit.

Link to comment
Share on other sites

Regarding interaction.vfp: You are right, this is the main shader. I thought you were referring to the enhanced ambient stage used by some materials.

 

interaction_102.vfp is the shader used for the advanced interaction. The problem is that it is just a list of commands without any reasonable documentation. I'll definetely need some time to understand what is done there before I can attempt to fix the issue.

 

However, any information you can provide would be helpful.

 

I guess with *washed out* you are referring to the fences (I think the wooden texture looks better with enhanced interaction)?

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

I guess with *washed out* you are referring to the fences (I think the wooden texture looks better with enhanced interaction)?

The only offender in the shot is the metal fencing. Things like the wood panels on the staircase have their own dedicated specular image, in this case, textures/darkmod/wood/boards/polished_shiny_large_red_s is the specmap used.

some unlucky materials like the iron fencing do not have such images, and used a scaled version of the _white image produced by d3. these ones seem to have the problems with the enhanced interaction shader.

Link to comment
Share on other sites

Understood. Will investigate this weekend.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...