www.tombraiderforums.com

Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Software Development

Reply
 
Thread Tools
Old 08-02-12, 06:22   #41
sapper
Archaeologist
 
sapper's Avatar
 
Join Date: Sep 2007
Posts: 1,591
Default

Quote:
Originally Posted by Diablight View Post
Nice work, thanks for the support. Would it be possible to implement this feature into strpix? This would help a lot to check immediately if the new created texture fits on the face in combination with the other textures on the mesh. Thx
Well I'm looking at the PixStr code and have got as far as being able to define a rectangle on the texture image by holding shift and dragging with the mouse.

I haven't implemented any of the actual cutting procedures yet but wish to have some feedback about the technique for defining the area to be cut.

One way is to just cut the texture according to the drawn rectangle as Champ and PixStr do it. But it seems to me that it will be tricky to position the first mouse point exactly at the top left pixel of a certain texture for instance before you start the drag.

In TextureAdd you can finetune the texture you just cut by editing the texture position data for it but I'm not going to implement that in StrPix.

So another thought I had was to let the user define the rectangle of any size but when the texture is cut, the created texture will be the intersection of the selected texture (white border) and the rectangle just defined (yellow border).


Also, currently the drawn rectangle stays onscreen when the texture page is changed. Would users prefer that the drawn texture only appears on the page it was first drawn on?

For telling the program to cut the texture I will have a menu item like PixStr but also a quicker method of holding shift and right clicking inside the drawn rectangle. Would users prefer just being able to right click without holding shift?

I haven't looked at the code for actually cutting and adding the texture info so don't know if I will be able to succeed at adding this feature so don't get your hopes up just yet!

Last edited by sapper; 10-02-12 at 05:54.
sapper is offline   Reply With Quote
Old 08-02-12, 07:05   #42
Diablight
Hobbyist
 
Join Date: Jan 2012
Posts: 11
Thumbs up

Quote:
Originally Posted by sapper View Post
One way is to just cut the texture according to the drawn rectangle as Champ and PixStr do it. But it seems to me that it will be tricky to position the first mouse point exactly at the top left pixel of a certain texture for instance before you start the drag.
It would work if we could zoom the texturepage.

Quote:
Originally Posted by sapper View Post
So another thought I had was to let the user define the rectangle of any size but when the texture is cut, the created texture will be the intersection of the selected texture (white border) and the rectangle just defined (yellow border).
that should be possible with all methods


Quote:
Originally Posted by sapper View Post
Also, currently the drawn rectangle stays onscreen when the texture page is changed. Would users prefer that the drawn texture only appears on the page it was first drawn on?
When its not too hard to program I would prefer that the drawn texture only appears on the page it was first drawn on

Quote:
Originally Posted by sapper View Post
For telling the program to cut the texture I will have a menu item like PixStr but also a quicker method of holding shift and right clicking inside the drawn rectangle. Would users prefer just being able to right click without holding shift?
Without shift would be nice.

For the new created textures we should be able to turn and mirror them or to define the triangles like with "normal" textures.

thanks
Diablight is offline   Reply With Quote
Old 09-02-12, 04:45   #43
sapper
Archaeologist
 
sapper's Avatar
 
Join Date: Sep 2007
Posts: 1,591
Default

I didn't want to zoom the texturepage - means more work and I would need more knowledge but maybe I would open the selected texture in another window at larger scale.

Making the drawn rectangle visible only on the page its first drawn on should be straightforward to program.

I have programmed the routines to create/cut the new texture since it was easier than I thought to adapt the PixStr code. So at the moment the cutting technique is the same as PixStr (without the hatching for power of 2 textures). I have opened a modified wad with TextureAdd OK but I don't have access to TRLE/NGLE at the moment so I can't test fully to see whether I have accidentally made something else corrupt in the wad or forgotten to adjust some values that should be adjusted.

Once you place the texture on a mesh you can rotate, mirror etc as normal since this info is stored in the polygon info and not the texture info.

I haven't implemented the intersection of the two rectangles yet, that will take some thought.

I have a minor bug with the right clicking of the drawn shape not working when the shape is drawn towards the left or upwards or both from the starting point but don't imagine it will be hard to workaround.

Once you have cut the texture in TextureAdd the new texture becomes the selected texture and I also do this but in TextureAdd the drawn shape then disappears.

Would users want the drawn shape to disappear or stay visible for reference?

At the moment the only way to make the drawn shape disappear is to left click on the texture page image.

I have also made it not possible to create a texture less than 4 X 4 pixels, does this seem a sensible lower limit?

Last edited by sapper; 09-02-12 at 04:47.
sapper is offline   Reply With Quote
Old 09-02-12, 06:02   #44
Diablight
Hobbyist
 
Join Date: Jan 2012
Posts: 11
Default

Could you make the drawn rectangle stay visible for reference? So its easier to draw a new rectangle with reference to the rectangle before.
I think the limit 4x4 is ok. Every texture below this limit is too small anyway.
Diablight is offline   Reply With Quote
Old 09-02-12, 07:37   #45
Laras Boyfr.
Professor
 
