Adding a new texture
#1

Hi,

I'm creating my first object and I was following Kalcors tutorial. In the tutorial Kalcor shows how to add an existing texture to an object in Blender, but how can I use an image ( png, 128x128 ) which I downloaded from ****** and create a new txd file out of it? When adding an object, you're forced to add a texture but since my image is not available in any of the existing txd files, how is it possible to create a new one? Maybe I overlooked something...

//Edit: After submitting something came into my mind: Do I have to export an existing txd file via TxdWorkshop, rename it, open it and then import my png image into it? Trying it now...
Reply
#2

The blender plugin is only for editing the dff file, Kalcor simply exported the image from TXD first and then load the it as the texture material in Blender. On the 3rd video after he changed texture type to Image, you can open your downloaded image instead. After you exported the dff, you will have to add the texture image manually to the TXD file with TXDWorkshop.

You can even create a new image texture in the blender, but this wont generate the TXD file, you have to do it manually from TXDWorkshop. Just make sure the material name match the texture name in the TXD file.
Reply
#3

You open TXD Workshop, create a File > new image (32 bit). Import your png/bmp. Change the Image 'Name' to the filename minus the .png/.bmp. Set as compressed, then Ok > Save TXD.
Reply
#4

Thanks! Now I have the problem that my texture isn't recognized when I open the dff and txd file in kdff gui.

My txd files name is "fbi_logo.txd", it contains an image ( 32bit, 128x128, png, alpha is used ) with the name "fbi_logo1". In blender, I've set the materials name to "fbi_logo1".

It also cannot create a col file out of it. It says "Make Col error: 2". I followed your advices in https://sampforum.blast.hk/showthread.php?tid=645211 but I didn't find the problem in my dff file.

I've attached my blender file, the image, the txd and the dff to the attachments for further debugging.
Reply
#5

There's a mistake in my tutorial. The ponz blender export plugin doesn't seem to use the material name, but the file name of the image. So you should make sure the material 'name' in the txd is set to the same as the file name.
Reply
#6

Thanks for your help! This solved it. My object is working as it should.

I've got another question: When I change the scaling and the rotation of the model in Blender via the attributes on the right side (see third screen), do you know any reason, why it doesn't get applied In Game? I exported the dff again, kept the old txd file, made a new col file, and copied the dff file in the models directory of the server. I deleted my local cache directory to make sure it will receive those files again from the server. When I create the object In Game, it still has the old rotation and scaling which looks like this:

In Game Preview:
https://www.fast-images.de/uploads/0...6cdc1acf1a.png
https://www.fast-images.de/uploads/7...7da42f8b1c.png

Scaling Attributes:


The strange thing is that the kdff gui tool recognizes my changes properly. (in the preview)

I've attached my files again.
Reply
#7

When you're happy with scale and rotation changes to an object, you should use menu > Object > Apply > Rotation & Scale
Reply
#8

I think I'm blind. Not sure where you see that option:

https://www.fast-images.de/uploads/9...4601284781.png
Reply
#9

You're in edit mode. Press Tab to go back to object mode then the Object menu will appear.
Reply
#10

Thanks for your help! You actually solved all my problems. I'm really impressed what you've achieved with 0.3.8.

Here's my object In Game with the correct rotation and scale: https://www.fast-images.de/uploads/0...3df7aebde2.png
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)