FSDeveloper Community

Go Back   FSDeveloper Community > Microsoft Flight Simulator development > Scenery Design - Other > SCASM & ASM tweaking

SCASM & ASM tweaking Use this forum for all SCASM and ASM source code tweaking discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 07 Jul 2005, 22:57
mattperry78's Avatar
mattperry78 mattperry78 is offline
  us-florida
Location: Jacksonville, Florida
Join Date: Oct 2004
Posts: 59
Using Night Textures alongside Seasonal Textures

I have been able to sucessfully add night textures for objects in GMAX thanks to the code postings on this forum. However, I also wish for these objects to maintain their night textures. I have tried not changing the night textures and just adjusting the seasons as below:

Code:
IFIN1 tex_02, 038Ah, 325, 355
MATERIAL 0,0 ;  winter
JUMP tex_continue1
tex_02 label word
IFIN1 tex_03, 038Ah, 356, 366
MATERIAL 0,1 ;  hard winter
JUMP tex_continue1
tex_03 label word
IFIN1 tex_04, 038Ah, 0, 76
MATERIAL 0,1 ;  hard winter
JUMP tex_continue1
tex_04 label word
IFIN1 tex_05, 038Ah, 77, 171
MATERIAL 0,2 ; spring
JUMP tex_continue1
tex_05 label word
IFIN1 tex_06, 038Ah, 172, 262
MATERIAL 0,3 ; summer
JUMP tex_continue1
tex_06 label word
MATERIAL 0,4 ; fall
tex_continue1 label word
    BGL_ZBIAS 4
    DRAW_TRI_BEGIN 0, 4
    DRAW_TRI    3,   2,   1 ; poly=14 part=1
    DRAW_TRI    0,   1,   2 ; poly=13 part=1
    DRAW_TRI_END
    BGL_ZBIAS 0
Or adding in a line to test for the night condition as below...
Code:
IFIN1 tex_01, 028Ch, 2, 4
MATERIAL 0,5 ;  night
JUMP tex_continue1
tex_01 label word
IFIN1 tex_02, 038Ah, 325, 355
MATERIAL 0,0 ;  winter
JUMP tex_continue1
tex_02 label word
IFIN1 tex_03, 038Ah, 356, 366
MATERIAL 0,1 ;  hard winter
JUMP tex_continue1
tex_03 label word
IFIN1 tex_04, 038Ah, 0, 76
MATERIAL 0,1 ;  hard winter
JUMP tex_continue1
tex_04 label word
IFIN1 tex_05, 038Ah, 77, 171
MATERIAL 0,2 ; spring
JUMP tex_continue1
tex_05 label word
IFIN1 tex_06, 038Ah, 172, 262
MATERIAL 0,3 ; summer
JUMP tex_continue1
tex_06 label word
MATERIAL 0,4 ; fall
tex_continue1 label word
    BGL_ZBIAS 4
    DRAW_TRI_BEGIN 0, 4
    DRAW_TRI    3,   2,   1 ; poly=14 part=1
    DRAW_TRI    0,   1,   2 ; poly=13 part=1
    DRAW_TRI_END
    BGL_ZBIAS 0


The second one shows the night texture, but the texture appears like a "day" texture at night (dull). I haven't changed the type of texture earlier in the file. It still appears as such...

Code:
TEXTURE_DEF TEXTURE_BUILDING    , <255,255,255,255>, 540.750213, "KBWIO11_wi.BMP" 	 ;0
    TEXTURE_DEF TEXTURE_BUILDING    , <255,255,255,255>, 540.750213, "KBWIO11_hw.BMP" 	 ;1
    TEXTURE_DEF TEXTURE_BUILDING    , <255,255,255,255>, 540.750213, "KBWIO11_sp.BMP" 	 ;2
    TEXTURE_DEF TEXTURE_BUILDING    , <255,255,255,255>, 540.750213, "KBWIO11_su.BMP" 	 ;3
    TEXTURE_DEF TEXTURE_BUILDING    , <255,255,255,255>, 540.750213, "KBWIO11_fa.BMP" 	 ;4
    TEXTURE_DEF TEXTURE2_NIGHT      , <255,255,255,255>, 540.750213, "KBWIO11_LM.BMP"	;5

Any suggestions??

Thanks for everything!
__________________
Matt Perry
foxtrotsierra.org
Reply With Quote
  #2  
Old 08 Jul 2005, 15:05
arno's Avatar
arno arno is offline
  netherlands
Location: Amsterdam
Join Date: May 2004
Posts: 18,774
Send a message via Skype™ to arno
Hi Matt,

This approach will not work, as your night texture will be displayed like a normal texture if you switch it like this.

The best approach is to assign a night texture to each day texture (the night texture is a subtexture type anyway).

Code:
TEXTURE_DEF TEXTURE_BUILDING    , <255,255,255,255>, 540.750213, "KBWIO11_wi.BMP" 	 ;0
TEXTURE_DEF TEXTURE2_NIGHT      , <255,255,255,255>, 540.750213, "KBWIO11_LM.BMP"	;1
TEXTURE_DEF TEXTURE_BUILDING    , <255,255,255,255>, 540.750213, "KBWIO11_hw.BMP" 	 ;2
TEXTURE_DEF TEXTURE2_NIGHT      , <255,255,255,255>, 540.750213, "KBWIO11_LM.BMP"	;3
TEXTURE_DEF TEXTURE_BUILDING    , <255,255,255,255>, 540.750213, "KBWIO11_sp.BMP" 	 ;4
TEXTURE_DEF TEXTURE2_NIGHT      , <255,255,255,255>, 540.750213, "KBWIO11_LM.BMP"	;5
TEXTURE_DEF TEXTURE_BUILDING    , <255,255,255,255>, 540.750213, "KBWIO11_su.BMP" 	 ;6
TEXTURE_DEF TEXTURE2_NIGHT      , <255,255,255,255>, 540.750213, "KBWIO11_LM.BMP"	;7
TEXTURE_DEF TEXTURE_BUILDING    , <255,255,255,255>, 540.750213, "KBWIO11_fa.BMP" 	 ;8
TEXTURE_DEF TEXTURE2_NIGHT      , <255,255,255,255>, 540.750213, "KBWIO11_LM.BMP"	;9
Of course you need to change your MATERIAL numbers after that as well, to match the inserted textures.
__________________
Arno
If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper Administrator | Former Microsoft FS MVP
Quick links: My tools | Wiki | Download center | Blog
Reply With Quote
  #3  
Old 09 Jul 2005, 09:32
mattperry78's Avatar
mattperry78 mattperry78 is offline
  us-florida
Location: Jacksonville, Florida
Join Date: Oct 2004
Posts: 59
Thanks again arno! That did it!
__________________
Matt Perry
foxtrotsierra.org
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Seasonal textures for trees bogweasel General 2 29 Aug 2006 17:10
Tweaker 2 and seasonal textures rasha01 MDL Tweaker 1 07 Nov 2005 15:38
night textures Shagster22 GMax and 3DS Max 2 10 Oct 2005 12:33


All times are GMT -4. The time now is 20:17.

Kirsch designed by Andrew & Austin


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.