Forum posts

Can admin rename this thread to a more suitable name, so someone with the same problem can find this thread and script more easily?
And it should run on almost any OS. ;)
I have Python 3.5 and 3.7 custom build for Windows XP that works (3.4.4 is the last official version that supports XP). :P
User posted image
So, here's a Python 3 script...
Python versions 3.5 and below gave me a syntax error with the script, but versions 3.6 and up worked for me.
I assume they changed a syntaxis between these versions, so there is a minimal Python version requirement for your script, it's not like any 3 version will work.
So... it worked for me, everything is done ... Not! :)
Although the model looks OK in the model viewer, I think, there is a slight bug/miscalculation in your code, which misplace one of the UV coordinates :
the one coordinate grow from -maxtexturesize to 0, instead of, 0 to +maxtexturesizethe one coordinate grow from -maxtexturesize to 0, instead of, 0 to +maxtexturesize
Interesting to see about that.
Anyway, thanks!
Barney: Now ... about that beer I owed ya!
Check your PMs!
That probably means I guessed the wrong texture size.
Or there's something else going on.
I strongly and sadly suspect this.
Perhaps you could share this model so I can do some proper testing?
Here is the model and the latest Paranoia 2 MV, so you can see for yourself what the opposite conversion do to the texture coordinates:
Thank you for your time (like... for 1000000th time helping me)!
Thank you for your answer!
However, there are two problems:
1) I need a PRACTICAL way to automatically convert ONLY all UV coordinates inside the .smd file, which have its own syntax and other data/digits as well.
I'm NOT even a beginner programmer!
I used M$ Excel to open the .smd and apply primitive functions to only the coordinates data.
To practically use the code you proposed, I need it converted as M$ Excel worksheet formula.
Or converted as Free Pascal code, so I can write my own program that read the .smd file and convert only the UV coordinates.
I can't "program" on anything else, anything new or anything the masses use nowadays :(
(The Python mark the ? symbol in isPositive ? 1 as an error and don't even compile, BTW.)
Xash3D uses a new "half-float" UV texture coordinates inside the smd/mdl, while goldsource uses the old "fixed-point" UV texture coordinates.
Disclaimer: This is the only info I found, it's not my statement!
I'm not sure if it's true, or if there is more functions involved than just simple conversion from "half-float" to "fixed-point" (which I strongly suspect).
For example, how to interpret 32.03125 ? It's not in the 0.0-1.0 range.
In the latest Paranoia 2 MV, in the EDITOR tab, there is a button, that is supose to convert an old .mdl file with fixed-point UV texture coordinates to the new half-float .mdl (the opposite of what I want).
I observed what happened to the coordinates in the TEXTURE tab after such conversion, but couldn't figure-it-out/reverse-engineer-it.
Some enlargement/multiplying and 90-degree-rotation/U<->V-exchange and crazy shit like that may be involved :(
Due to 1) I can't test what you proposed for now.
I was hoped, that someone, who knows the exact process of conversion would post the true solution, someone who codes model viewers, like Solokiller for example.
Not a solutions based on my ASSUMPTION!
So, I'm stuck for now :(
So, Xash3D uses a new "half-float" UV texture coordinates inside the smd/mdl, while goldsource uses the old "fixed-point" UV texture coordinates.
What I see inside Paranoia 2 MV and inside Xash3DWhat I see inside Paranoia 2 MV and inside Xash3D
What I see inside Jed's HLMV and inside goldsource with the same modelWhat I see inside Jed's HLMV and inside goldsource with the same model
None of the 6 DIFFERENT mdl decompilers I tried produce proper GOLDSOURCE UV coordinates inside the decompiled smd, that should be in the 0.0 - 1.0 range.
What I see inside the smd:
6 -1.233950 7.157183 18.669037 -0.145192 0.989398 -0.003142 28.638672 40.001953
5 1.172300 7.157199 18.669054 0.145192 0.989398 -0.003154 28.638672 40.416016
8 1.175211 7.219243 16.660397 0.143158 0.989051 0.035837 28.541016 40.416016
I am too lazy to UV remap the model from the ground up all by myself, so I decided to try to mathematically convert the numbers.
I tried some simple math functions/arithmetics on this coordinates, but with no luck (it's look like it's not something VERY simple).
So, my question is:
Did someone knows what complicated math function to apply to the coordinates to convert them from "half-float" to "fixed-point".
Please no noob answers, propose something only if you know exactly what I am talking about and how to solve the problem.
Thanks in advance!
Posted 4 months ago2021-07-31 10:46:44 UTC
in Half-Life Asset Manager Post #345826
[... you want to place the camera on a specific axis facing the model ...]
Initialy, my idea was adding an options/choises for placing the camera on the +X -X +Y -Y +Z -Z axises, and the camera to point perfectly perpendicular at the zeroes/crossing of the other two axises, that make a perpendicular plane to the camera axis. The distance betwen the camera and the other two axises can be automated, so the whole model is viewable, no model parts going out of the 3D view planel, or even better, it can be added an option to select that distance by number, or the user sliding along the axis (which means practicaly: zoom in and out), so a user can keep it constant when rotating around the model, which is more convinient if you ask me.

But then I realized, that it will be way way better if there is an option for switching between the proposed above and this:
Imagine the model have a perfect geometry center (center of mass). Imagine all 3 axises cross at this center instead of 0. Now if place the camera on any of this new "center of mass axises", the user will see the model better, because the "axises that cross at 0" are usually way way under the model compared to "center of mass axises". Everything else stays the same as above.

[... and then be able to switch between any camera mode (aside from first person view) while still having the original camera origin and angles ...]
No. I only suggest, that after placing the camera on an axis as described above, the user can move/rotate/zoom/roam it freely like usually/before from that axes position (go away from that axis). I just mean, that the view/camera shouldn't stay locked on the axis until explicitly other predetermined camera position is selected.

This is just a basic predetermined top, front, right side, etc. scene view in most programs. Goldsource model viewers just only have: start from only one option - center view (front view) and then you "free roam" around the model.

Aside from that, is Windows XP 32 SP3 build for HLAM even possible?

Sorry for suggesting a thousand things :)
Posted 4 months ago2021-07-30 10:47:13 UTC
in Half-Life Asset Manager Post #345814
May I suggest two features:
  • Adding an option for switching between an orthographic projection and a perspective projection for the 3D view.
  • A predetermined perfect top, front, right side, etc. model projection views, that can freely morph into a free rotating/zooming/roaming afterwards.
I was in a big need for such features, while I was modeling for goldsource and none of the goldsource model viewers had them.
Other programs that can read .mdl files had them, but they lacked other much needed basic goldsource model viewer features at the same time.
Excuse me, if this is not the right place to post requests.
Thanks in advance!
Posted 9 years ago2012-02-17 12:45:36 UTC
in Help me with this "tank-carrier&quo Post #300673