CompuServe Thread

#Scriptability Question

23 messages in this thread
#173452From: Ed McLaughlinJun 3, 1995 10:54 AM
We have hundreds of meshes not in 3ds format which we need to get into 3ds format. The geometry we can translate but the texture mappings we need too. I have the following idea and I wonder if someone would tell me if TSE or some other scripting product could help us do this. Here's the plan: 1) we translate the geometry over to 3ds retaining group hierarchy. 2) we convert all our bitmap textures to the proper form 3ds like to see. now comes the scriptabilty question: 3) Can TSE or some other scripting product control the application of textures within 3ds such that given the name of a mesh group, the bitmap to apply to it and an offset and rotation value, the group will have texture vertices applied to it. Basically I'm asking if there is a way to script the application of texture maps in 3ds ???
#173473From: Martin Doudoroff/KUBJun 3, 1995 1:41 PM
>> Can TSE or some other scripting product control the application of textures within 3ds such that given the name of a mesh group, the bitmap to apply to it and an offset and rotation value, the group will have texture vertices applied to it. Basically I'm asking if there is a way to script the application of texture maps in 3ds ??? << The Script Extension will do what you want; the process could be very simple or very complex, depending on the condition of your original data. The TSE PXP module is where you handle all these sorts of things. The simplest case is where you have a rat's nest of polygons which already have UV coordinates (mapping location information) applied to them. If UV coordinates are already applied, chances are they're good for 3D Studio. If the UV coordinates deviate from 3D Studio's specifications, chances are they can be repaired through a simple sorting process. If your geometry does not have UV coordinates, and instead has some odd external mapping information, you will be faced with reproducing that proprietary technique during the conversion process. This scenario is unlikely, however. (Where is this geometry coming from, anyway?) As far as assigning the physical maps to materials on the geometry, you'll have to handle this manually through the 3DS Materials Editor. Once you set up the materials, the maps should appear on the objects correctly. Hope this helps, Martin
#173843From: SyndesisJun 5, 1995 9:48 PM
Which program did you use to create these models?
#173853From: Robert C. RitgerJun 5, 1995 11:00 PM
Ed: You could probably just run your meshes through Syndesis Interchange and save yourself a bit of programming. Bob
#174454From: Ed McLaughlinJun 8, 1995 8:08 PM
Re: converting files with texture maps on them (u,v coords) already. You suggested using Interchange. Interchange will not convert u,v coordinates.
#174498From: Robert C. RitgerJun 9, 1995 12:37 AM
/_______________________From your message________________________\\ Interchange will not convert u,v coordinates. __________________________________________________________________ Send a wishlist item to John Foust. Sounds like you've got a lot of work ahead of you. 🙁 Bob
#175175From: Grahame NaylorJun 13, 1995 1:47 PM
I am currently working on a TSE script related to your problem. I want to be able to apply a uniform mapping to faces coming into 3DS via DXF. That is to say a set of uv texture vertices related to the perimeter length of an incoming set of walls so that an applied (brick say) texture will be evenly scaled and perpendicular to each face. This is very similar to the automatic mapping from the Lofter. From what I can see in TSE this is the only way to apply mapping co-ordinates _easily_, a direct equivalent of the "mapping type" , "mapping scale", "mapping orientation" metaphor used in the main body of 3DS is not brought to the surface in TSE for you to manipulate. So if the program you are translating from uses uv co-ords the solution is easy, if not……….! Grahame Anybody browsing this who wants a copy of my progress with this script let me know (it is not worthy of a general upload (yet!))
#175193From: Jonas Ruikis [ADESK]Jun 13, 1995 3:15 PM
<< From what I can see in TSE this is the only way to apply mapping co-ordinates _easily_, a direct equivalent of the "mapping type" , "mapping scale", "mapping orientation" metaphor used in the main body of 3DS is not brought to the surface in TSE for you to manipulate. >> Please call the Autodesk Faxback service and request FaxBack #756 for some additional insights into Textured Coordinates and 3DS. Also, several of my developers have used the program DUMP3DS.exe found in the following file to backward engineer the mapping icon placement/scale/etc. behavior. Section: Software Dev. Kits Contributor: 73172,1351 Size: 459846 Submitted: 8/11/94 Type: Binary Accesses: 115 Title: Code examples – FTK3 and executables Keys: 3DS FTK FILE TOOLKIT C SAMPLE 3DS3 FTK3 4 sample C programs, DUMP3DS, TUNNEL, POLYGON and DUPTEST, source and executable demonstrating the "database-like" style of writing/reading *.3ds files on the fly. Programmers… use the DUMP3DS.exe example to help compare a manually created *.3ds file with 3DS with a 3ds file created with IPAS/FTK/other (my favorite and most useful example). Also, note the creation of the material in TUNNEL.c.
#175532From: SyndesisJun 15, 1995 11:31 AM
Confirm to delete (Y or N)? y 1 message was Deleted
#175533From: SyndesisJun 15, 1995 11:33 AM
I have some questions about UV, too. I've been researching how InterChange might best move UV coordinates between 3D packages. So far, I've classified 3D programs into the following categories: 1. No UV coordinates or texture mapping. 2. Implicit UV coordinates, where the calculation of UV for each vertex is performed at render time based on the type of mapping in the object, and UV info is not stored in the file format and is not editable. For example, LightWave and Imagine work this way. 3. Explicit UV coordinates, where the program precalculates the UV coordinates for each vertex when the user sets the mapping type (cylindrical, spherical, etc.) and where those UV coordinates are stored in the file format. 3D Studio fits in this category. However, as I understand it, there is no user interface in 3DS for adjusting actual UV values per-point. If this was present, it would allow a type of texture "pinning" where the user would say, I want the center of this bitmapped eye's pupil to be centered on this point. 4. Explicit UV as above, with user control of UV. Wavefront and Alias allow this, where you can parametrically adjust a set of UV values across an object, allowing shifts of the UV values en masse, shifting and puckering the texture map. An IPAS or a script can change the UV values in a 3D file, right? What happens when you do this? Does the renderer glitch at all?
#175566From: Jonas Ruikis [ADESK]Jun 15, 1995 1:59 PM
Hi John, << An IPAS or a script can change the UV values in a 3D file, right? What happens when you do this? Does the renderer glitch at all? >> It shouldn't. Modifying the UV's is similar to creating an object from scratch and assigning UV's at mesh creation time. This can be done successfully, Danny's metaballs create UV's, for example. Also, in 3DS, you can modify the UV's after they've been created, by using the different mapping icon selections, and there's still no problem. Do you know of any problems with UV programmatic modification (ipas/script) ? jonas[adesk] Do you have data which shows the opposite?
#175588From: SyndesisJun 15, 1995 2:49 PM
No, I do not have any evidence that it doesn't work. I'm wondering if there are any "gotchas" in terms of gernerally assigning UV values that aren't similar to what 3DS does naturally. For example, might the renderer glitch if the UV values are "too strange"?
#175718From: Jonas Ruikis [ADESK]Jun 16, 1995 9:59 AM
Hi John, << For example, might the renderer glitch if the UV values are "too strange"? >> There is one gotcha's that I know of.. Have you seen the last page of.. Please call the Autodesk Faxback service and request FaxBack #756 for some additional insights into Textured Coordinates and 3DS… ?
#175724From: Dan O'LearyJun 16, 1995 10:09 AM
>> I have some questions about UV, too. I've been researching how InterChange might best move UV coordinates between 3D packages. So far, I've classified 3D programs into the following categories: << PMJI… I don't know if you have looked into it, but you might be able to expand your market by offering output for some of the home game consoles now available or coming real soon now. As you may know, all of the new machines are real-time textured poly engines. We are first party developers for the Sony Playstation, just one of such machines. Nintendo, 3D0, and Saturn also have similar machines available/in development. There are over 200 US Playstation developers alone…. Some work has been done by Sony to develop such a tool for the Playstation, with support for 3ds, but they are streched somewhat thin at the moment (not unlike 3D0, Nintendo, and the others). Just a thought. Let me know if you would like any additional info.
#175738From: SyndesisJun 16, 1995 11:18 AM
Oh, yes, absolutely I've checked out the game console developer market! But it's been a funny experience – we've signed three-four NDAs with Sony asking for info about their file format, but we keep getting lost in the shuffle, so we haven't supported their format. And with Sega and 3DO, we found that very few developers were actually using the recommended 3D tools and/or file format, that they'd craft their own instead. If you can point me to a better contact within Sony, I'd be glad to fax them all the NDAs I've signed. 🙂 Perhaps then we can add support to InterChange for their file format.
#176918From: Grahame NaylorJun 23, 1995 1:26 PM
Jonas Thanks for the pointers, how do I access the faxback service (bear in mind I am in the UK)? If it requires touch-tones then we have an old fax m/c that is pulse ! Would it not be possible (and to everybodies advantage) to post these gems on the forum? Or maybe even establish a Web site for them……(just a thought). What a delight TSE is, access to the inner secrets of 3DS at last ! (well some of them)
#177095From: Jonas Ruikis [ADESK]Jun 24, 1995 11:50 AM
Hi Grahame, << .. Or maybe even establish a Web site for them……(just a thought). >> Compuserve and the WWW page for ADESK will eventually have all of the same data available for access. Please e-mail me you fax number and I can fax one to you on Monday. jonas[adesk]
#177444From: Grahame NaylorJun 27, 1995 12:57 PM
Thanks Jonas Sorry about the delay (scripting fun got interrupted for paying work!) Magic Lantern fax….. 44 71 702 3509 (you might check the code for London we recently changed all the prefixes in the UK and I don't know that affects calls from overseas) Thanks again Grahame
#177466From: Jonas Ruikis [ADESK]Jun 27, 1995 3:09 PM
Hi Grahame, << UV mapping fax.. >> done..
#177825From: Grahame NaylorJun 29, 1995 1:37 PM
Jonas Many thanks for the fax, looks very useful. I am just going away for some overdue R&R so texture vertices will just have to wait! I'll pick it all up again when I return and hopefully I will have something usefull to post shortly afterwards. TVM Grahame.
#175291From: EDWARD HARVEYJun 14, 1995 1:42 AM
<<Anybody browsing this who wants a copy of my progress with this script let me know (it is not worthy of a general upload (yet!)) Sounds like a very useful script for those of us who import dfxs. I look foward to checking it out if you are kind enough to share it when its done.
#176919From: Grahame NaylorJun 23, 1995 1:26 PM
Ed I have the basics working but it relies on a regular vertex ordering. I need to make it work with arbitary geometry before it will be reallly useful. Watch this space I do intend to finish it and will be happy to share it. Grahame
#179085From: EDWARD HARVEYJul 9, 1995 3:05 AM
Grahame I just got your message, Ive been on vacation. Sounds like good progress. Im imagining this as a means to do better work with meshpaint on imported meshes. Planer. cyl and spherical are pretty limited tools. Ed