Couple of blender questions.

Couple of blender questions.

Postby callum112233 » Tue Sep 27, 2016 3:58 pm

Hi all.

I'm pretty new to blender. I can make a decent untextured model but that's about as far as I get. Now, a couple of questions if I may:

1. Can you get a 3D model straight from blender into the sim without having to use any other software? I dislike 3DCrafter, that's why I decided to give blender a go.

2. Is it possible to do all the texturing exclusively in blender?

That's all I can think of at the moment. It's the texturing aspect that i'm having trouble with at the moment.

Thanks.
Callum.
callum112233
Full Time Fireman
 
Posts: 85
Images: 14
Joined: Mon Apr 14, 2014 6:39 pm
Has thanked: 27 times
Been thanked: 40 times

Re: Couple of blender questions.

Postby malkymackay » Tue Sep 27, 2016 5:28 pm

As long as you have the appropriate exporter plugin for your version of Blender, you can create .igs and .ia files ready for the Blueprint Editor without any further software.

As for textures, I haven't really thought about using Blender to the exclusion of any other software, as I've been using GIMP or Photoshop for over a decade and I'm happy using them when I want to work with multiple layers and/or channels.
User avatar
malkymackay
Full Time Fireman
 
Posts: 87
Images: 58
Joined: Thu Apr 10, 2014 9:19 am
Location: Kilsyth, Scotland
Has thanked: 36 times
Been thanked: 127 times

Re: Couple of blender questions.

Postby AndiS » Tue Sep 27, 2016 7:43 pm

To get the model into the game, you need Dom's exporter. It is as straightforward as it gets. But a quick look into the manual is always needed.

The game will crash if there are untextured faces, so there is a certain minimum of texturing needed. Also the material must be set up. Regarding the material, see Dom's manual.

Regarding unwrapping, this is the minimum you need to do:

1) In edit mode, select all faces and press u for unwrap, then reset.

2) Create a squared image of any solid colour. E.g., take a screenshot of anything blue or black or whatever on your screen and crop that to 16x16 pixels. Save as TGA and convert to ACE, using RWAcetool.

3) Put this image (both TGA and ACE for good measure) into a subfolder named textures in the folder where your .blend file resides. Also copy that subfolder to the Source folder in the railworks file hierarchy.

4) Make sure your material refers to this file, using a relative path.

Using blueprint editor, create a scenery blueprint using the .igs that was produced by the exporter. It should show in game, all blue or black or whatever.


Once you got that, you will want different colours. The not-so-performance-friendly way would be to define different materials, one for each colour.

The much better way is to create a grid of colour patches in a single image. I once used Excel to make squared cells of different background colour. Worked great and matched my artistic skills.

In Blender, load the image in a panel that uses UV view (image view).

Now, select all the stuff you want in yellow. Press u and select reset if you have not done that before. Then, while the mouse is over the image panel, press s for shrink and move the mouse to shrink the bag of lines you see. Then press g for grab and move them to the yellow area of the image.


One thing to keep in mind with the unwrapping business is that you can save some time if you do not postpone the unwrapping pain to the end but make a few unwrapped pieces first and then build your model from copies and modifications of these pieces. Just be warned that new faces will be untextured (i.e., not yet unwrapped) and create errors in the game if you don't spot them. But reshaping is not an issue.
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: Couple of blender questions.

Postby callum112233 » Wed Sep 28, 2016 1:03 am

Thanks for the concise answer andiS.

I get to the part where I have to export and get the following in the log file:

ERROR: No valid texture found in material 'Material.001' in Blender Mesh object 'Cube' (check shader name and subsequent slots).
callum112233
Full Time Fireman
 
Posts: 85
Images: 14
Joined: Mon Apr 14, 2014 6:39 pm
Has thanked: 27 times
Been thanked: 40 times

Re: Couple of blender questions.

Postby AndiS » Wed Sep 28, 2016 7:26 am

Best guess: You set up the material named Material correctly but then someone made your object use the material named Material.001.

Second guess: I checked one of my artistic models and I found that I have the texture file name as an absolute path, starting with C:\. When I click the "Open a file browser" icon besides the filename, and select something, I get Blender's path notation relative to the .blend file: //textures\filename.tga. Don't ask me if this is a problem.

Maybe you set up Material right but the object uses Material.001 now, which may be an earlier copy that is not set up right. This is a quick checklist again, as I cannot locate one in some of the manuals (not that I found too many of them - RTFM is dead, Find TFM is the key).

With the object selected, go to Material tab (the disk-shaped icon between the triangle and the checker board).

Make sure the material is the one you like, e.g., MyMaterial. You can change the name in the grey field besides the same disk symbol as in the tab, under the list of materials used. The name is irrelevant, but be sure which material is the one you are setting up, or you go crazy.

In the next tab, the checker board of white and red, you must have two entries in the list. The first must be named Tex or TrDiff. Tex is the simplest shader, TrDiff is lit a bit better. Just stick with these for the moment. Don't accept any deviation from that like .001.

