-
Posts
379 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Masterxilo
-
-
You shouldn't listen to music you like on the internet for free, shouldn't watch movies you like on the internet for free and shouldn't download any games you like from the internet. It's not good for whoever made it and they might stop creating things you like.
Would you like it if you just got your first indie game out for a few bucks, sell it just once and after a few days it's on piratebay with a few houndred seeders or on rapidshare with some thousand dls?
Everyone infringing copyright shouldn't expect others to respect it with his works (unfortunately, uncreative people don't care about this)...
-
Yeah you can render to any buffer just fine with the opengl commands.
-
As Pixel Perfect said you can modify some material keys at runtime using GetMaterialKey and SetMaterialKey. This doesn't work for all keys however. So you'd be better off writing a class that creates a temp material file, loads and deletes it to create materials at runtime. That's what I did anyway.
Similarly we can load or create a material, but if we want to save it we must write The function to do it?Yes.
-
I guess your problem is character encoding.
You convert a pointer to an ASCII string to a wstr:
WritePrivateProfileString((LPCWSTR)"Section", (LPCWSTR)"Key", "1", (LPCWSTR)"C:\Test.ini"); int result=GetPrivateProfileInt((LPCWSTR)"Section", (LPCWSTR)"Key", 0, (LPCWSTR)"C:\Test.ini");
So it won't understand where you want the file to be created because the bytes from "C:\Test.ini" interpreted as a wide char string are just garbage. For sure not an existing directory's name xD. In your case, you should have preceded all literals with L, like (L"Section", L"Key", L"1", L"C:\Test.ini"), then the casting wouldn't even be necessary.
But is better to always provide string literals enclosed in the _T() macro (which adds the L"" when compiling unicode). Include "<tchar.h>" to use this.
Also, never use LPCWSTR, LPCSTR, CHAR (= char), WCHAR explicitly when dealing whit text, but implicitly through LPCTSTR and TCHAR.
And since this is probably for le, switch your Character Set (project options) to Multi-Byte (= ASCII). This will make windows.h to define WritePrivateProfileString as WritePrivateProfileStringA instead of WritePrivateProfileStringW as it is now.
Your code should then look like this:
WritePrivateProfileString(_T("Section"), _T("Key"), "1", _T("C:\Test.ini")); int result=GetPrivateProfileInt(_T("Section"), _T("Key"), 0, _T("C:\Test.ini"));
PS: Simply casting pointer types is usually a bad idea most of times when the compiler complains about wrong argument types.
This is a good read about character encoding with C/C++ and win api: http://msdn.microsoft.com/en-us/library/06b9yaeb.aspx
-
Write a shader that makes use of the second uv set.
The
varying vec2 texcoord1;
value is already calculated in the default .vert shader, so you only need to modify the pixel shader.
Just add another texture lookup somewhere and use that color however you like.
E.g.
uniform sampler2D TEX_PRECALCLIGHT; ... precalculatedLighting = texture2D(TEX_PRECALCLIGHT,texcoord1); ... diffuse *= precalculatedLighting;
And the wrapper .frag shader defines TEX_PRECALCLIGHT as texture1 or so.
-
Just played through CoJ BiB and I have to say the performanc is just awesome. Graphics wise it's about on pair with Leadwerks and CE 2 (though there's no ocean and no sun shafts, but some very pretty ssao). They also have greate artwork, very high res textures. The vegetation looks great.
But what was best was the performance. A game that looks and feels like the LE Zone scene or Crysis and doesn't run at 30 FPS but 60! Fantastic....
Have to get that Sniper Ghost Warrior game too. Any other ChE 4 games out there?
-
Wait so vegetation could be individually placed? So why doesn't the editor allow doing this then?
-
CPU.
I think a CUDA accelerated version of Newton is in dev., but I don't think this is used in LE.
-
I'd rather use billboard sprites.
-
Josh told me that this is just the way lua works and the paths are always relative to the running executable file and the default "Scripts/" subfolder is hardcoded into the engine and Editor.exe...
For example, when your LE application starts, all scripts in the folder "Scripts\Start\" relative to your executable's path are run.
-
and press the OK button
-
Hmm, looking good so far. I see lots of very nice concept art and hear of game design documents and huge storylines. But has any line of code already been written? A coding concept, rough class design maybe? A list of oodules/parts/sub-engines that will be needed?
How close is that demo in which work seems to be invested? Any pre-alpha screenshots?
Is there any need for programmers yet? What work that can be played have you guys done so far (considering that this project seems to be 1 yr in the makings already)?
If coding is in fact going on, what collaboration platform are you using?
More please... xD
Maybe I'd like to contribute.
-
How is this project going?
-
-
File Name: gmf2obj (with source code)
File Submitter: Masterxilo
File Submitted: 01 Aug 2010
File Updated: 17 Aug 2010
File Category: Tools and Utilities
This simple tool converts any static-geometry-only .gmf model file dragged onto it to an .obj model ready to be loaded by any external modeling application.
It creates a separate submodel/group for every "surface" of the original model (that is a group of polygons with the same material).
Secondary uv coordinates are not converted, neither are scaling, position and other matrix modifications. Bones and other helpers are not converted either.
This is only meant for static geometry.
Source code (cpp) included for those who are interested. Basically, this really just loads the model using the engine's loading commands, no gmf api (that one can be used to write gmf's only anyways...) or any fancy file parsing is used. In order to make this able to run standalone, all the engine dependencies
Again, the attached file is actually a .7z (7-Zip) file, rename to unpack.
This format should really become a standard, it is superior to rar and zip in file size and unpacking speed.
- 2
-
I wrote a simple converter to turn static gmf models into .obj's. I can give it to you if you like.
-
Don't edit the material scaling in the 3ds max material editor but scale the actual texture uv's of the model.
-
Right, every other tabbed program I know has that feature.
-
The material callbacks are called every time a material is set for rendering. You could update some uniforms of the shader the material uses within that callback. Or change some textures (for animated materials).
-
Try calling:
-- Bind each buffer to a face of the cubemap SetColorBuffer(cubemapbufferpx, cubemap, 0, 0) -- positive x SetColorBuffer(cubemapbuffernx, cubemap, 0, 1) -- negative x SetColorBuffer(cubemapbufferpy, cubemap, 0, 2) -- positive y SetColorBuffer(cubemapbufferny, cubemap, 0, 3) -- negative y SetColorBuffer(cubemapbufferpz, cubemap, 0, 4) -- positive z SetColorBuffer(cubemapbuffernz, cubemap, 0, 5) -- negative z
after every render.
-
100% support this request. But I'm not quite sure whether the commands should start with Get/Set in the c api...
BodyGet... and TerrainGet... would be easier to find by "accident" when learning the commandset by looking trough intellisense. That syntax would be more similar to the oop terrain.Get...();
But yes, those functions are really needed.
-
CreateCubemap()? Sounds like an interesting command. How do you know of it?
-
No there's not, and such a feature has already been requested a long time ago http://forum.leadwerks.com/viewtopic.php?f=16&t=4858
So it's most likely not going to be implemented very soon.
But you can of course parse the .mat file yourself a second time and set the shader uniforms with your own code.
-
Any news/progress/response on this? This is pretty critical for games that are meant to be playable by everybody...
GMF Processor to work on animated models
in Suggestion Box
Posted
Hmm you shouldn't use raycasts on animated meshes, they don't hit the transformed triangles anyways.