Texture Spawning ?
Moderator: Moderators
Texture Spawning ?
I would like to spawn a texture, as far as I know it should be possible to spawn a brush with the texture applied... now I know how to spawn a brush but have no clue as to how I should spawn a texture on it...
Anyone ?
Anyone ?
Btw. I found this:
But how do I go about and use these "shader" and/or "surface" commands in conjunction with the brush spawn ?
(Out of this thread)jv_map wrote:Hmm you can spawn a brush via spawn script_object and then use the setsize command to set its dimensions. Note you can only make axial brushes this way.
I don't know if it's possible but maybe you can assign a texture with the shader or surface commands
But how do I go about and use these "shader" and/or "surface" commands in conjunction with the brush spawn ?
Don't quote me on this, I'll deny it....
I'm at work, just getting ready to start the day, so I don't have any reference with me, just going off the top of my head, but perhaps it is possible.
I don't know if the script will load properly, but perhaps you could try
the .map file format.
After local.yourbrush setsize () ()
you could try to add the texture info.
texturename 0 0 0.00 1 1 0 0 0
Off the top of my head, I think the numbers are h-shift, v-shift, rotation, h-scale, v-scale
But again, I am not sure.
(I guess I should wait until I am home and try it myself.....then come back with a better answer.)
But what is there to lose by trying it? 5 minutes?
I'm at work, just getting ready to start the day, so I don't have any reference with me, just going off the top of my head, but perhaps it is possible.
I don't know if the script will load properly, but perhaps you could try
the .map file format.
After local.yourbrush setsize () ()
you could try to add the texture info.
texturename 0 0 0.00 1 1 0 0 0
Off the top of my head, I think the numbers are h-shift, v-shift, rotation, h-scale, v-scale
But again, I am not sure.
(I guess I should wait until I am home and try it myself.....then come back with a better answer.)
But what is there to lose by trying it? 5 minutes?
Aha... however I can't get it to work...
I wouldn't call it scripting but i'm using 'standard' spawn commands:
The BMW Bike is there to check wether the script loaded properly, it is placed above the clipbrush but not on top of it.
I've also tried:
misc_outside/nu_grass_set2_sp.tga 0 0 0.00 1 1 0 0 0
texture/misc_outside/nu_grass_set2_sp 0 0 0.00 1 1 0 0 0
texture/misc_outside/nu_grass_set2_sp.tga 0 0 0.00 1 1 0 0 0
And I've tried it with values entered...
I wouldn't call it scripting but i'm using 'standard' spawn commands:
Code: Select all
// Object Spawn Testing
// The Added Models
// Example Clip Brush
//local.clipbrush = spawn script_object
//local.clipbrush.origin = ( -2173.06 927.02 144.13 )
//local.clipbrush setsize ( 0000 0000 0000 ) ( 0000 0000 0000 )
//local.clipbrush.angles = ( 0.0 0.0 0.0 )
//local.clipbrush solid
// Brush & Texture Test
local.clipbrush = spawn script_object
local.clipbrush.origin = ( -453.87 -193.67 432.13 )
local.clipbrush setsize ( -100.00 -100.00 0.00 ) ( 100.00 100.00 50.00 ) misc_outside/nu_grass_set2_sp 0 0 0.00 1 1 0 0 0
local.clipbrush.angles = ( 0.0 86.15 0.0 )
local.clipbrush solid
// BMW Bike
local.model1 = spawn script_model
local.model1 model "vehicles/bmwbike.tik"
local.model1.origin = ( -453.87 -193.67 832.13 )
local.model1.angles = ( 0.0 86.15 0.0 )
local.model1.scale = 1.0
local.model1 solid
I've also tried:
misc_outside/nu_grass_set2_sp.tga 0 0 0.00 1 1 0 0 0
texture/misc_outside/nu_grass_set2_sp 0 0 0.00 1 1 0 0 0
texture/misc_outside/nu_grass_set2_sp.tga 0 0 0.00 1 1 0 0 0
And I've tried it with values entered...
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
Krane
- Lieutenant General
- Posts: 782
- Joined: Sat May 31, 2003 4:18 pm
- Location: California, USA
- Contact:
My tip is to create a brush, texture w/ texture1. Copy this brush and place it in the exact same position of brush1, but this brush will have texture2.
Now select only brush1 and right-click on the 2D window and choose script>object. Give it a targetname. Do the same with brush2. Give a different targetname. Now on your script you can use $brush1 hide/show and $brush2 hide/show.
I think the blood mods spawn a little model...When I replace the textures, I can see a "textureless plaque" in the floor where the blood suppose to be.
Now select only brush1 and right-click on the 2D window and choose script>object. Give it a targetname. Do the same with brush2. Give a different targetname. Now on your script you can use $brush1 hide/show and $brush2 hide/show.
I think the blood mods spawn a little model...When I replace the textures, I can see a "textureless plaque" in the floor where the blood suppose to be.
Well, Kalti, I tried some experiments of my own, and they failed......
Just when I thought I might have gotten it, it was a no go.
I added these lines to the spawn script, and surprisingly got no script errors, but the texture did not show up:
and
The first yielded no script errors at all, but the surface did not render, although the brush spawned.
The second also spawned the brush, but I received a console message:
I tried different variations of these with no luck....but at least the absence of errors leads me to believe that it may be possible to get a texture to show up.
Although in all likelihood it's lighting will not match the rest of the map.
If I come up with anything, I'll let you know.
Just when I thought I might have gotten it, it was a no go.
I added these lines to the spawn script, and surprisingly got no script errors, but the texture did not show up:
Code: Select all
local.brush shader vcsp surface textures/vcsp/vc_fog 0 0 0.00 1 1 0 0 0Code: Select all
local.brush shader vcsp
local.brush surface textures/vcsp/vc_fog 0 0 0.00 1 1 0 0 0The second also spawned the brush, but I received a console message:
Code: Select all
script_object::SurfaceCommand : group textures/vcsp/vc_fog not found.Although in all likelihood it's lighting will not match the rest of the map.
If I come up with anything, I'll let you know.