Laras Boyfr.'s Avatar
 
Join Date: Jul 2009
Location: Albania
Posts: 4,741
Default

^What Tomo said.
But I think the limit can be also 8x8, as such tiny textures are hard to select anyway.

Anyway I had a little request which might come handy also for other builders:
Could you make a texture resize feature for texture pieces?
That means if I have a 128x128 texture tile within strpix, I can resize it to f.e. 64x64 and the texture id stays the same.
Of course I could convert it with some other tool but then the texture ids are not the same anymore and I would need to retexture it.
The other possibility would be to assign (or swap) to a texture the texture id of another texture.
The reason for this is to make certain textures in the wad smaller so the wad doesnt reach its limit so fast and the game doesnt lag that much.
My current level (made with the BtB2011 wad) even crashes at some spots.
I guess this is possible with textureadd but it would be much quicker and more flexible within strpix.
Laras Boyfr. is offline   Reply With Quote
Old 10-02-12, 04:36   #46
sapper
Archaeologist
 
sapper's Avatar
 
Join Date: Sep 2007
Posts: 1,591
Default

Quote:
Originally Posted by Diablight View Post
Could you make the drawn rectangle stay visible for reference? So its easier to draw a new rectangle with reference to the rectangle before.
At the moment the cutting rectangle does stay visible and in my testing of the cutting I agree with you that it is good to keep it as a reference even though once you cut the texture the texture piece is selected and surrounded with the selection highlight. The cutting rectangle is a dotted line though so if it is a contrasting colour it stands out nicely. I have also made it so you cannot cut a texture piece which is a duplicate of any existing texture piece.

Note the cutting is still done at normal scale, no zoom yet.

I'm not going implement deleting texture info since this would mean reordering the list of textures and then going through every polygon of every mesh to update the texture ID.

@Laras Boyfr. I don't know enough about image processing and images in Delphi and also Turbo didn't use an image library but wrote the code from scratch to handle raw data so to code that feature may be beyond my abilities. The swapping of texture IDs may be straightforward to code so I will look at a way to do that.
sapper is offline   Reply With Quote
Old 10-02-12, 04:39   #47
Shauni
Relic Hunter
 
Shauni's Avatar
 
Join Date: Feb 2005
Location: Emotion
Posts: 5,279
Default

Good to hear you're working on new features! Very exciting
Do you think you might be able to apply an Undo button?
__________________
(. .' ~Trinity~..)
Shauni is offline   Reply With Quote
Old 10-02-12, 04:54   #48
Champ
Hobbyist
 
Join Date: Jan 2009
Location: NC
Posts: 22
Default

Quote:
Originally Posted by Laras Boyfr. View Post
^What Tomo said.
But I think the limit can be also 8x8, as such tiny textures are hard to select anyway.

Anyway I had a little request which might come handy also for other builders:
Could you make a texture resize feature for texture pieces?
That means if I have a 128x128 texture tile within strpix, I can resize it to f.e. 64x64 and the texture id stays the same.
Of course I could convert it with some other tool but then the texture ids are not the same anymore and I would need to retexture it.
The other possibility would be to assign (or swap) to a texture the texture id of another texture.
The reason for this is to make certain textures in the wad smaller so the wad doesnt reach its limit so fast and the game doesnt lag that much.
My current level (made with the BtB2011 wad) even crashes at some spots.
I guess this is possible with textureadd but it would be much quicker and more flexible within strpix.
in textureadd you can do this if want to resize a texture piece... left click on the texture you want to resize.. right click the page or the texture over to the right, click copy texture... then edit the size and page in the texture position area box... then click the new texture if not selected already, then right click again and chose paste this time,,, it will resize to how ever big the rectangle and keep the id.... i can make a texture id swap next update... i'm also working on way to make selection cuts with the keyboard...

the main reason we're not able to join these programs are because we all use different programming languages and tools...
textureadd was originally going to be the new c++ strpix in early 2000s for me to use or to those that couldnt use programs written in dephi... my old pc wouldnt support it for some reason... but i couldnt learn how to work with all the model data so i gave up on it... then when everyone wanted a faster way to add textures to wads, i decided to release it and keep making it better from mine and everyones ideas... i gave up on tombraider long time ago, but i'm still trying to help you all out with these programs... i have two more texture programs in the works... i'm still learning as i go... i try to make the fastest updates as i can...

Last edited by Champ; 10-02-12 at 05:21.
Champ is offline   Reply With Quote
Old 10-02-12, 06:02   #49
sapper
Archaeologist
 
sapper's Avatar
 
Join Date: Sep 2007
Posts: 1,591
Default

Quote:
Originally Posted by Shauni View Post
Good to hear you're working on new features! Very exciting
Do you think you might be able to apply an Undo button?
Never programmed an Undo feature so probably not. I will look at PixStr's Undo though.
sapper is offline   Reply With Quote
Old 10-02-12, 13:20   #50
teme9
Professor
 
teme9's Avatar
 
Join Date: Nov 2005
Location: Finland
Posts: 3,244
Default

I honestly can't wait to see how this program turns out
teme9 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 03:20.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.