Posts: 455
Threads: 33
Joined: Jun 2010
Hello fellow cubers,
I have encountered a problem while setting up the md3.cfg for a weapon mod.
I used a alpha channel and copied the commands out of Toca's window mapmodel. It didnt work, the whole object was invisible.
After that I changed the "mdlalphatest 80" to "mdlalphatest Cube 1" as suggested at a sauerbraten website.
But the whole model changed to black. The texture as well as the transparent part.
Do you know how I can fix that?
Thanks in advance :)
Posts: 3,780
Threads: 33
Joined: Jun 2010
07 Aug 11, 03:32PM
(This post was last modified: 07 Aug 11, 03:32PM by V-Man.)
I think it's only supposed to have one argument.
Try something like "mdlalphatest 25" to see if it's somewhere between your 80 and the "Cube" (which would look like "0" to the engine).
Posts: 455
Threads: 33
Joined: Jun 2010
Anything between "mdlalphatest 0 - 100" = invisible
Anything between "mdlalphatest Cube 0-100" = black
Posts: 316
Threads: 19
Joined: Jan 2011
The problem is the crappy alpha-support of the engine.
When you use alphatest, it isn't invisible, your view angle is just wrong ;)
I fixed this problem many times, so why don't you send me the model, and I'll try it?
Posts: 455
Threads: 33
Joined: Jun 2010
Dementium4ever I guess you mean the cullface 0 thing right?
It's not just the plate with the alpha on it which is invisible, its the whole model, even the 3d parts where you should at least see the inside
Posts: 316
Threads: 19
Joined: Jan 2011
Hm, that's strange...
But I've atleast one hint. Maybe you shiftet the polygone sides, from the innerside to the outerside. This could cause serious problems in the engine. I guess you didn't understood this (cuz of my crappy explenation), so here's a pic from your shotgun:
Got it? :D
Posts: 455
Threads: 33
Joined: Jun 2010
I know what you mean, it's just that if it would have flipped faces I would see the outher side of the model but inside instead of outside :)
Posts: 316
Threads: 19
Joined: Jan 2011
Mhm well then, I'm sorry, but I can't help you. But maybe Cleaner got a Idea?
Posts: 1,318
Threads: 76
Joined: Apr 2011
08 Aug 11, 06:48AM
(This post was last modified: 08 Aug 11, 06:49AM by Cleaner.)
Nope... he already asked me on akimbo's irc.
I suppose we'll have to wait till Toca pops in.
Posts: 316
Threads: 19
Joined: Jan 2011
Hm, right, he made the trees.
Posts: 1,718
Threads: 169
Joined: Jun 2010
* MykeGregory pretends to know what everyone talking about.
Posts: 1,318
Threads: 76
Joined: Apr 2011
02 Feb 13, 11:29PM
(This post was last modified: 02 Feb 13, 11:31PM by Cleaner.)
Resurrected topic for good reason.
Here comes what I'm struggling with...
I am sorting a few decals mapmodels to add as "décor", simple stuff like a single plane with only 2 triangles but I'm struggling with transparencies.
A picture speaks louder than words so here you go...
1 is the png image file (all but black parts is transparent)
2 is what I was expecting as render (as it looks like in my 3D window)
3 is what actually comes up ingame
I have tried all sorts (dozens) of settings in Milkshake and within the model's cfg like mdlalphatest aso aso (even tried Sauer commands but they are incompatible with our engine) but I can't get a true pixels rendering... Any idea?
EDIT: Event the tags, unless dark grey they come up too flashy :(
Posts: 638
Threads: 10
Joined: Jun 2010
Maybe there's some update on SVN I don't know about, but...
as far as I'm aware the alpha channel does only tell the engine which part of the picture has to be rendered and which not. This sort of "gradient" fashioned transparency you're looking for simply isn't possible, otherwise we'd have glass models already.
Therefore any pixel which caries colour information will be rendered with 0% transparency.
Posts: 3,462
Threads: 72
Joined: Jun 2010
One thing (probably fairly hard) that you could look into is dithering. Photoshop probably has a filter to implement one of these algorithms.
Posts: 1,318
Threads: 76
Joined: Apr 2011
(03 Feb 13, 06:20PM)Mr.Floppy Wrote: otherwise we'd have glass models already.
Done but not entirely happy with rendering
@ RR i'll check into that ;)
Posts: 638
Threads: 10
Joined: Jun 2010
04 Feb 13, 12:41PM
(This post was last modified: 07 Feb 13, 12:06PM by Mr.Floppy.)
Well, not sure whether we're talking about the same thing.
Transparency, like displayed on the 1-2-3 picture isn't possible this way. Using a dithering filter could help making the picture look smoother all together, but won't change anything about the transparency issue. On any engine I've been messing around with, this kind of thing is best accomplished with texture-blending on the actual geomety, which AC does not support. Another solution would be changing the model's (which basically is just a plane) transparency parameter. I remember Toca tried this kind of stuff and it caused weird issues and therefore got dropped and therefore we've got no 'real' glass. ;) Another problem that can occur is that flat planes will not be rendered when applied close to geometry, which actually happens with sign models a lot. Maybe that's LOD related, maybe it's a z-fighting issue, maybe it's just a bug...
About the glass workaround shown above: That's quite a clever idea! You will get better results by using a higher resolution on the glass part, in other words you'll have to use non-uniformly (edited: un-uniformly) more space on the UV-map for this particular part of the model, like it's done with the sign-part on the dumpster model. Maybe you even use a seperated material for that one.
Posts: 2,387
Threads: 56
Joined: Aug 2010
07 Feb 13, 10:38AM
(This post was last modified: 07 Feb 13, 05:58PM by ExodusS.)
I had the idea of an ice effect for the ground (for the snow mapping contest) and I spoke with Cleaner but he didn't find a way to make it realistic, it's kinda the same issue here.
Posts: 122
Threads: 31
Joined: Jul 2011
in md3.cfg, can the weapons reposition the models?like i put in middle.
Posts: 1,318
Threads: 76
Joined: Apr 2011
(10 Feb 13, 01:52AM)ONYX Wrote: in md3.cfg, can the weapons reposition the models?like i put in middle. Nope, this has to be done with a 3d program
|