Few questions on mapping -1 reply

Please wait...

Mr. Wonko

Addicted to GF

50 XP

24th September 2006

0 Uploads

277 Posts

0 Threads

#11 8 years ago

Try replacing the first blendfunc with GL_ONE GL_ZERO.

There being no light is because you didn't add a lightmap stage - you should also get a "shader has a lightmap but no lightmap stage" warning in the console.

Could you please put huge images in spoiler tags? They destroy the page layout since they're wider than my screen, I need to scroll horizontally to read all the text.




Pande

Sexeh like teh gizmo

50 XP

9th April 2008

0 Uploads

610 Posts

0 Threads

#12 8 years ago

I don't recognize your blendfunc, try blendfunc blend and see how that works. The reddish line around the puddle is what is giving it away as a definite blendfunc problem. And yeah, you need a lightmap stage. Lastly, there is no need for a blendfunc on the first stage, it won't do anything.

textures/dclair/puddle_asphalt { qer_editorimage textures/dclair/puddle1.tga surfaceparm playerclip { map textures/dclair/puddle_reflect1 tcGen environment } { map textures/dclair/puddle1 blendFunc blend depthWrite } { map $lightmap blendfunc filter } }

I would also suggest you blend a little bit of the ashpalt texture back into the image, because a puddle is never 100% reflective. It will depend on how much light there is of course. You may want to make two versions of the texture for any puddles you place in a shadow, because they should have about 20% opacity wheras the light ones (the one you are working on now) should have at least 85%.




Devoted

All i wish is gone away..

50 XP

9th September 2009

0 Uploads

163 Posts

0 Threads

#13 8 years ago

This worked just fine for me :D I also have one idea: What if I put the mirror (portal) part in between stages? Will I get the mirror mixed with fake water? My current shader:

textures/dclair/puddle_asphalt { qer_editorimage textures/dclair/puddle1.tga surfaceparm playerclip { map textures/dclair/puddle_reflect1 blendFunc GL_ONE GL_ZERO tcGen environment } { map textures/dclair/puddle1 blendFunc GL_DST_ALPHA GL_SRC_ALPHA depthWrite } { map $lightmap blendFunc GL_ZERO GL_SRC_COLOR } }




Mr. Wonko

Addicted to GF

50 XP

24th September 2006

0 Uploads

277 Posts

0 Threads

#14 8 years ago
Devoted;5648940What if I put the mirror (portal) part in between stages? Will I get the mirror mixed with fake water?

I think a portal stage must always be the first stage, for technical reasons. But since the reflection stage is your first stage: yes, that should work. It will be lit by the lightmap, but so is your current reflection. Just keep in mind that you can only have one portal in the player's view at a time, and that it needs much more performance than a simple reflection image (which can look fairly good, too).




Devoted

All i wish is gone away..

50 XP

9th September 2009

0 Uploads

163 Posts

0 Threads

#15 8 years ago

So, where do i have to place "portal" word? Like that?

textures/dclair/puddle_asphalt { qer_editorimage textures/dclair/puddle1.tga surfaceparm playerclip portal { map textures/dclair/puddle_reflect1 blendFunc GL_ONE GL_ZERO tcGen environment } { map textures/dclair/puddle1 blendFunc GL_DST_ALPHA GL_SRC_ALPHA depthWrite } { map $lightmap blendFunc GL_ZERO GL_SRC_COLOR } }




Devoted

All i wish is gone away..

50 XP

9th September 2009

0 Uploads

163 Posts

0 Threads

#16 8 years ago

Is anybody alive? :D




Devoted

All i wish is gone away..

50 XP

9th September 2009

0 Uploads

163 Posts

0 Threads

#17 8 years ago

Hi there!




Mr. Wonko

Addicted to GF

50 XP

24th September 2006

0 Uploads

277 Posts

0 Threads

#18 8 years ago

Why don't you try to figure it out yourself? Look at existing ones, read some tutorials/manuals (like the Q3Map2 Shader Manual)? I'd have to do the same thing, except I vaguely remember alphagen portal being related to it...




Devoted

All i wish is gone away..

50 XP

9th September 2009

0 Uploads

163 Posts

0 Threads

#19 8 years ago

I tried many blends, but my puddle doesn't reflect anything...




Mr. Wonko

Addicted to GF

50 XP

24th September 2006

0 Uploads

277 Posts

0 Threads

#20 8 years ago
Devoted;5649461I tried many blends, but my puddle doesn't reflect anything...

You are aware that mirrors need a misc_portal_surface?