TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 20 of 20

Thread: We need new object viewer!

  1. #1
    Member
    Registered: May 2006
    Location: Russia

    We need new object viewer!

    Hi everybody!
    Do you authors know what do you need? With the help of my friend, I know now that all we need is an easy program: object viewer.
    We have one, but it is too old and buggy. And can't list objects.
    That's how it should look like:

    1. Two ways of exploring: clicking a single BIN file or listing all existing files in the window in currend folder. Choose the name in the list and see the model on another part of the screen.
    2. Automatic finding textures in current folder (need for developing stage) or in subfolders TXT and TXT16.
    3. Support for all existing texture formats: PNG, DDS, GIF, PCX, TGA, BMP.
    4. Status line for showing names of the model and textures it uses (with extensions!).
    5. Support for all kind of models: jointed, vhoted, illuminated, transparent and even wrong.
    6. Support for Windows XP.

    Do any programmer have enough skill and will to make us happy? When you have 1000+ models in Obj folder, it is almost impossible to find anythjing you need. For me, I'm completely tired of this stupid work.

  2. #2
    Member
    Registered: Sep 2013
    Quote Originally Posted by Zontik View Post
    We have one, but it is too old and buggy.
    Are the sources available?

  3. #3
    Dóttirin klęšist oft móšur möttli
    Registered: Apr 2015
    Do you mean view.exe?
    http://www.thief-thecircle.com/teg-o...ject_tools.zip

    The idea sounds good. RSoul might combine his tools with this one.

  4. #4
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    Honestly, I don't feel the lack.

    Now if you were to say that we needed a new ParchEd to take advantage of all the NewDark text formatting features and provide a WYSIWYG interface for editing texts, I would be all "Right on, mate!" about it.

  5. #5
    Member
    Registered: Dec 2011
    Location: Ferrol - Spain
    When you have 1000+ models in Obj folder, it is almost impossible to find anythjing you need. For me, I'm completely tired of this stupid work:

    Well, at least with FileSeek I can find strings in a .bin file.

  6. #6
    Member
    Registered: May 2006
    Location: Russia
    Well, at least with FileSeek I can find strings in a .bin file.
    I am too, but how can it help to find, say, an old table from 1000+ files?
    Honestly, I don't feel the lack.
    You are happy then.
    It's not for our own missions folders only. Try to find something useful, for example, in Christine's object pack. Yes, there is a demo inside, you can spend hours roaming the beautiful mansion instead of just taking one proper object with its textures. Time is money.
    Unfortunately I'm not a programmer. I'll better do my own work. But I would like to do it faster. Much faster. Yes, it is possible.

  7. #7
    Member
    Registered: Sep 2008
    Location: Deutschland/Germany

    Quote Originally Posted by Zontik View Post
    I know now that all we need is an easy program: object viewer.
    Everytime I use view.exe I have the same thoughts ... I second this!
    My FM campaigns Garrett's Young Years XTra, Reunion With Basso
    Want your upcoming FM translated in foreign languages?

  8. #8
    Member
    Registered: Jan 2012
    Location: Gčrmany
    What I think indeed is a problem is that we have tons of models in our folders and we don't know what we have.

    Are the sources available?
    In the big thief 2 source leak I found nothing that looked like it.

    While it would be awesome to have something like that I can't say that I feel a need as well.
    view.exe is rusty but it does the crucial jobs you can get the texture names out of it and it can test joints - working with joints is ugly. in DromEd you are not sure if a joint will work but if it works in view.exe it will work in DromEd you just need to find the right settings.


    To create a new viewer we need a person with the required skill and knowledge that person needs time and motivation.

    ------------------------------------

    What also came to my mind concerning the original idea 'what models do I even have?' are two ideas.

    It is possible with scripts to create a big demo map with all objects directly in DromEd.
    We can check if a file is present and if yes create a model check its dimensions and move it accordingly. It would be a Bruteforce way but not hard to create. (With some external work you can even just directly use the filenames).

    There will be problems with the engine and we would need smaller steps so just create 200 models and seperate them into 10 clusters in one file - would need some testing. Texture limit would be the most concerning one or?

    Well we could even go further and automatically create screenshots during that process - they wouldn't be good in every case but I think with screenshots more people could work with and create something similar to T2OL (all T2 objects with screenshots) which also could check for the textures required or as I just found out even use the T2OL to create a new personal list with all files and screenshots.

    ------------------------------------------------------

    The second idea can't we realize something similar as I wrote above via a Blender script, use nemyax' importer or the old BinToE.... to 'dump' every present .bin into blender, and there you would have a list could view the models textures and bla bla bla.

  9. #9
    Member
    Registered: Sep 2013
    Quote Originally Posted by Daraan View Post
    can't we realize something similar as I wrote above via a Blender script, use nemyax' importer
    I did suggest that, but Zontik rapped it.

  10. #10
    Member
    Registered: May 2006
    Location: Russia
    I'm still on XP and with zero Blender expierence. For me personnaly it's not a kind of solution. Unfortunatuly I have no enough free time to change OS and to learn a viewer.
    Well, making screenshots of every model I add is the best idea I've got on both forums. I wish to hear that 6 years ago.

  11. #11
    Member
    Registered: Sep 2013
    Blender 2.76 works on XP.

  12. #12
    Member
    Registered: May 2006
    Location: Russia
    I thought the task was realistic.

  13. #13
    Member
    Registered: May 2002
    Location: Texas
    For many objects the Object Repository can be used as a reference. If you have the zip file already then you can see which files to use. I have all of the resource zip files organized by author so if I see who made an object and I have it already I'll know where to look. If I don't then it's just as easy to download the zip to the corresponding author's folder.

  14. #14
    Member
    Registered: May 2006
    Location: Russia
    It is a good way, but doesn't work for current OBJ folder. I collected my own one for 6 years, now it is near impossible to remember which models are there and which are not, which were renamed and which were not. It's a headache.
    (Not even say about textures in TXT16...)

  15. #15
    Dóttirin klęšist oft móšur möttli
    Registered: Apr 2015
    You might set up a demo mission for yourself that contains every shape of the object folder.

  16. #16
    Member
    Registered: Jan 2012
    Location: Gčrmany
    Quote Originally Posted by Unna Oertdottir View Post
    You might set up a demo mission for yourself that contains every shape of the object folder.
    And that is

    As said above I'm writing a script which will be able to do that automatically.
    You would dump all your filenames into a .txt file replace every .bin with a , copy paste that into the squirrel script and then run it.
    Testing will show how good it works.


    @neymax
    Have you made any experience how many imported models blender can handle?

  17. #17
    Member
    Registered: Mar 2001
    Location: Ireland
    Quote Originally Posted by Daraan View Post
    There will be problems with the engine and we would need smaller steps so just create 200 models and seperate them into 10 clusters in one file - would need some testing. Texture limit would be the most concerning one or?
    The old palette limit should not be a problem in NewDark, at least, so you'd only be dealing with texture memory limitations.

    You should put each group of objects into its own room, as the engine won't like them all being on-screen at once.

  18. #18
    Member
    Registered: May 2006
    Location: Russia
    You might set up a demo mission for yourself that contains every shape of the object folder.
    It's only a part of solution. It doesn't solve the problem with inknown models by other authors, especially with object packs.
    Who has ever tried to find desired model in CoSaS packs (with one common screenshot for the whole pack), those will understand me better.

  19. #19
    Member
    Registered: Sep 2013
    Quote Originally Posted by Daraan View Post
    Have you made any experience how many imported models blender can handle?
    Blender can have plenty of stuff in a single scene, but pulling everything in at once is really not the way to go. There are more elegant ways to emulate a viewer mode in Blender.

  20. #20
    Member
    Registered: Jan 2012
    Location: Gčrmany
    By chance I found this old thread http://www.ttlg.com/forums/showthread.php?t=113847
    It seams that view.exe can load more than one object but haven't figured it out how.

    I leave the view ReadMe here as well.
    Code:
       Takes a binary bsp file, or several binary bsp files, or a .cmp compound file and displays them.
    
       -ppal.gif specifies the palette to use, or
         If no palette is specified, the First Contact palette is used.
       -upal.gif specifies the palette to use without remapping textures
       -m means to generate and use mip maps in the model.
       -dd3d starts it in d3d mode.
       -cFILE loads in a command file line by line
           by default looks for view.cfg
       Set the RAW environment variable to point at your texture directory
       Set the IDATA environment variable to point at your model
          note that no 16 bit or 24 format of textures are supported.  Only cel
          gif,pcx, and bmp.
          You switch between the multiple models using the h key.
      
       Controls are:
       l/j, arrows, for changing object heading
       i/k, arrows, for changing pitch
       u/o for changing bank
       w/s for moving it backwards and forwards
       a/d for moving it left and right
       q/e for moving it up and down
       z/Z, also +/- zooms in and out
       b/v changes background color
       1/2 changes lighting harshness
       3/4 changes lighting heading
       5/6 changes lighting pitch
       7   toggles lighting or full ambient
       p   toggles lighting table displayer on and off
       P   makes a screen shot, viewxxxx.bmp
       r   changes resolution
       m   toggles texture/solid/wire modes
       t   cycles through textures, space toggles transparency
       f   toggles viewer motion versus object motion
       y   toggles information mode, showing vhots and vcalls, then lighting vecs
       x   toggles cycling the parameters to move subobjects
       `   toggles rendering order
       h   toggles through all the models
       n   toggles silly scaling mode
       [   toggles linear or perspective
       ]   collapses all the models and shows them together
       g   toggles mip mapping on and off
       \  updates all the textures
       :vhot   moves the head to vhot number id
       :display "full" or "debug" or "d3d [#]" or "zd3d [#]" 
            or "list" to get d3d list on mono screen
       :res 800 600 sets the resolution
       :load foo.bin  loads a bsp model
       :load      brings up dialog box
       :fov  makes the field of view  degrees
       :rate  sets the rate of time for swinging parts
       :range  sets the swinging range of the parts
       :time  sets the rate of time for all controls
       :model  sets the current model number
       :vcall   sets a vcall to render a model.
              That model must be loaded already.
       :vcall clear  Clears all the vcalls.
       :vcall_spin  spins a vcall model at rpm
       :update  starts or stops auto tmap updating (default off)
       :axle_list  mprints a list of all the axles and their ranges
       :back  makes the background be a specified rgb triplet
       :alpha  makes the object transparent.
       :sun_direct  makes that much light come directly from sun
       :sun_brightness  scales the total brightness.
       :scale  scales the model in each axis.
       :scale  scales the model by val.
    ------------------------
    As for the script I promised it's done since a week but I'm still fine tuning the screenshot function.
    For me I can dump ~1300 models in 35 seconds. For taking screenshots this process becomes a lot longer (3mins). The script runs rather independent from the screenshots so some delay must be forced. For me 150ms are working fine but I think there might be some machine dependence and if you save in BMP or PNG.

    I try to release it with the new version of DScript (but independent .nut file)
    But here is the pre-release version, it's not polished but for it's purpose it doesn't have to be

    For me it already is a good reference, and I found some models to throw away.

    Code:
    /*#########################################
    DScript - DumpModels v0.9
    
    Before you can use this script you have to do some additional work as a complete list of all filenames is needed.
    
    *For WINDOWS
    1.) Open the folder with models you want to use in your explorer.
    	From the top line copy the path. For example:
    2.) Open the Comand prompt (CMD) - for example by Win+R -> CMD
    	enter cd and then paste your obj path (use rightclick)
    3.) Now enter: DIR /B /O:E >models.txt
    
    4.) Go back into your explorer and open the now present models.txt. Best you use notepadd++.
    	•At the top and bottom of the file you will find - if present - non .bin files. Delete these.
    	•With Ctrl+H you open the Search and replace dialog.
    		•Bottom left select: Advanced (\n, \r...)
    		•Now enter: Search for .bin\r\n
    		•Replace with "," (including the ")
    		•Now Replace all
    	You know have one very long line
    	Go to the very and and delete the last ,"
    	Go to the start and enter a " before the first model name.
    	
    5.) Copy everything and paste it below into the [ ] brackets.
    6.) Save this file again and open your editor. Make sure squirrel.osm is loaded.
    
    7.) Create a Marker and give it the DDumpModels script. if you don't want to create screenshots you can start the progress in the editor with script_test ObjIDOfTheMarker.	This will be done in less than a minute.
    
    	IN CASE OF CRASH:
    		in case of wrong models: The script will dump the models it has/tried to create in the last entrys of monolog.txt you should find a clue which models make trouble. Delte/Move the file and also delete the model name from the long "modelname" line.
    		In case of memory problems -> Check the parameters below. Use First and MaxModels.
    
    8.) Best to create your airbrushes now, when you see how small and big objects are distributed. I had no problems with ~400x200 air brushes.
    
    TAKING SCREENSHOTS:
    
    	!--> BEFORE: In cam_ext.cfg use screenshot_format BMP. PNG will TAKE AGES and possibly skip models! <---!
    	
    	A) First you should create all models without screenshots and place your airbrushes accordingly.
    	B) Create a button/leaver and CD link it to the marker.
    	C) Create a second Marker name it Camera.
    		•Give it the property Renderer->CameraOverlay. Set it to active.
    		•Set it to active and set Alpha to 0
    	D) It's better to delete all models again so none obscours the camera.
    	E) If you want to create screenshots, create a button/lever and CD link it to the marker. Make sure you set the parameter Screenshots = 1 in the DesignNote.
    	Press the Button in Game Mode.
    	
    	If you machine is not so powerfull it could happen that some models are skipped, in that case you have to search for the line SetOneShotTimer("timer",0.15)	and slightly increase the last number, e.g. to 0.2
    
    Note: For the very first model there won't be a screenshot.
    
    -----	
    	
    In the DesignNote the following optional parameters can be used as (exactly) as written here:
    
    First		Can be a model name or number, will start the process at the given ModelName or at the #th Model in your list.	
    
    MaxModels		There could be trouble because to many models are created. With MaxModels you can set a limit to create for example just 100 models.
    				To continue the process where you left set First to the next Model after that. First alphabetically then with one character more.
    				Default is 2000. I had no problems with 1300 - expect at first defect models who caused crashes.
    				
    Screenshots = 1 to create a screenshot for every model during the process. This will make it a LOT slower, especially if you enabled PNG format.
    
    ##########################################*/
    class DDumpModels extends SqRootScript
    ##########################################
    {
    xmax=0
    v=vector()
    m=""
    i=0
    count=0
    MaxModels=2000
    cam = null
    
    MyModels =
    [
    "staff","stalag","statua1","Steelcabinet","waterel4"
    
    //COPY YOUR FILE NAMES INTO HERE. -- ONE LINE ONLY!
    
    ]
    
    
    
    
    
    function FoundSth(test,dump,v)
    {
    
    
    			Property.SetSimple(-5739,"ModelName",test)
    			local o = Object.Create(-5739)
    			Property.SetSimple(o,"ModelName",test)
    		
    			Object.SetName(o,test)
    			local v2 = Property.Get(o,"PhysDims","Size")
    			local x = v2.x
    			local y = v2.y
    			local z = v2.z
    			if (x>xmax)
    				xmax=x
    	
    			v.y += y/2
    			Object.Teleport(o,v,vector())
    			//Object.Teleport("player",v,vector())
    			//making the screenshot
    			if (dump)
    				{
    				local d = 0.62*y+0.5 //~cos(45)
    				Object.Teleport(cam,vector(v.x-d,v.y+d,v.z+v2.z/8+2),vector(0,32,-45))
    				if (i != 0)
    					Debug.Command("screen_dump",MyModels[i-1])
    				}
    			v.y += y/2+1
    			print(i+"  "+m)
    			if (v.y > 400)
    				{
    				v.y = -380
    				v.x += xmax
    				xmax = xmax/4
    				if (v.x >900)
    					print("Maxiumum Area used ending the progress")
    					return v
    				}
    			
    		return v
    }
    
    
    function OnTimer()
    {
    	m= MyModels[i]
    	FoundSth(m,true,v)
    	i++
    	count++
    	if (count < MaxModels)
    		SetOneShotTimer("timer",0.15)			//TIME BETWEEN SCREENSHOTS. Do not use png format in cam_ext.cfg
    }
    
    
    function OnTurnOn()
    {
    local db = userparams()
    //local chars = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0"]
    
    local first = DGetParam("First",0,db)
    
    local dump = DGetParam("Screenshots",false,db)
    	if (dump)
    	{
    		local cam = Object.Create("Marker")
    		Camera.StaticAttach(4)
    	}
    count = 0
    MaxModels = DGetParam("MaxModels",2000,db)
    Property.Add(-5739,"ModelName")
    cam = Object.Named("Camera")
    
    if (typeof first == "string")
    	{first = MyModels.find(first)}
    i= first
     v = vector(-380,-380,0)
    
    if (dump)
    	SetOneShotTimer("timer",0.15)
    else
    {
    	for (local i = first;count < MaxModels;count++)
    		{
    			m= MyModels[i]
    			v = FoundSth(MyModels[i],dump,v)
    			i++
    		}
    }
    xmax = 0
    count = 0
    //Object.Destroy(self)
    //Camera.ForceCameraReturn()
    }
    
    function OnMessage()
    {print(message().message)
    
    if (message().message == "Test")
    	OnTurnOn()}
    
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •