Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsDiscussion Forum → Updating JED
Updating JED
2005-08-17, 10:36 PM #1
So old topics disappear without a trace?

I remembered what the deal was with the way JED does texture coordinates.

Back at the time a significant number of people didn't have any 3D card and ran JK in software-only mode. And in software-only mode JK messes up the textures (they give some variation of Hall Of Mirrors(tm) effect) unless the texture coordinates are undistorted (linear across the entire surface. I.e. texture coordinates linearly depend on the position on the plane of the surface).

I guess now it wouldn't be an issue.
2005-08-17, 10:46 PM #2
as long as it can move and scale 3do;s and surfaces WITHOUT messing the texture allignment, that would be sweet

Yes yes, bend this
Code:
if(getThingFlags(source) & 0x8){
  do her}
elseif(getThingFlags(source) & 0x4){
  do other babe}
else{
  do a dude}
2005-08-17, 11:53 PM #3
Originally posted by Bender:
I guess now it wouldn't be an issue.


I'm going to have to say, no it wont be an issue
"Nulla tenaci invia est via"
2005-08-18, 5:50 AM #4
in JK the texture coordinates are based on the size of the texture, normally in OpenGL the coordinates are absolute values.
Detty. Professional Expert.
Flickr Twitter
2005-08-20, 12:17 AM #5
Quote:
in JK the texture coordinates are based on the size of the texture, normally in OpenGL the coordinates are absolute values.


That part is no big deal.

Anyway, here's what I came up with for texture stuff - I've added a surface flag "Preserve texture coordinates" (I'll probably change the name).

What it'll do is on surfaces that have this flag set JED will work with textures differently - pretty much keep U/V coordinates as they are through most editing operations (so for instance stretching the surface will stretch the texture). Texture sliding, rotation and stitching will also be done differently (preserving the distortion that's present in the textures). Also, you'll be able to change U/V coordinates for the specific vertex only (manually distort the texture).

The surfaces that don't have this flag set will be treated as before.
2005-08-20, 12:18 PM #6
the last thread is here

Still, I'll ask my question again...
Would it be hard to add a feature to add/change Jed's hotkeys? Like that menu option in Joke and Fun3do...
May the mass times acceleration be with you.
2005-08-20, 12:36 PM #7
Any chance you want to distribute incremental builds soon? Even if you're planning a big "JED 1.0" release or something I could use some of these features right now...
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2005-08-20, 1:44 PM #8
UV unwrapping for texturing models would be super cool


