Jump to content

> > Please help me with texturing


Giovanni

Recommended Posts

Hello,

I just created my object in 3DS Max for my own map and tested it. Everything works nice but the textures aren't applied for the object.

Huh.png

(( may look like ballZ but lol .... ))

Anyway, I really can't get this working. The objects are solid, and that works nice but the textures aren't shown as you can see.

How I created the object:

1. Exporting the DFF without the "GTA COL Surface" ; with the normal texture

2. Putting the GTA COL Surface on the Object and exporting it as COL

I created a TXD file, if you want you can download it here: http://solidfiles.com/d/a3e6d/

Here is the script I used:

function replaceCar() 
txd = engineLoadTXD ( "ball.txd", [objectid] ) 
engineImportTXD ( txd, [objectid]) 
dff = engineLoadDFF ( "ball.dff", [objectid]) 
engineReplaceModel ( dff, [objectid]) 
col = engineLoadCOL('ball.col') 
engineReplaceCOL(col, [objectid]) 
  
  
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceCar) 

Thanks for your help

Link to comment

Right, forgot about this. Here is my meta.xml file.

<meta> 
    <script src="client.lua" type="client" /> 
    <script src="server.lua" type="server" /> 
    <file src="ball.dff" /> 
    <file src="ball.col" /> 
    <file src="ball.txd" /> 
    <info gamemodes="race" type="map" name="*****" author="*****" version="*****" /> 
    <map src="*****.map" dimension="0" /> 
    <settings> 
        <setting name="#minplayers" value="[ 0 ]" /> 
        <setting name="#maxplayers" value="[ 128 ]" /> 
        <setting name="#gravity" value="[ 0.008000 ]" /> 
        <setting name="#weather" value="[ 0 ]" /> 
        <setting name="#time" value="12:0" /> 
        <setting name="#locked_time" value="[ false ]" /> 
        <setting name="#waveheight" value="[ 0 ]" /> 
        <setting name="#gamespeed" value="[ 1 ]" /> 
    </settings> 
</meta> 

I checked the script again and there are everywhere the same IDs so it should actually work no?

Link to comment
the problem is not in the script and dff or col me a lesson the correct convert from 3dmax => gtasa => mta

translate this http://gtamaps.net/forum/index.php?showtopic=8083 and read This WORKING

and all lessons and tutorials http://gtamaps.net/forum/index.php?showforum=40

I re-created my object and did all the steps shown in the tutorial (your first link). Thanks for it but I still have the exactly same problem as written above. The objects are working fine but the textures aren't shown....

Link to comment
function replaceCar() 
txd = engineLoadTXD ( "kugel.txd", 3504 ) 
engineImportTXD ( txd, 3504) 
dff = engineLoadDFF ( "kugel.dff", 3504) 
engineReplaceModel ( dff, 3504) 
col = engineLoadCOL('kugel.col') 
engineReplaceCOL(col, 3504) 
  
  
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceCar) 
  

That's my client.lua. The object is the new one and called "kugel" now.

Link to comment
function replaceCar() 
txd = engineLoadTXD ( "kugel.txd", 3504 ) 
engineImportTXD ( txd, 3504) 
dff = engineLoadDFF ( "kugel.dff", 3504) 
engineReplaceModel ( dff, 3504) 
col = engineLoadCOL('kugel.col') 
engineReplaceCOL(col, 3504) 
  
  
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceCar) 
  

That's my client.lua. The object is the new one and called "kugel" now.

try this:

  
function startObj() 
    txd = engineLoadTXD ( "kugel.txd" ) 
    engineImportTXD ( txd, 3504 ) 
    col = engineLoadCOL ( "kugel.col" ) 
    dff = engineLoadDFF ( "kugel.dff", 0 ) 
    engineReplaceCOL ( col, 3504) 
    engineReplaceModel ( dff, 3504 ) 
    engineSetModelLODDistance(3504, 2000) 
end 
  
setTimer ( startObj, 1000, 1) 
  

Link to comment
function replaceCar() 
txd = engineLoadTXD ( "kugel.txd", 3504 ) 
engineImportTXD ( txd, 3504) 
dff = engineLoadDFF ( "kugel.dff", 3504) 
engineReplaceModel ( dff, 3504) 
col = engineLoadCOL('kugel.col') 
engineReplaceCOL(col, 3504) 
  
  
end 
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceCar) 
  

That's my client.lua. The object is the new one and called "kugel" now.

try this:

  
function startObj() 
    txd = engineLoadTXD ( "kugel.txd" ) 
    engineImportTXD ( txd, 3504 ) 
    col = engineLoadCOL ( "kugel.col" ) 
    dff = engineLoadDFF ( "kugel.dff", 0 ) 
    engineReplaceCOL ( col, 3504) 
    engineReplaceModel ( dff, 3504 ) 
    engineSetModelLODDistance(3504, 2000) 
end 
  
setTimer ( startObj, 1000, 1) 
  

This doesn't work. The object is visible, but 1) it's not solid and 2) the texture is still not on it

Link to comment

1) use big objects for replace

  
function startObj() 
    txd = engineLoadTXD ( "kugel.txd" ) 
    engineImportTXD ( txd, 7451 ) 
    col = engineLoadCOL ( "kugel.col" ) 
    dff = engineLoadDFF ( "kugel.dff", 0 ) 
    engineReplaceCOL ( col, 7451) 
    engineReplaceModel ( dff, 7451 ) 
    engineSetModelLODDistance(7451, 2000) 
end 
  
setTimer ( startObj, 1000, 1) 
  

2) your txd not open G-TXD and TXD workshop

maybe you did not add texture, use the program: G-TXD and TXD workshop

Link to comment

-You have to rename the texture in the txd tool (example txd workshop), use the name of the texture you use in 3ds max and without the extension if the name is yo.png , you have to name it yo in the txd tool.

-You have to compress the texture in the .txd , compress to DXT1 and DXT3 for texture with alpha channel.

-dont use .bmp picture format

-use 24 bits or 32 bits.

:fadein:

Link to comment
-You have to rename the texture in the txd tool (example txd workshop), use the name of the texture you use in 3ds max and without the extension if the name is yo.png , you have to name it yo in the txd tool.

-You have to compress the texture in the .txd , compress to DXT1 and DXT3 for texture with alpha channel.

-dont use .bmp picture format

-use 24 bits or 32 bits.

:fadein:

Thanks a lot. It works fine now :)

Link to comment
I've got the very same problem. What exactly did you change?

if problems with col and txd use this

the problem is not in the script and dff or col me a lesson the correct convert from 3dmax => gtasa => mta

translate this http://gtamaps.net/forum/index.php?showtopic=8083 and read This WORKING

and all lessons and tutorials http://gtamaps.net/forum/index.php?showforum=40

and

Benox.exe wrote:

-You have to rename the texture in the txd tool (example txd workshop), use the name of the texture you use in 3ds max and without the extension if the name is yo.png , you have to name it yo in the txd tool.

-You have to compress the texture in the .txd , compress to DXT1 and DXT3 for texture with alpha channel.

-dont use .bmp picture format

-use 24 bits or 32 bits.

and

Creating txd-file. (File with textures)

Open the program txd workshop. File-New.

Choosing 32BPP.

Import. Choose the texture that we textured our model., At the same time copied to the clipboard, it name.use OK.

2 times click under the name of the texture. Do as in the image below (insert your name instead of 32bit image texture and click compressed). Click OK.

Bottom right in the window instead choose SanAndreas GTAVC.

Everything is ready. Save our txd-file in the folder c dff and col.

These are the files should now be in your mailbox:

and this works

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...