[Need help] Md3.cfg problem
#1
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 :)
Thanks given by:
#2
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).
Thanks given by:
#3
Anything between "mdlalphatest 0 - 100" = invisible
Anything between "mdlalphatest Cube 0-100" = black
Thanks given by:
#4
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?
Thanks given by:
#5
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
Thanks given by:
#6
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:
[Image: jt7ilpf9mnht.jpg]

Got it? :D
Thanks given by:
#7
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 :)
Thanks given by:
#8
Mhm well then, I'm sorry, but I can't help you. But maybe Cleaner got a Idea?
Thanks given by:
#9
Nope... he already asked me on akimbo's irc.
I suppose we'll have to wait till Toca pops in.
Thanks given by:
#10
Hm, right, he made the trees.
Thanks given by:
#11
* MykeGregory pretends to know what everyone talking about.
Thanks given by:
#12
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...

[Image: tagstest.png]

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 :(
Thanks given by:
#13
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.
Thanks given by:
#14
One thing (probably fairly hard) that you could look into is dithering. Photoshop probably has a filter to implement one of these algorithms.
Thanks given by:
#15
(03 Feb 13, 06:20PM)Mr.Floppy Wrote: otherwise we'd have glass models already.

Done but not entirely happy with rendering

[Image: image4kc.jpg]

[Image: 20130201173749modelstdm.png]

@ RR i'll check into that ;)
Thanks given by:
#16
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.
Thanks given by:
#17
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.
Thanks given by:
#18
in md3.cfg, can the weapons reposition the models?like i put in middle.
Thanks given by:
#19
(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
Thanks given by: