Switching textures in shockwave

mdoyle

New member
Just finished reading the thread. THat seems fantastic for visual stuff

So pim does not support integrattion with Flash and its difficuilt to create dynamic content? Is the multi user aspec easy to work with? Does it have a full physics engine yet? Will there be streaming options in the web based versions for animated maps etc, or just streaming of content in general?

In the forum none of the .exe links are working anymore. Do you still have copies of them to have a look at?

Am quite interested in this product. Alot of work I do could just get done in this, doesn't seem like everything but at least some of it.

Pretty cool.
 

gordonbaty

New member
Guys, thanks for the info on using textures - and PIM!

I asked originally because I couldn't find any clear info on how to switch textures in the books I have. You have both made it very clear for me, I really appreciate it. Although Shockwave is new for me and you seem to be light years ahead...

I didn't totally understand how you described it, but I liked what you said about layering textures in Director so that you have a texture on top of a colour. I want people to be able to pick the colour of their model, and I had thought I would need one texture per colour. It would be way cool if they could choose the colour from a large palette.

Thanks guys... you're a help and an inspiration.
 

MentalFish

LScript minion
mdoyle said:
So pim does not support integrattion with Flash and its difficuilt to create dynamic content?
Not difficult, just different.

mdoyle said:
Is the multi user aspec easy to work with?
1/10th of what it takes compared to SW multi user server.

mdoyle said:
Does it have a full physics engine yet?
Stay tuned :D

mdoyle said:
Will there be streaming options in the web based versions for animated maps etc, or just streaming of content in general?
I am not sure how it handles that issue.

mdoyle said:
In the forum none of the .exe links are working anymore. Do you still have copies of them to have a look at?
I didnt save them all, but this one use specular and bump mapping:
http://petter.ms/forum/victoria_test_anim.zip
 

mdoyle

New member
Will have a look about for the old colour chooser we did with the car and its layer and show u how its done gordonbaty. Unfortunately shockwave is diffictuilt engine to work with as you can't do most things which a current engine can do. Its just trying to work out the best way to use it as best as you can. I don't know what petterms thinks but I think basically we have taken shockwave as far as it can on how good things can look. Obviously if its for a highspec machine etc then u can have high textures etc but really the limits on lighting shaders, textures etc will only allow u to go so far.
 

mdoyle

New member
I think the character was vitcoria from poser which in herself is in the region of 100 000 polygons plus you have to add teh texture memory on top of that. Shockwave with 100 000 polygons with a bone rig moving those bones and even adding the textures and lighting on top of that. I don't even know if shockwave could export that as one single file. I might be wrong but thats what it looks like to me
 

dsdsdsdsd

New member
petterms, would you please elaborate:
The most gfx card friendly is to just replace the pixels of the same texture

I want to apply baked image textures to shockwave models; I do not want to export the baked textures as a part of the .w3d because of filesize;

rather, I want to export the models ( from LW ) without any texture and then have lingo download the appropriate baked_texture.jpg;

ofcourse the problem is getting the baked texture, which is intended for a uv map, to align correctly;

I suppose that possibly I could simply copypixel from cast member baked_texture.jpg to my_bare_model.shaderlist[1].texturelist[1].image;

PROBLEM: how would I define the destination rectangle for the copypixel method?


thanks
dsdsdsdsd
 

mdoyle

New member
Hey

I don't think that would work with your method.

I don't export bake textures with my model either. What I do is export a single w3d with a colour image for use online or on the CD. I also export a seperate w3d with the baked texture image applied. Afterwards I work out uv co ords relative to the vertice positions so I know which uv point is whic. This is so I can create a txt file that stores the uv data and vertices between the colour map and the baked map. After that is saved on runtime I apply the data to the 2nd texture layer with the baked shadow map multiplied over it.
 

dsdsdsdsd

New member
mdoyle, hello;

work out uv co ords
in LW? in Director?
relative to the vertice positions
is this Director's meshdeform modifier
create a txt file that stores the uv data and vertices between the colour map and the baked map
create the textfile using LScript in LW or using Lingo at runtime?


are you aware of any tutorials on these issues;

thanks for your time
Shannon
Chicago
 

dsdsdsdsd

New member
mdoyle, thanks for the tutorial link;

he is creating two w3d's: one with geometry only and one with geometry&textures;

it seems as if this would defeat the purpose;

the goal is:
1 - to have a small .dcr filesize for quick delivery over the internet;
2 - once shockwave movie begins, to download all baked-texture jpgs quickly;
3 - once jpgs are downloaded, to apply/map them to their appropriate model;

am I missing something?
 

mdoyle

New member
You can still do it that way.

Basically what you are asking for is similar to what I do.

I create 2 w3d's.

The first one is the colour mapped one. You can export this with proper textures but I export it with just a plain 2px x 2px white texture thus keeping the file size down small

The 2nd one will have the shadow maps applied.

In director you can get the the uv co ords from the 2nd w3d as explained in the tutorial. Once this is done you can load the data from the txt file on runtime (as opposed to the 2nd w3d) and apply it to the 2nd texture layer. The first texture layer will have the downloaded colour maps applied.

So in the end you are downloading:
1 w3d (small)
1 txt file (with uv data)
1 dcr file
Colourmaps
Lightmaps.

Does this make sense?
 

dsdsdsdsd

New member
mdoyle, thanks for your patience;

when you say lightmap/colormap, do you mean the actual UV map in LW
LW_UV_map_screenshot.gif
or
do you mean jpgs such as this, generated by LW,
SB_srf_uit_#a_w.jpg


as far the tutorial, where did the author find this method: generateLightMap()? he uses it to create
1 txt file (with uv data)

my Director v9 does not support generateLightMap() or getLightmap();

dsdsdsdsd
 

mdoyle

New member
The colourmap = the coloured texture on the model ie brick or concrete. The jpg.

The lightmap = the baked texture map created by the render the jpg.

will have a look at some code when I get into work tomorrow see if I can find any
 

MentalFish

LScript minion
Hey dudes, I am working on a text format that may save us alot of trouble. Instead of the "merging" of two w3d, it seems like a viable option to just build the model from scratch using a text file with all the vertecies, polygons and both uv sets. It takes Director only three seconds to build a mesh with 100.000 polys on my neighbours machine here, so a low res model should be really quick. The text file is smaller than a W3D! If only there was a ShockWave safe ZIP xtra available, it would have been super slick.
 

mdoyle

New member
I see what you mean now. The generateLightMap() and getLightMap() functions aren't native to director . you have to do that part yourself. The link I gave you before was misleading.
THe basic idea is to loop through the vertices/uv co-ords of the color map and find the matching vertice/uv co-ord in the shadow map. w3d exported never exports 2 models in the same vertice order so you have to do a loop throught the shadow map to find the correct vertice. after building the second uv layer you can save to a file. At runtime you can download the file and apply the uv layer again without the lengty processing step.
 
Top Bottom