|
free image to normalize plane object.
About Truespace Archives
These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.
They are retained here for archive purposes only.
free image to normalize plane object. // The Garage
Post by Johny // Apr 30, 2006, 5:06am
Johny
Total Posts: 672
|
Hi all, I make some modification from my early tS7 plane script object to make it's ZSize depent on input image color. (Use this with terragen image for make a lanscape object):rolleyes:
Here is the screen grap of script result and tS7.1 scene file.
(ps: don't try to open too big image if you have a slow machine):D
EDIT: add file:"BitMapToNormalPlane.6.4.30b.RsScn.
(this file open load file "C:\trueSpace7\tS\Textures\3Dfoot.tga" ) |
Post by tomasb // Apr 30, 2006, 5:19am
tomasb
Total Posts: 261
|
nice one... again.
When you fully understand how meshes are stored inside rS and how to script them, it shouldn't be problem for you to create displacement maps or fur scripts...
fur: you can read material indices stream and use normals for fur direction
displacement: you can use material index, normals and uv1 for evaluation of new vertex position. |
Post by splinters // Apr 30, 2006, 7:32am
splinters
Total Posts: 4148
|
So Johny, fancy trying some fur next?...;) |
Post by Johny // Apr 30, 2006, 8:03am
Johny
Total Posts: 672
|
Here is the test screen with terragen generated file, 1x add subdivision layer and a background image.
Tomasb, thanks for the tips :)
Splinters, I still can not different the difinition of normal map, displacement map and fur. |
Post by trueBlue // Apr 30, 2006, 8:28am
trueBlue
Total Posts: 1761
|
Johny: I can not open your scene. I get this error! |
Post by Johny // Apr 30, 2006, 8:54am
Johny
Total Posts: 672
|
Johny: I can not open your scene. I get this error!
Ops that's maybe because the scene file try to open my avatar file that not exist on you computer:confused:
Here I attach the object file. this object file open file "3Dflower.tga" on tS texture folder. Hope you're install you tS on drive C: and on standart folder, if not you can create one on drive c: with same original folder structure and copy file "3Dflower.tga" to that folder. |
Post by xmanflash // Apr 30, 2006, 2:48pm
xmanflash
Total Posts: 335
|
Ops that's maybe because the scene file try to open my avatar file that not exist on you computer:confused:
Here I attach the object file. this object file open file "3Dflower.tga" on tS texture folder. Hope you're install you tS on drive C: and on standart folder, if not you can create one on drive c: with same original folder structure and copy file "3Dflower.tga" to that folder.
Hi Johnny,
Is TS scripting dependent on the filesystem normally this rigid? - i.e. having to install objects acording to where the script needs to look for them? - or is there a variable that defines where somebodies resources are based on the TS install or something?? |
Post by Johny // Apr 30, 2006, 4:39pm
Johny
Total Posts: 672
|
Hi Johnny,
Is TS scripting dependent on the filesystem normally this rigid? - i.e. having to install objects acording to where the script needs to look for them? - or is there a variable that defines where somebodies resources are based on the TS install or something??
I also don't know, maybe devs can asnwer this ;) |
Post by SteveBe // Apr 30, 2006, 7:23pm
SteveBe
Total Posts: 282
|
Wow Johny, once again nice work!
:banana::banana::banana:
Thanks for the insight to what is possible!
Steve |
Post by Mike // May 1, 2006, 6:23pm
Mike
Total Posts: 121
|
I've been having a lot of fun with this tonight Johny, thanks.
Years ago Greg Smith created a .tsx named Bitmap Primitives that did this (with plane, sphere, cube). Now we can dig into the LE and see how it works. Cool!
:banana: :banana: :banana: |
Post by Alien // Aug 14, 2006, 5:47pm
Alien
Total Posts: 1231
|
Here I attach the object file. this object file open file "3Dflower.tga" on tS texture folder. Hope you're install you tS on drive C: and on standart folder, if not you can create one on drive c: with same original folder structure and copy file "3Dflower.tga" to that folder.
If you use %vlight_root%\..\ instead of C:\trueSpace7\tS\ for any file access related functions it should work for everyone, no matter where they installed tS7.
Just been playing around with the 1 you attached to post #6, & noticed something weird. I don't have my tS installed in the default place, mine's in:
C:\Program Files\Graphics\trueSpace7\
Yet it still loads with the 3D flower. :confused: Anyway, I tried it with different images, & it works, thanks for that, it's given me some ideas. BTW, I tested the tip I mentioned above, about the path, & it works. To use a different image I used the ImportBitmap system object & connected it to the plane object, but instead of browsing for an image in my textures folder, typed in %vlight_root%\..\Textures\ followed by the filename, & it worked.
1 thing though, it could do with a reset or update button, as I couldn't figure out how to apply 1 image to it instead of the previous image that had been applied, so just had to delete the plane object & do it from scratch each time. |
Post by Johny // Aug 15, 2006, 1:02am
Johny
Total Posts: 672
|
If you use %vlight_root%\..\ instead of C:\trueSpace7\tS\ for any file access related functions it should work for everyone, no matter where they installed tS7.
Just been playing around with the 1 you attached to post #6, & noticed something weird. I don't have my tS installed in the default place, mine's in:
C:\Program Files\Graphics\trueSpace7\
Yet it still loads with the 3D flower. :confused: Anyway, I tried it with different images, & it works, thanks for that, it's given me some ideas. BTW, I tested the tip I mentioned above, about the path, & it works. To use a different image I used the ImportBitmap system object & connected it to the plane object, but instead of browsing for an image in my textures folder, typed in %vlight_root%\..\Textures\ followed by the filename, & it worked.
Thanks for this usefull information :)
1 thing though, it could do with a reset or update button, as I couldn't figure out how to apply 1 image to it instead of the previous image that had been applied, so just had to delete the plane object & do it from scratch each time.
This is because you enter edit mode before (by right click on plane obj). To solve this problem, you can delete "Mesh modifier[,n]" obj and then attach 'output shape mesh' link to shape obj as shown on bellow img.:rolleyes: |
|