[http://img396.imageshack.us/img396/4729/hueywrap19tb.png]
both are textured in force remap
the left is manually "unwrapped", the right is normal force remap

notice crappier resolution of the texture and stretched pixels on the right compared to on the left.
visit my project

"I wonder to myself. Why? Simply why? Why why? Why do I ask why? Why do I need to find out why? Why do I have to ask why as a question? Why is why always used to find out why? Why is the answer to why always why? Why is there no final answer to why? Simply why not? Holy cow, this is pretty deep, meaningful **** I wrote. Glad I wrote it down. Oh man."
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ [slog], Echoman
2005-08-20, 5:03 PM #9
Quote:
Any chance you want to distribute incremental builds soon?


This will be an incremental build - 0.96. I'm just slow about it.

Quote:
Would it be hard to add a feature to add/change Jed's hotkeys? Like that menu option in Joke and Fun3do...


I've never seen Joke or Fun3DO. How do they do it?

The tricky part about JED is there are very many keys. What specific function do you need keys assigned to?

BTW, you can actually do that now using plug-ins. There's a function in JED OLE interface to invoke any menu and a plug-in can be assigen a hotkey. So for example:

a.js:
// This sample demonstrates how to use JED scripting

var Jed = WScript.CreateObject("JED.App");

Jed.ExecuteMenu("File\\Open...");


a.js.dsc
name=Shortcut to Open File...
key=Alt+F12

Quote:
UV unwrapping for texturing models would be super cool


Anybody technically minded could finally explain what U/V Unwrap is? What is "unwrapped"? What's "wrapped" to begin with?

What I'll be adding is just the ability to change U,V coordinates at will manually. This is comprehensive but that might not be exactly what you need.
2005-08-20, 5:49 PM #10
BTW, a number of other things people have asked for can be done right now with plug-ins in JScript of VBScript.

For instance: a script to add a thing at current mouse position, add a COG and bind the thing to this COG:

addelev.js.dsc:
name=Add simple elevator
key=Alt+F10

addelev.js:

// This sample demonstrates how to use JED scripting

var Jed = WScript.CreateObject("JED.App");

if (Jed.MapMode!=3) WScript.Quit (0); // if not in things mode exit

Jed.SendKey(0,45); // 0=no shift keys. 1 - Ctrl, 2 - shift, 4-alt. add for combos (i.e. 3- ctrl-shift) 45=insert key

var curthing = Jed.CurTH;

var level = Jed.Level;

var ncog=level.AddCOG ("simple_elev.cog");

var cog=level.GetCog(ncog);
cog.SetValue(0,curthing);
cog.Update();

Watch out though - plugin operations cannot be undone. If you are into making things right you can use the functions in plugins:

Procedure StartUndo(const name:string);
Procedure SaveUndoForThing(n:integer;change:integer);
Procedure SaveUndoForLight(n:integer;change:integer);
Procedure SaveUndoForSector(n:integer;change:integer;whatpart:integer);

To save undo data before you modify anything.

change =

0 if you're about to change it
1 if you've just added it
2 if you're about to delete it

whatpart =

1 if you're changing sector's data fields
2 if you're changing sector's geometry
3 if you are changing both

StartUndo starts a new undo record. Single undo record can contain any number of changes - they will all be undone in one step.
2005-08-20, 6:40 PM #11
Originally posted by Bender:
Anybody technically minded could finally explain what U/V Unwrap is? What is "unwrapped"? What's "wrapped" to begin with?
U/V unwrap modes project geometry into texture space so you can manually adjust the texture coordinates by altering the vertices of the projection.

This can be likened to unfolding a box and laying it out on a piece of wrapping paper.
2005-08-20, 8:05 PM #12
Quote:
U/V unwrap modes project geometry into texture space so you can manually adjust the texture coordinates by altering the vertices of the projection.


So, letting the user slide the texture left-right and back an forth of a single given vertex should be enough?
2005-08-20, 9:16 PM #13
Perhaps. The real power of U/V unwrapping comes into play for things like skinning, but I'd certainly hope the people who need that level of control would be using a tool designed for it (like 3D Studio MAX)
2005-08-20, 11:39 PM #14
Don't mean to nag or beg, but what about window docking? Or at least a more intelligent system for remembering window position and sizes. Save all window positions and dimensions at closing...restore at open. JED is really crazy about how you place windows. If I squish them close together so the window pains butt, they'll be in totally different positions when I restart it. But if I keep them some 5 pixels apart from each other, it's fine. Also, one of my windows (either the thing property window or the main JED window) likes to offset itself by some 5-10 pixels on the Y axis every time JK crashes, rather annoying.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2005-08-21, 2:17 AM #15
Yeah giving JED a memory where the window placement is would be cool.. not a huge problem though. My Map Settings window is always in the same position and size.
"Nulla tenaci invia est via"
2005-08-21, 10:12 AM #16
Originally posted by Bender:
I've never seen Joke or Fun3DO. How do they do it?

The tricky part about JED is there are very many keys. What specific function do you need keys assigned to?

BTW, you can actually do that now using plug-ins. There's a function in JED OLE interface to invoke any menu and a plug-in can be assigen a hotkey. So for example:

a.js:
// This sample demonstrates how to use JED scripting

var Jed = WScript.CreateObject("JED.App");

Jed.ExecuteMenu("File\\Open...");


a.js.dsc
name=Shortcut to Open File...
key=Alt+F12

Oh, in that case, nevermind... that solves about everything :) (I was not aware of the ExecuteMenu() command...)

Still, if you're looking for something to do ;) here's a screenie of the hotkey managing menu in Joke.
....Though I just thought, it would probably be easier to just load the hotkeys from a text file in the Jed directory (like the plugin .dsc files, except in a format like: "Save As..."=Ctrl+Alt+S)
May the mass times acceleration be with you.
2005-08-21, 6:26 PM #17
Quote:
Don't mean to nag or beg, but what about window docking?


Already done. Not very elaborate, but working - every window sticks to the main window at specific place, and moves with the main window. Moving docked windows will not move the main window, though.

Quote:
Save all window positions and dimensions at closing...restore at open.


Actually, it's in there already. But from what you say it seems to be malfunctioning in an odd way. Must be Delphi's internal workings that's screwing it up.

Quote:
I was not aware of the ExecuteMenu() command...)


There are lots of other cool goodies in OLE interface :). It's described in HTM file which I think is attached with JED.

Quote:
here's a screenie of the hotkey managing menu in Joke.


Cool. But that's have to be in place from the beginning. Now it'd be a major rework - I have a huge Case statetment (analog of switch statement in C) to handle keyboard input. And Case statement allows only constant values.

↑ Up to the top!