Forccefield Riv.
#1609 posted by madfox on 2019/07/27 04:04:05
I would like some advice for this model.
I am tweaking with the framespeed of the forcefield static.
I added a {self.nextthink = time + 0.01;}; option to the frames,
as I thought the framerate is too slow.
Now I'm not sure if it works allright, as I've seen it switching from end to start.
Also I'm searching for an option to toggle the static.
Now it is coded as killtartget, but I would like the toggle option more.
screeny
forcefield
#1609
#1610 posted by mankrip on 2019/07/27 19:01:12
Why using tons of triangles instead of alphamasked textures?
An alphamasked MDL can do the trick of morph-target animating tons of pseudo-particles using only a few triangles. You can even combine it with skin animation.
Yes
#1611 posted by madfox on 2019/07/28 04:11:33
I'm using it for an old mod and I'm not costumed to alpha channels.
Once made a lightning static with an alpha and a sprite.
I thought combining it with an alpha mask could enhanced it, but was not sure how to do it.
I saw the Pine trees from Redfield, but was tricked with the alpha thingy.
#1612 posted by mankrip on 2019/07/28 05:31:52
not sure how to do it.
Just paint the transparent areas of the skin with the color index 255.
Some engines also requires a special pointless flag to be set in the model.
Mankrip
Backwards compatibility isn't pointless.
< ~ // ...
#1614 posted by madfox on 2019/07/28 10:58:09
Using a func_illusion, added the texture after skip brush results in this.
Working with alpha's make use of *.tif and *.psd. And that are not the usual import values for qmle. Bmp won't work so I don't know what it is.
.pcx
#1616 posted by madfox on 2019/07/28 12:13:44
pcx
No use, I don't know how redfield made it but I see no way to import an alpha channel in Qmle or Q2Editor, or Noesis.
Yeah
#1617 posted by Kinn on 2019/07/28 12:19:52
mankrip - the assumption is that some existing mdls will be using index 255 as opaque colour, before this whole mdl alpha thing was ever conceived.
Madfox
#1618 posted by Kinn on 2019/07/28 12:24:06
Please tell us what engine you are using. You know that mdl alpha only works in a few of them, ya?
#1619 posted by madfox on 2019/07/28 15:04:55
Quakespasm_AD. Pinetrees of Red field run fine.
#1617, #1613
#1620 posted by mankrip on 2019/07/28 15:31:26
I've never found any MDL that uses color 255 as opaque.
This "backwards compatibility" thing was inspired by problems such as GLQuake-targeted maps using fullbright color indexes in textures by mistake.
However, in the vanilla Quake palette, there's no risk of color 255 being automatically selected by any program because its RGB values are exactly identical to those of another color that's located earlier in the palette. Color 255 is a duplicate color, and any color selection algorithm will pick up the first occurrence of that color. Color 255 is ignored.
The only ways to select color 255 by mistake is by using a modified palette for conversion (which is dumb), or by manually selecting it instead of its earlier occurrence in the palette (which is also dumb).
You're assuming that everybody's pipeline is identical, and that you've seen every single MDL that was ever created.
#1622 posted by mankrip on 2019/07/28 16:27:45
That's pipeline-independent.
The only reason to use a modified palette with a non-duplicated color 255 is to make it easier to create textures with transparent texels. Using a modified color 255 for opaque textures is dumb.
Using the default unmodified Quake palette will never result in undesired transparent texels. It's not about the pipeline, it's about math.
Alphamask Color != Alpha Channel
This is one of the pine trees skin: https://cdn.discordapp.com/attachments/180367751813005314/605044265093038100/skin.BMP
I could be wrong on this but, you are not assigning an alpha channel in any model editor. As stated above you just USE the garish pink color(255) in your skin?
The engine will know what to do.
Using the default unmodified Quake palette will never result in undesired transparent texels.
This is, again, assuming that every image editor will use the exact same algorithms in the exact same way.
The amount of times I've been burned this way is countless.
Alpha
#1625 posted by Redfield on 2019/07/28 17:10:50
The method I used to set index 255 as transparent is to set flag 'MF_HOLEY' or bit 0x4000, or flag 16384 in normal speak.
Without this bit, Quakespasm will not mask index 255. So far, QS 0.93 is the only 'out of the box' engine I have been able to see support for this. Older DP builds and FTE don't mask 255 on these models, where QS does. MarkV fails to properly mask 255 when other full-brights are present, where QS does not have this issue.
In order to set this flag I use Preach's home brew qmdl Python plugin. Import qmdl Helper and set the mdl flag as outlined in Preach's guide. You could set this flag in QMe under model Properties-> flags, however saving any model in QMe will break smooth shading across seams. So if you shade normals smooth in Blender, QMe will break them, qmdl will not and is the best approach to set this flag.
Sorry Mankrip
#1626 posted by Kinn on 2019/07/28 17:28:33
But that sort of argument really doesn't wash. It's all jolly beans until you find that one obscure mod with all the bollocked skins. Back in the day it would be pretty common to be painting in indexed colour right from the start, instead of converting from a true-colour image, and we have to assume that others in the past may have picked index 255 just because they can. I know we're just jacking around with Quake as a hobby and this isn't a serious production environment, but a little bit of effort to catch these very possible compat issues is the right approach.
Mankrip
#1627 posted by Preach on 2019/07/28 19:53:40
Here's a positive case for using individual particles instead of alpha when it comes to force fields
https://tomeofpreach.wordpress.com/2012/11/18/forcefield-smoke/
It's easier to see in an engine with interpolation than in the animated gif, but each particle has an animation as it fizzles out on the boundary of the field, stretching vertically as it collapses horizontally. I don't think you could achieve the same effect with any fewer polygons if you used alpha masks.
Fogroll
#1628 posted by madfox on 2019/07/29 10:42:54
I tried to update python32 with the modelHelper, but there is something wrong. I think it must be the version.
I use Python3.2 and when I want to use the HModelHelper I need a pip file. Then it wants a get-pip.py. Finally Pyhton gives an unexcisting handling.
So my modelling stays aligned with the brush vertices. I tried a to make a lowerground fog by using a slow screwed pattern. I wonder how it would look with an alpha.
example
fogroll.mdl
#1629 posted by mankrip on 2019/07/31 04:45:43
It's all jolly beans until you find that one obscure mod with all the bollocked skins.
Dumb assets shouldn't dictate engine behavior. That's my point.
Supporting all the quirks in vanilla Quake requires lots of hacks already. The less hacks to support in the engine, the better.
Hack-based assets are only good for games with closed source code, where there's no other way around engine constraints.
There's no need to clutter open source engines with compatibility with outdated user-made hacks. Keeping it in is a green sign for users to keep doing ugly hacks instead of doing things in a sane way.
Dumb assets shouldn't dictate engine behavior
They should, actually, making the assets display and function is the only job the engine has.
There's no need to clutter open source engines with compatibility with outdated user-made hacks.
Alpha transparency on models and textures is an user-made hack. BSP2 is an user-made hack. Skyboxes are an user-made hack. I could go on...
OTP
#1631 posted by mankrip on 2019/07/31 12:35:58
1) Then go ask id software for a refund because of all the user-made crap that doesn't work in the official versions of the engine.
The work of a Quake engine is to play Quake. Support for extra features isn't mandatory.
2) Quit derailing. You know I'm talking about poorly thought-out crap. But since you talked about alpha, here's an example.
self.flags |= EF_ADDITIVE; is a dumb way to implement additive blending, because blending modes should be mutually exclusive.
An independent self.alphamode field would allow for enumerated selection of blending modes and to toggle blending, eliminating the atrocious problem of self.alpha=0; being opaque:
self.alphamode = 0; // 0=disabled, 1=weighted, 2=additive, etc
self.alpha = 0.8; // intensity if enabled
And I'm not even touching on the "alpha should use 8-bit integer values" subject.
Python
#1632 posted by madfox on 2019/07/31 23:19:26
I am new to Python. I had an install on Win7 of Python 35-32, and made sure qmdl-v0.6 is in the site-packages.
Now I haven't the slightest idea what to do.
When I try the examples like : knight = Helper(),
knight is not recognized.
What string is used to get grip on the mdl?
Madfox
#1633 posted by Redfield on 2019/08/01 04:03:58
Assuming you have your Python up to date it really isn't too hard.
start with:
from qmdl.helper import Helper
model = Helper()
Now the path to your model is:
model.load("C:/MyFolder/mymodel.mdl")
(Change C drive as necessary obviously)
Now you are ready to edit the model as described in the tutorials.
Remember, you can still edit with QMe, if you go to model Properties -> Flags in the View menu, you can set the bit for alpha masking. The only reason I suggest against this method is QMe is horribly antiquated and will ruin any vertex normal shading you applied in external modelling software.
|