_decal projection, something I discovered.

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
dONKEY
Posts: 566
Joined: Mon Oct 15, 2001 7:00 am

_decal projection, something I discovered.

Post by dONKEY »

Many of you may already know this, but I stumbled upon a problem and solution today that I thought might be useful for someone else at some point.
Back in the last Maverick competition I was using chunks of geometry and models side by side. To avoid having some sections marked by gunfire and some not, I added surfaceparm nomarks to all my shaders. Later I wanted to project some decals onto the uneven geometry and discovered that with surfaceparm nomarks _decal projection does not work.
After feeling slightly screwed over by the results of that competition I promptly forgot about my little discovery....until today.
Today I felt inspired to start a little map for Entity Plus. I saw in my head the player starting in an Indiana Jones-esque rain forest ruin. I have been working on some new rock and organic textures and I wanted to test those too.
After making the little forest/ruin starting area I dressed it up with some fern and palm tree models. To complete the picture I added some top-down _decal projections, projecting from above the foliage, to help hide obvious seams or texture repartitions.
That's where I hit my problem. The aplha masked textures of my foliage received the _decal projection. I could have moved things about to avoid the problem, but remembered what I learned in the Maverick map.
That's about it really, rambling post just to say, if you haven't thought of it before surfaceparm nomarks is a good tool for controlling what your projected decals gets drawn on.
deqer
Posts: 298
Joined: Mon Dec 28, 2009 6:30 pm

Re: _decal projection, something I discovered.

Post by deqer »

tl;dr anyone?
User avatar
Eraser
Posts: 19177
Joined: Fri Dec 01, 2000 8:00 am

Re: _decal projection, something I discovered.

Post by Eraser »

deqer wrote:tl;dr anyone?
That wasn't too long, I did read it and I learned something from it. I suggest you do the same and if you don't, just don't be a prick and make nonsensical comments like this. It's not General Discussion here.
cityy
Posts: 1020
Joined: Mon Aug 10, 2009 8:23 am

Re: _decal projection, something I discovered.

Post by cityy »

Eraser wrote:
deqer wrote:tl;dr anyone?
That wasn't too long, I did read it and I learned something from it. I suggest you do the same and if you don't, just don't be a prick and make nonsensical comments like this. It's not General Discussion here.

Seconded.
www.ferdinandlist.de/leveldesign
dONKEY
Posts: 566
Joined: Mon Oct 15, 2001 7:00 am

Re: _decal projection, something I discovered.

Post by dONKEY »

Hey, thanks.
Almost was going to respond but bit my tongue.
Just to be clear the projection was actually being drawn on the alpha masked sections, not just the visible parts of the texture, which is why I thought this was worth mentioning.
themuffinman
Posts: 384
Joined: Fri Mar 05, 2010 5:29 pm

Re: _decal projection, something I discovered.

Post by themuffinman »

He might be the donkey, but deqer is the real ass around here.
sock
Posts: 424
Joined: Sat Sep 09, 2000 7:00 am

Re: _decal projection, something I discovered.

Post by sock »

I briefly experimented with decal projection and found the same problem, they project on to everything. I also discovered the nomarks surfaceparm issue (mainly because of terrain), but never thought to use it as an exclusion tool, very cool idea! :up:
You should post some pictures next time, it will make it a lot easier for everyone to understand. Also just ignore deqer, he seems to be having an internet meltdown, your post was certainly relevant to Q3 mapping. I will have to open up my experiment map and have a play again! :D
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
Post Reply