This first texture entry is of type None. It just tells the exporter and the game which shader to use.

The second entry in the list must be your texture. To create this entry, click on the second line and then New.

The type is Image or Movie here. Under Image a bit below, I have the following - don't ask me if all of that is mandatory.

Right under header "Image", load your texture image. I chose the .tga file, because that can be shown by Blender. I seem to remember that this is the link to the image that Blender shows and this reference is not used by the exporter. The filename will be shown as just the name, with the path.

Below, set Source to Single Image.

Below, open the image again. This is where I had the absolute path. This could be the file reference that is used by the exporter.

However, it could be the other was around, too. I can't remember and can't experiment now.

Sorry if this sounds like a mess. It is too long since I did this last time.
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: Couple of blender questions.

Postby VictoryWorks » Wed Sep 28, 2016 10:13 am

You need to set up the Materials properly.

The most basic ones have 2 entries in the texture list, e.g.
BasicMaterial1.jpg

TexDiff is the shader name which can be found in the igs/ia exporter manual, the type is "None".
The 2nd entry is your texture which should be in a folder called Textures below the main folder where your model is.
User avatar
VictoryWorks
Driver
 
Posts: 333
Joined: Mon Apr 07, 2014 1:22 pm
Has thanked: 41 times
Been thanked: 224 times

Re: Couple of blender questions.

Postby callum112233 » Sat Oct 29, 2016 9:10 pm

Lovely. Thanks for all the input. I finally managed to get a multi-coloured cube into railworks. Go me :P

Now to actually model something useful.
callum112233
Full Time Fireman
 
Posts: 85
Images: 14
Joined: Mon Apr 14, 2014 6:39 pm
Has thanked: 27 times
Been thanked: 40 times

Re: Couple of blender questions.

Postby callum112233 » Mon Oct 31, 2016 5:55 pm

Another question for anyone still dropping in on this thread.

What size canvas do you use for your textures in photoshop? I'm finding it difficult to get the textures to the right scale. I used 1024x1024, is that too big?
callum112233
Full Time Fireman
 
Posts: 85
Images: 14
Joined: Mon Apr 14, 2014 6:39 pm
Has thanked: 27 times
Been thanked: 40 times

Re: Couple of blender questions.

Postby AndiS » Mon Oct 31, 2016 6:19 pm

I all depends on the size and complexity of the object, and the viewing distance. 1024 is not bad nowadays.
One hint you often read is: Make it as big as you like (suggested minimum was 1024 long ago) and scale it down as needed for actual use in game. Just be sure that the master is also squared (or two squares besides each other) and side length is a power of 2. That way you can later increase the texture size to adapt to increasing average performance of hardware.

There are two ways to check the texture size, three actually (plus those I forgot).

1) Up all display quality sliders and look at your model carefully, as close as you believe that people will get before "being unfair". Does it look blurry? If yes, increase texture size.

2) Make a fine line (1 px wide) in red or otherwise obvious somewhere on the texture where it will be noted. Is is clearly rendered in game? If yes, consider reducing it, if the contrast of that line is more than the real stuff to be seen.

3) Create a texture that is of a solid colour and use that instead. Switch off automatic mipmap generation and provide the mipmaps (i.e., the copies of the texture at reduced side length) yourself, in different colours. Now the colour in which the item is rendered will tell you how big the copy of the texture is that the game actually uses at the moment.

Creation of the test texture is work, of course, but you can reuse it. It has the side benefit to show which parts of the model have much better texture resolution than others.


((4)) There is another method, strictly for masochists: Take a screenshot of your model at nearest viewing distance, in the game. Measure the size of the object in pixels on the screenshot. Divide that by the metres it measures and you get pixels per metre. Now go through your UV map and see how the size of each face relates to the texture area used - and compare this ratio to the one you computed from the screenshot.
AndiS
Top Link Driver!
 
Posts: 736
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 268 times
Been thanked: 308 times

Re: Couple of blender questions.

Postby cjbarnes5294 » Tue Nov 01, 2016 12:54 am

AndiS wrote:((4)) There is another method, strictly for masochists: Take a screenshot of your model at nearest viewing distance, in the game. Measure the size of the object in pixels on the screenshot. Divide that by the metres it measures and you get pixels per metre. Now go through your UV map and see how the size of each face relates to the texture area used - and compare this ratio to the one you computed from the screenshot.


:!: :shock: :? :| :( :cry:

Masochistic indeed.

Kind regards,
Chris
The Red Queen Hypothesis, applicable to train sim development?

"Here, you see, it takes all of the running you can do, to keep the same place."
cjbarnes5294
Driver
 
Posts: 398
Images: 82
Joined: Mon Mar 31, 2014 12:40 pm
Location: Gloucestershire/North Yorkshire
Has thanked: 551 times
Been thanked: 187 times

Next

Return to Blender

Who is online

Users browsing this forum: No registered users and 2 guests

cron